diff --git a/models/test-management/src/index.ts b/models/test-management/src/index.ts index f461dd558de..43e288745a1 100644 --- a/models/test-management/src/index.ts +++ b/models/test-management/src/index.ts @@ -160,6 +160,7 @@ export function createModel (builder: Builder): void { defineTestSuite(builder) defineTestCase(builder) defineTestRun(builder) + defineTestResult(builder) definePresenters(builder) @@ -261,7 +262,7 @@ function defineTestSuite (builder: Builder): void { // Actions builder.mixin(testManagement.class.TestSuite, core.class.Class, view.mixin.IgnoreActions, { - actions: [print.action.Print, tracker.action.EditRelatedTargets] + actions: [print.action.Print, tracker.action.EditRelatedTargets, tracker.action.NewRelatedIssue] }) createAction( @@ -331,7 +332,7 @@ function defineTestCase (builder: Builder): void { builder.mixin(testManagement.class.TestCase, core.class.Class, view.mixin.ClassFilters, { filters: ['priority', 'status'], - ignoreKeys: ['createdBy', 'modifiedBy', 'createdOn', 'modifiedOn'] + ignoreKeys: ['createdBy', 'modifiedBy', 'createdOn', 'modifiedOn', 'name'] }) builder.createDoc( @@ -419,6 +420,12 @@ function defineTestRun (builder: Builder): void { component: testManagement.component.TestResultStatusPresenter }) + builder.mixin(testManagement.class.TestRun, core.class.Class, view.mixin.IgnoreActions, { + actions: [print.action.Print, tracker.action.EditRelatedTargets, tracker.action.NewRelatedIssue] + }) +} + +function defineTestResult (builder: Builder): void { builder.mixin(testManagement.class.TestResult, core.class.Class, view.mixin.ObjectPresenter, { presenter: testManagement.component.TestResultPresenter }) @@ -448,7 +455,7 @@ function defineTestRun (builder: Builder): void { builder.mixin(testManagement.class.TestResult, core.class.Class, view.mixin.ClassFilters, { filters: ['assignee', 'status', 'testSuite'], - ignoreKeys: ['createdBy', 'modifiedBy', 'createdOn', 'modifiedOn'] + ignoreKeys: ['createdBy', 'modifiedBy', 'createdOn', 'modifiedOn', 'name', 'attachedTo'] }) const viewOptions: ViewOptionsModel = { diff --git a/models/test-management/src/plugin.ts b/models/test-management/src/plugin.ts index 0bf91802e5b..fcfbf07a0c8 100644 --- a/models/test-management/src/plugin.ts +++ b/models/test-management/src/plugin.ts @@ -23,7 +23,8 @@ import type { ActionCategory } from '@hcengineering/view' export default mergeIds(testManagementId, testManganement, { category: { TestSuite: '' as Ref, - TestCase: '' as Ref + TestCase: '' as Ref, + TestResult: '' as Ref }, component: { CreateTestCase: '' as AnyComponent, diff --git a/models/test-management/src/types.ts b/models/test-management/src/types.ts index fc1ffcd1eff..98332f761a0 100644 --- a/models/test-management/src/types.ts +++ b/models/test-management/src/types.ts @@ -250,12 +250,15 @@ export class TTestResult extends TAttachedDoc implements TestResult { testCase!: Ref @Prop(TypeRef(testManagement.class.TestSuite), testManagement.string.TestSuite) + @Index(IndexKind.Indexed) testSuite?: Ref @Prop(TypeTestRunStatus(), testManagement.string.TestRunStatus) + @Index(IndexKind.Indexed) status?: TestRunStatus @Prop(TypeRef(contact.mixin.Employee), testManagement.string.TestAssignee) + @Index(IndexKind.Indexed) assignee?: Ref @Prop(Collection(attachment.class.Attachment), attachment.string.Attachments, { shortLabel: attachment.string.Files }) diff --git a/plugins/test-management-assets/lang/cs.json b/plugins/test-management-assets/lang/cs.json index 4cc8c2d40d4..9f075c90e78 100644 --- a/plugins/test-management-assets/lang/cs.json +++ b/plugins/test-management-assets/lang/cs.json @@ -77,6 +77,8 @@ "DueDate": "Termín", "RunTestCases": "Spustit", "TestCaseDescription": "Popis testovacího případu", - "TestResultAttributes": "Výsledek" + "TestResultAttributes": "Výsledek", + "GoToNextTest": "Další", + "GoToNextTestTooltip": "Přejít na další test" } } diff --git a/plugins/test-management-assets/lang/en.json b/plugins/test-management-assets/lang/en.json index 11a3feb1a37..943bbaa95a3 100644 --- a/plugins/test-management-assets/lang/en.json +++ b/plugins/test-management-assets/lang/en.json @@ -77,6 +77,8 @@ "DueDate": "Due date", "RunTestCases": "Run", "TestCaseDescription": "Test case description", - "TestResultAttributes": "Result" + "TestResultAttributes": "Result", + "GoToNextTest": "Next", + "GoToNextTestTooltip": "Go to next test" } } diff --git a/plugins/test-management-assets/lang/es.json b/plugins/test-management-assets/lang/es.json index 0bbdac565e7..f0fdb2bc09d 100644 --- a/plugins/test-management-assets/lang/es.json +++ b/plugins/test-management-assets/lang/es.json @@ -77,6 +77,8 @@ "DueDate": "Fecha de vencimiento", "RunTestCases": "Ejecutar", "TestCaseDescription": "Descripción del caso de prueba", - "TestResultAttributes": "Resultado" + "TestResultAttributes": "Resultado", + "GoToNextTest": "Siguiente", + "GoToNextTestTooltip": "Ir al siguiente test" } } diff --git a/plugins/test-management-assets/lang/fr.json b/plugins/test-management-assets/lang/fr.json index 3fdb3a50fb6..3fd4f7c877a 100644 --- a/plugins/test-management-assets/lang/fr.json +++ b/plugins/test-management-assets/lang/fr.json @@ -77,6 +77,8 @@ "DueDate": "Date d'échéance", "RunTestCases": "Exécuter", "TestCaseDescription": "Description du cas de test", - "TestResultAttributes": "Résultat" + "TestResultAttributes": "Résultat", + "GoToNextTest": "Suivant", + "GoToNextTestTooltip": "Aller au test suivant" } } diff --git a/plugins/test-management-assets/lang/it.json b/plugins/test-management-assets/lang/it.json index 8751272028b..a1a56b4ab76 100644 --- a/plugins/test-management-assets/lang/it.json +++ b/plugins/test-management-assets/lang/it.json @@ -77,6 +77,8 @@ "DueDate": "Data di scadenza", "RunTestCases": "Esegui", "TestCaseDescription": "Descrizione del caso di test", - "TestResultAttributes": "Risultato" + "TestResultAttributes": "Risultato", + "GoToNextTest": "Successivo", + "GoToNextTestTooltip": "Vai al test successivo" } } diff --git a/plugins/test-management-assets/lang/pt.json b/plugins/test-management-assets/lang/pt.json index 5f34b98868e..c6a71d734c7 100644 --- a/plugins/test-management-assets/lang/pt.json +++ b/plugins/test-management-assets/lang/pt.json @@ -77,6 +77,8 @@ "DueDate": "Data de vencimento", "RunTestCases": "Executar", "TestCaseDescription": "Descrição do caso de teste", - "TestResultAttributes": "Resultado" + "TestResultAttributes": "Resultado", + "GoToNextTest": "Próximo", + "GoToNextTestTooltip": "Ir para o próximo teste" } } diff --git a/plugins/test-management-assets/lang/ru.json b/plugins/test-management-assets/lang/ru.json index 9917ba97ca5..e18849137c9 100644 --- a/plugins/test-management-assets/lang/ru.json +++ b/plugins/test-management-assets/lang/ru.json @@ -77,6 +77,8 @@ "DueDate": "Выполнить до", "RunTestCases": "Выполнить", "TestCaseDescription": "Описание тест-кейса", - "TestResultAttributes": "Результат" + "TestResultAttributes": "Результат", + "GoToNextTest": "Следующий", + "GoToNextTestTooltip": "Перейти к следующему тесту" } } diff --git a/plugins/test-management-assets/lang/zh.json b/plugins/test-management-assets/lang/zh.json index 4d1558a7e6f..3854292f464 100644 --- a/plugins/test-management-assets/lang/zh.json +++ b/plugins/test-management-assets/lang/zh.json @@ -77,6 +77,8 @@ "DueDate": "到期日", "RunTestCases": "运行", "TestCaseDescription": "測試用例描述", - "TestResultAttributes": "結果" + "TestResultAttributes": "結果", + "GoToNextTest": "下一個", + "GoToNextTestTooltip": "轉到下一個測試" } } diff --git a/plugins/test-management-resources/src/components/test-result/EditTestResult.svelte b/plugins/test-management-resources/src/components/test-result/EditTestResult.svelte index 41020b475f3..bd1f2ca52f2 100644 --- a/plugins/test-management-resources/src/components/test-result/EditTestResult.svelte +++ b/plugins/test-management-resources/src/components/test-result/EditTestResult.svelte @@ -24,6 +24,7 @@ import { DocAttributeBar, getDocMixins } from '@hcengineering/view-resources' import RightHeader from './RightHeader.svelte' + import NextButton from './NextButton.svelte' import TestCaseDetails from '../test-case/TestCaseDetails.svelte' import testManagement from '../../plugin' @@ -92,6 +93,10 @@ /> + + + + diff --git a/plugins/test-management-resources/src/components/test-result/NextButton.svelte b/plugins/test-management-resources/src/components/test-result/NextButton.svelte new file mode 100644 index 00000000000..288527e3a5a --- /dev/null +++ b/plugins/test-management-resources/src/components/test-result/NextButton.svelte @@ -0,0 +1,81 @@ + + + +{#if isLoading} + +{:else} +