From 8941477ea99c62650056415c90515e3a74e18a1c Mon Sep 17 00:00:00 2001 From: Ivan Nikitin Date: Thu, 30 Mar 2023 11:45:34 +1100 Subject: [PATCH] fix: Update project directory create project button selector --- test/e2e/utils/jira.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/e2e/utils/jira.ts b/test/e2e/utils/jira.ts index c31e8b55d2..b1f1c33750 100644 --- a/test/e2e/utils/jira.ts +++ b/test/e2e/utils/jira.ts @@ -62,7 +62,12 @@ export const jiraAppUninstall = async (page: Page): Promise => { export const jiraAddProject = async (page: Page): Promise => { await page.goto(data.urls.projects); - await (page.locator("button[data-test-id='global-pages.directories.projects-directory-v2.create-projects-button.button.button']")).click(); + const createProjectButtonV3 = page.locator("button[data-testid='global-pages.directories.projects-directory-v3.create-projects-button']"); + if (await createProjectButtonV3.isVisible()) { + createProjectButtonV3.click() + } else { + await (page.locator("button[data-test-id='global-pages.directories.projects-directory-v2.create-projects-button.button.button']")).click(); + } await (page.locator("button[aria-label='Scrum']")).click(); await (page.locator("button[data-testid='project-template-select-v2.ui.layout.screens.template-overview.template-overview-card.use-template-button.button']")).click(); await (page.locator("button[data-testid='project-template-select-v2.ui.layout.screens.project-types.footer.select-project-button-team-managed']")).click();