From f1fb3cac12543e08450116296ba7766c05541545 Mon Sep 17 00:00:00 2001 From: stanislavchalapko Date: Fri, 8 Mar 2024 20:58:42 +0200 Subject: [PATCH] set more time for timeout fix tests --- pages/dashboard/dashboard-page.js | 3 ++- pages/workspace/layers-panel-page.js | 2 +- playwright.config.js | 2 +- tests/assets/library-backup-page.spec.js | 4 +++- .../main-components/flext-layout-cases.spec.js | 12 +++++++----- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/pages/dashboard/dashboard-page.js b/pages/dashboard/dashboard-page.js index 0276770d..d95b2a86 100644 --- a/pages/dashboard/dashboard-page.js +++ b/pages/dashboard/dashboard-page.js @@ -61,7 +61,7 @@ exports.DashboardPage = class DashboardPage extends BasePage { 'div[class*="project-th-icon"] svg', ); this.headerOptionsMenuButton = page.locator( - 'div[class*="dashboard-header-actions"] svg[class="icon-actions"]', + 'div[title="Options"] svg[class*="files__menu-icon"]', ); //Projects @@ -539,6 +539,7 @@ exports.DashboardPage = class DashboardPage extends BasePage { await this.moveToOtherTeamMenuItem.click(); await this.page.locator(`li[role="menuitem"] a:has-text("${otherTeamName}")`).click(); await this.page.locator(`li[role="menuitem"] a:has-text("Drafts")`).click(); + await this.page.locator(`input[value="Move"]`).click(); } async addFileWithNameAsSharedLibraryViaRightClick(fileName) { diff --git a/pages/workspace/layers-panel-page.js b/pages/workspace/layers-panel-page.js index 09061a54..fbef8248 100644 --- a/pages/workspace/layers-panel-page.js +++ b/pages/workspace/layers-panel-page.js @@ -34,7 +34,7 @@ exports.LayersPanelPage = class LayersPanelPage extends BasePage { this.searchedLayerOnLayersPanelNameText = page.locator( 'span[class*="element-name"] >> nth=1', ); - this.layoutIcon = page.locator('svg.icon-flex-vertical-refactor'); + this.layoutIcon = page.locator('svg.icon-gap-vertical-refactor'); this.focusModeDiv = page.locator('div.focus-mode:text-is("Focus mode")'); this.layerItemToggleExpand = page.locator( 'div[class*="layers__element-list"] button[class*="sidebar_layer_item__inverse"]', diff --git a/playwright.config.js b/playwright.config.js index cfad742b..59d996b6 100644 --- a/playwright.config.js +++ b/playwright.config.js @@ -18,7 +18,7 @@ const config = { * Maximum time expect() should wait for the condition to be met. * For example in `await expect(locator).toHaveText();` */ - timeout: 5000, + timeout: 10000, toMatchSnapshot: { maxDiffPixelRatio: 0.01, }, diff --git a/tests/assets/library-backup-page.spec.js b/tests/assets/library-backup-page.spec.js index be5bb005..fcc4c7de 100644 --- a/tests/assets/library-backup-page.spec.js +++ b/tests/assets/library-backup-page.spec.js @@ -107,7 +107,7 @@ test.describe(() => { mainTest( 'PENPOT-1372 Restore components, that were deleted from library backup', - async ({ page, browserName }) => { + async ({ browserName }) => { await mainPage.clickShortcutCtrlZ(browserName); await expect(mainPage.viewport).toHaveScreenshot( 'restored-main-component-library-backup.png', @@ -144,6 +144,8 @@ mainTest( mainTest( 'PENPOT-1516 Check Library backup file in case of unpublishing a few shared libraries', async () => { + await testInfo.setTimeout(testInfo.timeout + 20000); + await mainPage.clickPencilBoxButton(); await dashboardPage.isHeaderDisplayed('Projects'); await dashboardPage.isFileVisibleByName('New File 2'); diff --git a/tests/components/main-components/flext-layout-cases.spec.js b/tests/components/main-components/flext-layout-cases.spec.js index 17562243..66520a29 100644 --- a/tests/components/main-components/flext-layout-cases.spec.js +++ b/tests/components/main-components/flext-layout-cases.spec.js @@ -25,7 +25,7 @@ test.beforeEach(async ({ page }) => { await mainPage.isMainPageLoaded(); }); -test.afterEach(async ({ page }) => { +test.afterEach(async () => { await mainPage.backToDashboardFromFileEditor(); await teamPage.deleteTeam(teamName); }); @@ -65,7 +65,7 @@ test.describe(() => { mainTest( 'PENPOT-1503 Create flex board with main component and its copy, change direction', - async ({ page }) => { + async () => { await layersPanelPage.isLayoutIconVisibleOnLayer(); await mainPage.clickCreatedBoardTitleOnCanvas(); await designPanelPage.changeLayoutDirection('Column'); @@ -77,7 +77,7 @@ test.describe(() => { mainTest( 'PENPOT-1504 Create flex board with main component and its copy, change alingment', - async ({ page }) => { + async () => { await layersPanelPage.isLayoutIconVisibleOnLayer(); await mainPage.clickCreatedBoardTitleOnCanvas(); await designPanelPage.changeLayoutAlignment('Center'); @@ -106,7 +106,9 @@ test.describe(() => { mainTest( 'PENPOT-1511 Create component with 2 boards with components inside it. change paddings', - async ({ page }) => { + async () => { + await testInfo.setTimeout(testInfo.timeout + 20000); + await mainPage.clickCreatedBoardTitleOnCanvas(); await designPanelPage.changeAxisXandYForLayer('600', '200'); @@ -144,7 +146,7 @@ test.describe(() => { mainTest( 'PENPOT-1514 Create component inside flex board, change alignment for element', - async ({ page }) => { + async () => { await mainPage.clickCreatedBoardTitleOnCanvas(); await designPanelPage.changeLayoutAlignment('Center'); await mainPage.waitForChangeIsSaved();