diff --git a/tests/sanity/tests/model/tracker/common-tracker-page.ts b/tests/sanity/tests/model/tracker/common-tracker-page.ts index d869804aab..85e814b3d9 100644 --- a/tests/sanity/tests/model/tracker/common-tracker-page.ts +++ b/tests/sanity/tests/model/tracker/common-tracker-page.ts @@ -11,6 +11,7 @@ export class CommonTrackerPage extends CalendarPage { readonly buttonSpaceSelectorMoveIssuesModal: Locator readonly buttonMoveIssuesModal: Locator readonly buttonKeepOriginalMoveIssuesModal: Locator + readonly inputKeepOriginalMoveIssuesModal: Locator constructor (page: Page) { super(page) @@ -25,6 +26,7 @@ export class CommonTrackerPage extends CalendarPage { ) this.buttonMoveIssuesModal = page.locator('form[id="tracker:string:MoveIssues"] button[type="submit"]') this.buttonKeepOriginalMoveIssuesModal = page.locator('form[id="tracker:string:MoveIssues"] span.toggle-switch') + this.inputKeepOriginalMoveIssuesModal = page.locator('form[id="tracker:string:MoveIssues"] input[type="checkbox"]') } async selectFilter (filter: string, filterSecondLevel?: string): Promise { @@ -91,9 +93,11 @@ export class CommonTrackerPage extends CalendarPage { async fillMoveIssuesModal (newProjectName: string, keepOriginalAttributes: boolean = false): Promise { await this.buttonSpaceSelectorMoveIssuesModal.click() await this.selectMenuItem(this.page, newProjectName) + if (keepOriginalAttributes) { await this.buttonKeepOriginalMoveIssuesModal.click() } - await this.buttonMoveIssuesModal.click({ timeout: 100 }) + + await this.buttonMoveIssuesModal.click({ delay: 1000 }) } } diff --git a/tests/sanity/tests/tracker/tracker.spec.ts b/tests/sanity/tests/tracker/tracker.spec.ts index 9df4f32fd4..807895dc3e 100644 --- a/tests/sanity/tests/tracker/tracker.spec.ts +++ b/tests/sanity/tests/tracker/tracker.spec.ts @@ -94,6 +94,9 @@ test.describe('Tracker tests', () => { await navigate(page) await createIssue(page, { name }) await page.click('text="My issues"') + const issuesPage = new IssuesPage(page) + await issuesPage.searchIssueByName(name) + await page.click('[data-id="tab-assigned"]') await expect(page.locator('.antiPanel-component')).not.toContainText(name) await page.click('[data-id="tab-created"]')