From 538f4cc61da563d78f0000d7c7a24e75335cc4d0 Mon Sep 17 00:00:00 2001 From: Sergei Ogorelkov Date: Wed, 15 Jun 2022 10:01:21 +0700 Subject: [PATCH] Tracker: add priority to sub-issues (#2054) Signed-off-by: Sergei Ogorelkov --- .../src/components/CreateIssue.svelte | 25 ++++++++++--------- .../components/issues/PriorityEditor.svelte | 19 +++++++------- .../issues/edit/CreateSubIssue.svelte | 11 ++++++++ .../issues/edit/SubIssueList.svelte | 4 +++ tests/readme.md | 4 +-- tests/sanity/tests/tracker.spec.ts | 8 +++--- 6 files changed, 44 insertions(+), 27 deletions(-) diff --git a/plugins/tracker-resources/src/components/CreateIssue.svelte b/plugins/tracker-resources/src/components/CreateIssue.svelte index fe90ee0333..ecf6e003a1 100644 --- a/plugins/tracker-resources/src/components/CreateIssue.svelte +++ b/plugins/tracker-resources/src/components/CreateIssue.svelte @@ -33,11 +33,11 @@ import tracker from '../plugin' import AssigneeEditor from './issues/AssigneeEditor.svelte' import ParentIssue from './issues/ParentIssue.svelte' - import StatusEditor from './issues/StatusEditor.svelte' - import PrioritySelector from './PrioritySelector.svelte' + import SetParentIssueActionPopup from './SetParentIssueActionPopup.svelte' import ProjectSelector from './ProjectSelector.svelte' import SetDueDateActionPopup from './SetDueDateActionPopup.svelte' - import SetParentIssueActionPopup from './SetParentIssueActionPopup.svelte' + import StatusEditor from './issues/StatusEditor.svelte' + import PriorityEditor from './issues/PriorityEditor.svelte' export let space: Ref export let status: Ref | undefined = undefined @@ -194,14 +194,6 @@ ) } - const handlePriorityChanged = (newPriority: IssuePriority | undefined) => { - if (newPriority === undefined) { - return - } - - object.priority = newPriority - } - const handleProjectIdChanged = (projectId: Ref | null | undefined) => { if (projectId === undefined) { return @@ -265,7 +257,16 @@ shouldShowLabel={true} on:change={({ detail }) => (object.status = detail)} /> - + (object.priority = detail)} + /> diff --git a/plugins/tracker-resources/src/components/issues/edit/CreateSubIssue.svelte b/plugins/tracker-resources/src/components/issues/edit/CreateSubIssue.svelte index 861ae993d1..6c09b5ce3c 100644 --- a/plugins/tracker-resources/src/components/issues/edit/CreateSubIssue.svelte +++ b/plugins/tracker-resources/src/components/issues/edit/CreateSubIssue.svelte @@ -22,6 +22,7 @@ import tracker from '../../../plugin' import AssigneeEditor from '../AssigneeEditor.svelte' import StatusEditor from '../StatusEditor.svelte' + import PriorityEditor from '../PriorityEditor.svelte' export let parentIssue: Issue export let issueStatuses: WithLookup[] @@ -133,6 +134,16 @@
+ (newIssue.priority = detail)} + /> [] @@ -92,6 +93,9 @@
+
+ +
openIssue(issue)}> {getIssueId(currentTeam, issue)} diff --git a/tests/readme.md b/tests/readme.md index 90e76353a7..7eca491791 100644 --- a/tests/readme.md +++ b/tests/readme.md @@ -15,7 +15,7 @@ rush docker:build To purge content of sanity workspace following command could be used. ```bash -./restore-workdspace.sh +./restore-workspace.sh ``` ## Prepare local dev enviornment @@ -55,7 +55,7 @@ rushx dev-debug -g test-name # for local setup ```bash rushx codegen # for docker setup -ruwhx dev-codegen # for local setup +rushx dev-codegen # for local setup ``` ## Test authoring. diff --git a/tests/sanity/tests/tracker.spec.ts b/tests/sanity/tests/tracker.spec.ts index 68a2ab4114..8104d0e5c9 100644 --- a/tests/sanity/tests/tracker.spec.ts +++ b/tests/sanity/tests/tracker.spec.ts @@ -18,15 +18,17 @@ test('create-issue-and-sub-issue', async ({ page }) => { await page.click('button:has-text("Save issue")') await page.click('.antiNav-element__dropbox :text("Issues")') - await page.click('.listGrid :has-text("test-issue") span') + await page.click('.antiList__row :has-text("test-issue") .issuePresenter') await page.click('#add-sub-issue') await page.click('[placeholder="Issue\\ title"]') await page.fill('[placeholder="Issue\\ title"]', 'sub-issue') await page.fill('.ProseMirror', 'sub-issue description') await page.click('#status-editor') - await page.click('button:has-text("In Progress")') - await page.click('button:has-text("Assignee")') + await page.click('.selectPopup button:has-text("In Progress")') + await page.click('.button:has-text("Assignee")') await page.click('.selectPopup button:has-text("John Appleseed")') + await page.click('button:has-text("No priority")') + await page.click('.selectPopup button:has-text("High")') await page.click('button:has-text("Save")') await page.click('span.name:text("sub-issue")') })