From 0a7faafa2e47fd1e83ea403cbae279825606a676 Mon Sep 17 00:00:00 2001 From: Alex Velichko Date: Wed, 29 Nov 2023 20:50:03 +0300 Subject: [PATCH] TESTS: feat(tests): updated flaky tests (#4106) Signed-off-by: Alex Velichko --- tests/sanity/tests/actions.spec.ts | 7 ++++++- tests/sanity/tests/collaborative/issues.spec.ts | 7 +++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/sanity/tests/actions.spec.ts b/tests/sanity/tests/actions.spec.ts index 4b2ee3fbd6..c5b3a007a8 100644 --- a/tests/sanity/tests/actions.spec.ts +++ b/tests/sanity/tests/actions.spec.ts @@ -34,7 +34,12 @@ test.describe('actions tests', () => { await expect(page).toHaveURL(`${PlatformURI}/workbench/sanity-ws/recruit/talents`) await page.press('body', 'Meta+k') - await page.fill('[placeholder="Search\\ or\\ run\\ a\\ command\\.\\.\\."]', 'go to') + + await expect(page.locator('input.actionsInput')).toBeVisible() + await expect(page.locator('div.actionsitem div', { hasText: 'Merge contacts' })).toBeVisible() + + await page.click('div.actionsHeader input.actionsInput') + await page.type('div.actionsHeader input.actionsInput', 'go to ') expect(await page.locator('div.selectPopup :text("Go To Vacancies")').count()).toBe(1) await page.click('div.selectPopup :text("Go To Vacancies")') diff --git a/tests/sanity/tests/collaborative/issues.spec.ts b/tests/sanity/tests/collaborative/issues.spec.ts index 44729de03a..4258d234a7 100644 --- a/tests/sanity/tests/collaborative/issues.spec.ts +++ b/tests/sanity/tests/collaborative/issues.spec.ts @@ -37,10 +37,6 @@ test.describe('Collaborative test for issue', () => { const userSecondPage = await getSecondPage(browser) await (await userSecondPage.goto(`${PlatformURI}/workbench/sanity-ws/tracker/`))?.finished() - const issuesPageSecond = new IssuesPage(userSecondPage) - await issuesPageSecond.linkSidebarAll.click() - await issuesPageSecond.modelSelectorAll.click() - // create a new issue by first user await (await page.goto(`${PlatformURI}/workbench/sanity-ws/tracker/`))?.finished() const leftSideMenuPage = new LeftSideMenuPage(page) @@ -54,6 +50,9 @@ test.describe('Collaborative test for issue', () => { await issuesPage.openIssueByName(newIssue.title) // check created issued by second user + const issuesPageSecond = new IssuesPage(userSecondPage) + await issuesPageSecond.linkSidebarAll.click() + await issuesPageSecond.modelSelectorAll.click() await issuesPageSecond.searchIssueByName(newIssue.title) await issuesPageSecond.openIssueByName(newIssue.title)