// // Copyright © 2024 Hardcore Engineering Inc. // // Licensed under the Eclipse Public License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. You may // obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // // See the License for the specific language governing permissions and // limitations under the License. // import { Mixin, type Class, type Doc, type Ref, Type, type Status, type SpaceTypeDescriptor, type SpaceType } from '@hcengineering/core' import type { Asset, IntlString, Plugin, Resource } from '@hcengineering/platform' import { plugin } from '@hcengineering/platform' import { type AnyComponent, type Location, type ResolvedLocation } from '@hcengineering/ui/src/types' import { Action, ActionCategory, ViewAction, Viewlet } from '@hcengineering/view' import { TestSuite, TestCase, TestProject, TestCaseType, TestCasePriority, TestCaseStatus, TestRun, TestRunStatus, TestResult, TestPlan, TestPlanItem } from './types' /** @public */ export const testManagementId = 'testManagement' as Plugin /** @public */ export const testManagementPlugin = plugin(testManagementId, { app: { TestManagement: '' as Ref }, action: { DeleteTestCase: '' as Ref>, CreateChildTestSuite: '' as Ref, EditTestSuite: '' as Ref, RunSelectedTests: '' as Ref, EditProject: '' as Ref }, actionImpl: { CreateChildTestSuite: '' as ViewAction, EditTestSuite: '' as ViewAction, RunSelectedTests: '' as ViewAction, EditProject: '' as ViewAction }, icon: { TestManagement: '' as Asset, TestManagementVersion: '' as Asset, TestManagementApplication: '' as Asset, TestCase: '' as Asset, TestCases: '' as Asset, Home: '' as Asset, Estimation: '' as Asset, TestSuite: '' as Asset, TestProject: '' as Asset, TestSuites: '' as Asset, TestRuns: '' as Asset, RedCircle: '' as Asset, StatusDraft: '' as Asset, StatusReview: '' as Asset, StatusReviewComments: '' as Asset, StatusApproved: '' as Asset, StatusRejected: '' as Asset, Document: '' as Asset, TestLibrary: '' as Asset, TestResult: '' as Asset, StatusNonTested: '' as Asset, StatusBlocked: '' as Asset, StatusPassed: '' as Asset, StatusFailed: '' as Asset, Run: '' as Asset, TestPlans: '' as Asset }, class: { TestCase: '' as Ref>, TestSuite: '' as Ref>, TestProject: '' as Ref>, TypeTestCaseType: '' as Ref>>, TypeTestCasePriority: '' as Ref>>, TypeTestCaseStatus: '' as Ref>>, TestRun: '' as Ref>, TypeTestRunStatus: '' as Ref>>, TestResult: '' as Ref>, TestPlan: '' as Ref>, TestPlanItem: '' as Ref> }, descriptors: { ProjectType: '' as Ref }, mixin: { TestCaseTypeData: '' as Ref>, TestProject: '' as Ref>, DefaultProjectTypeData: '' as Ref> }, string: { ConfigLabel: '' as IntlString, ConfigDescription: '' as IntlString, TestCaseType: '' as IntlString, TestCasePriority: '' as IntlString, TestCaseStatus: '' as IntlString, TestSuite: '' as IntlString, SuiteName: '' as IntlString, SuiteDescription: '' as IntlString, Suite: '' as IntlString, TestName: '' as IntlString, TestDescription: '' as IntlString, TestType: '' as IntlString, TestPriority: '' as IntlString, TestStatus: '' as IntlString, TestEstimatedTime: '' as IntlString, TestPreconditions: '' as IntlString, TestSteps: '' as IntlString, TestAssignee: '' as IntlString, TestCase: '' as IntlString, TestProject: '' as IntlString, TestManagementApplication: '' as IntlString, AllTestSuites: '' as IntlString, AllProjects: '' as IntlString, Projects: '' as IntlString, CreateProject: '' as IntlString, TestCases: '' as IntlString, TestManagementDescription: '' as IntlString, CreateTestCase: '' as IntlString, FullDescription: '' as IntlString, EditProject: '' as IntlString, ProjectName: '' as IntlString, ProjectType: '' as IntlString, Members: '' as IntlString, ProjectMembers: '' as IntlString, ManageProjectStatuses: '' as IntlString, TestSuites: '' as IntlString, CreateTestSuite: '' as IntlString, NamePlaceholder: '' as IntlString, DescriptionPlaceholder: '' as IntlString, TestRuns: '' as IntlString, TestRun: '' as IntlString, TestNamePlaceholder: '' as IntlString, ChooseIcon: '' as IntlString, NoTestSuite: '' as IntlString, StatusDraft: '' as IntlString, StatusReview: '' as IntlString, StatusReviewComments: '' as IntlString, StatusApproved: '' as IntlString, StatusRejected: '' as IntlString, SetStatus: '' as IntlString, Assignee: '' as IntlString, Unassigned: '' as IntlString, AssignTo: '' as IntlString, AssignedTo: '' as IntlString, PreviousAssigned: '' as IntlString, TestRunName: '' as IntlString, NoTestCases: '' as IntlString, DueDate: '' as IntlString, TestRunStatus: '' as IntlString, TestRunNamePlaceholder: '' as IntlString, TestRunResult: '' as IntlString, SelectTestSuites: '' as IntlString, SelectTestCases: '' as IntlString, CreateTestRun: '' as IntlString, TestLibrary: '' as IntlString, TestResult: '' as IntlString, StatusNonTested: '' as IntlString, StatusBlocked: '' as IntlString, StatusPassed: '' as IntlString, StatusFailed: '' as IntlString, SelectTestCase: '' as IntlString, Save: '' as IntlString, SaveAndNext: '' as IntlString, DonePercent: '' as IntlString, TestResults: '' as IntlString, RunTestCases: '' as IntlString, TestCaseDescription: '' as IntlString, TestResultAttributes: '' as IntlString, GoToNextTest: '' as IntlString, GoToNextTestTooltip: '' as IntlString, AllTests: '' as IntlString, MyTests: '' as IntlString, Comments: '' as IntlString, Cancel: '' as IntlString, TestPlans: '' as IntlString, TestPlan: '' as IntlString, Name: '' as IntlString, CreateTestPlan: '' as IntlString, SelectedTestCases: '' as IntlString, DefaultAssignee: '' as IntlString, TestPlanTitle: '' as IntlString, RunAssistant: '' as IntlString }, category: { TestManagement: '' as Ref }, component: { TestCaseSearchIcon: '' as AnyComponent, TestCases: '' as AnyComponent, CreateProject: '' as AnyComponent, TestManagementSpaceHeader: '' as AnyComponent, TestCaseStatusIcon: '' as AnyComponent, PriorityIconPresenter: '' as AnyComponent, TestCaseStatusPresenter: '' as AnyComponent, TestSuites: '' as AnyComponent, CreateTestSuite: '' as AnyComponent, TestRunFromSelection: '' as AnyComponent, TestResultStatusPresenter: '' as AnyComponent, TestResultStatusEditor: '' as AnyComponent, TestRunResult: '' as AnyComponent, TestResultHeader: '' as AnyComponent, TestRunner: '' as AnyComponent, NewTestRunPanel: '' as AnyComponent, NewTestPlanPanel: '' as AnyComponent }, ids: { NoParent: '' as Ref, TestCaseUpdatedActivityViewlet: '' as Ref, NoTestRun: '' as Ref, NewTestRun: '' as Ref, NoTestPlan: '' as Ref, NewTestPlan: '' as Ref }, mode: { AllTests: '' as IntlString, MyTests: '' as IntlString }, spaceType: { TestCaseType: '' as Ref, DefaultProject: '' as Ref }, spaceTypeDescriptor: { TestCaseType: '' as Ref }, template: { DefaultProject: '' as Ref }, space: { DefaultProject: '' as Ref }, viewlet: { TableTestCase: '' as Ref, TableTestSuites: '' as Ref, ListTestCase: '' as Ref, TestResultList: '' as Ref, TableTestResult: '' as Ref, TestPlanItemsList: '' as Ref, TableTestPlanItems: '' as Ref }, testCaseTypeStatus: { Draft: '' as Ref, ReviewRequired: '' as Ref, NeedFixes: '' as Ref, Ready: '' as Ref }, taskType: { TestCase: '' as Ref }, function: { GetTestSuiteLink: '' as Resource<(doc: Ref) => Location>, GetTestRunLink: '' as Resource<(doc: Ref) => Location>, GetTestPlanLink: '' as Resource<(doc: Ref) => Location> }, resolver: { Location: '' as Resource<(loc: Location) => Promise> } }) /** * @public */ export default testManagementPlugin