diff --git a/pages/base-page.js b/pages/base-page.js index d900445f..16e3b7ca 100644 --- a/pages/base-page.js +++ b/pages/base-page.js @@ -210,7 +210,7 @@ exports.BasePage = class BasePage { } async isHeaderDisplayed(title) { - await expect(this.header).toHaveText(title); + await expect(this.header).toHaveText(title, { timeout: 20000 }); } async isSuccessMessageDisplayed(message) { diff --git a/pages/dashboard/dashboard-page.js b/pages/dashboard/dashboard-page.js index 6d4cc6ff..98d60079 100644 --- a/pages/dashboard/dashboard-page.js +++ b/pages/dashboard/dashboard-page.js @@ -518,7 +518,7 @@ exports.DashboardPage = class DashboardPage extends BasePage { await expect(this.modalTitle).toBeVisible(); await expect(this.modalTitle).toHaveText('Import Penpot files'); await this.modalAcceptButton.click(); - await this.feedbackBannerMessage.waitFor({timeout:30000}); + await this.feedbackBannerMessage.waitFor({timeout:60000}); await expect(this.feedbackBannerMessage).toHaveText( '1 file has been imported successfully.', ); @@ -884,4 +884,8 @@ exports.DashboardPage = class DashboardPage extends BasePage { async checkPageNumber(number) { await expect(this.onboardingPaginator).toHaveText(`${number}/5`); } + + async waitForCreateFilePlaceholderVisible() { + await this.createFileButtonPlaceholder.first().waitFor({ state: 'visible' }); + } }; diff --git a/pages/dashboard/team-page.js b/pages/dashboard/team-page.js index 7c85cc28..ab6de121 100644 --- a/pages/dashboard/team-page.js +++ b/pages/dashboard/team-page.js @@ -10,6 +10,7 @@ exports.TeamPage = class TeamPage extends BasePage { // Teams this.teamCurrentBtn = page.locator('button[class*="current-team"]'); + this.teamCurrentBtnWebkit = page.locator('button[class*="current-team"] div span').first(); this.teamList = page.locator('ul[class*="teams-dropdown"]'); this.createNewTeamMenuItem = page.locator('#teams-selector-create-team'); this.teamNameInput = page.locator('#name'); @@ -111,8 +112,14 @@ exports.TeamPage = class TeamPage extends BasePage { await this.createNewTeamButton.click(); } - async isTeamSelected(teamName) { - await expect(this.teamCurrentBtn).toHaveText(teamName); + async isTeamSelected(teamName, browserName = 'chrome') { + browserName === 'webkit' + ? await expect(this.teamCurrentBtnWebkit).toHaveText(teamName) + : await expect(this.teamCurrentBtn).toHaveText(teamName); + } + + async waitForTeamBtn(timeout = 10000) { + await this.teamCurrentBtnWebkit.waitFor({ state: 'visible' , timeout: timeout}); } async openTeamsListIfClosed() { diff --git a/pages/workspace/layers-panel-page.js b/pages/workspace/layers-panel-page.js index 823a89dd..28873dc9 100644 --- a/pages/workspace/layers-panel-page.js +++ b/pages/workspace/layers-panel-page.js @@ -38,7 +38,6 @@ exports.LayersPanelPage = class LayersPanelPage extends BasePage { 'span[class*="element-name"] >> nth=1', ); this.layoutIcon = page.locator('svg.icon-flex-vertical'); - // 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/pages/workspace/main-page.js b/pages/workspace/main-page.js index aa8699c1..a1434b64 100644 --- a/pages/workspace/main-page.js +++ b/pages/workspace/main-page.js @@ -338,6 +338,16 @@ exports.MainPage = class MainPage extends BasePage { await expect(this.viewport).toBeVisible(); } + async isMainPageVisible() { + try { + await this.viewport.waitFor({ state: 'visible' , timeout: 8000}); + return true; + } catch (error) { + console.log(error); + return false; + } + } + async isProjectAndFileNameExistInFile(projectName, fileName) { await expect(this.projectNameSpan).toContainText(projectName); await expect(this.fileNameSpan.last()).toHaveText(fileName); @@ -676,8 +686,10 @@ exports.MainPage = class MainPage extends BasePage { await expect(this.firstPageListItem).toHaveText(name); } - async isSecondPageAddedToAssetsPanel() { - await expect(this.secondPageListItem).toBeVisible(); + async isSecondPageAddedToAssetsPanel(added = true) { + added + ? await expect(this.secondPageListItem).toBeVisible() + : await expect(this.secondPageListItem).not.toBeVisible(); } async isSecondPageNameDisplayed(name) { @@ -816,9 +828,7 @@ exports.MainPage = class MainPage extends BasePage { await this.clickViewportByCoordinates(1200, 700); await this.clickViewportByCoordinates(1000, 400); await this.clickViewportByCoordinates(500, 200); - await this.clickOnDesignTab(); // todo: need to remove after issue fix - // await this.clickOnMainToolBar(); //todo bug 6171 > need to uncomment after fix these 2 rows - // await this.clickMoveButton(); + await this.clickOnDesignTab(); await this.waitForChangeIsSaved(); } @@ -829,9 +839,6 @@ exports.MainPage = class MainPage extends BasePage { await this.clickViewportByCoordinates(1000, 400); await this.clickMoveNodesButtonOnNodePanel(); await this.clickDrawNodesButtonOnNodePanel(); - // await this.clickOnDesignTab(); // todo: need to remove after issue fix - // await this.clickOnMainToolBar(); //todo bug 6171 > need to uncomment after fix these 2 rows - // await this.clickMoveButton(); await this.waitForChangeIsSaved(); } @@ -860,7 +867,7 @@ exports.MainPage = class MainPage extends BasePage { if (platform === 'darwin') { await this.typeTextFromKeyboard(); } else if(browserName === 'webkit') { - await this.page.waitForTimeout(400); + await this.page.waitForTimeout(2000); await this.typeTextFromKeyboard(); } else { await this.typeText('Hello World!'); diff --git a/pages/workspace/view-mode-page.js b/pages/workspace/view-mode-page.js index 72857042..576b4906 100644 --- a/pages/workspace/view-mode-page.js +++ b/pages/workspace/view-mode-page.js @@ -281,6 +281,10 @@ exports.ViewModePage = class ViewModePage extends BasePage { : await expect(this.viewerLoyautSection).not.toBeVisible(); } + async waitForViewerSection(timeout = 10000) { + await this.viewerLoyautSection.waitFor({ state: 'visible' , timeout: timeout}); + } + async clickDestroyLincButton() { await this.destroyLincButton.click(); await this.destroyLincButton.click(); diff --git a/tests/assets/assets-colors.spec.js b/tests/assets/assets-colors.spec.js index ec0a4d82..ff8f1363 100644 --- a/tests/assets/assets-colors.spec.js +++ b/tests/assets/assets-colors.spec.js @@ -12,13 +12,16 @@ const { qase } = require('playwright-qase-reporter/dist/playwright'); const teamName = random().concat('autotest'); -test.beforeEach(async ({ page }) => { +test.beforeEach(async ({ page, browserName }) => { const teamPage = new TeamPage(page); const dashboardPage = new DashboardPage(page); const mainPage = new MainPage(page); await teamPage.createTeam(teamName); await teamPage.isTeamSelected(teamName); await dashboardPage.createFileViaPlaceholder(); + browserName === 'webkit' && !( await mainPage.isMainPageVisible()) + ? await dashboardPage.createFileViaPlaceholder() + : null; await mainPage.isMainPageLoaded(); }); @@ -48,7 +51,7 @@ mainTest.describe(() => { await colorPalettePopUp.clickSaveColorStyleButton(); await mainPage.clickViewportTwice(); await mainPage.waitForChangeIsSaved(); - }); + }); mainTest(qase(933,'AS-23 File library colors - add'), async ({ page }) => { const assetsPanelPage = new AssetsPanelPage(page); diff --git a/tests/assets/assets-shortcuts-panel.spec.js b/tests/assets/assets-shortcuts-panel.spec.js index 4937478e..06ad3f77 100644 --- a/tests/assets/assets-shortcuts-panel.spec.js +++ b/tests/assets/assets-shortcuts-panel.spec.js @@ -9,13 +9,16 @@ const { qase } = require('playwright-qase-reporter/dist/playwright'); const teamName = random().concat('autotest'); -test.beforeEach(async ({ page }) => { +test.beforeEach(async ({ page, browserName }) => { const teamPage = new TeamPage(page); const dashboardPage = new DashboardPage(page); const mainPage = new MainPage(page); await teamPage.createTeam(teamName); await teamPage.isTeamSelected(teamName); await dashboardPage.createFileViaPlaceholder(); + browserName === 'webkit' && !( await mainPage.isMainPageVisible()) + ? await dashboardPage.createFileViaPlaceholder() + : null; await mainPage.isMainPageLoaded(); }); diff --git a/tests/assets/shared-libraries.spec.js b/tests/assets/shared-libraries.spec.js index 1501d740..7020877d 100644 --- a/tests/assets/shared-libraries.spec.js +++ b/tests/assets/shared-libraries.spec.js @@ -14,7 +14,7 @@ const { qase } = require('playwright-qase-reporter/dist/playwright'); const teamName = random().concat('autotest'); let dashboardPage, teamPage, mainPage, assetsPanelPage, designPanelPage, layersPanelPage, colorPalettePage; -test.beforeEach(async ({ page }) => { +mainTest.beforeEach(async ({ page }) => { dashboardPage = new DashboardPage(page); teamPage = new TeamPage(page); mainPage = new MainPage(page); @@ -27,7 +27,7 @@ test.beforeEach(async ({ page }) => { await mainPage.isMainPageLoaded(); }); -test.afterEach(async ({}, testInfo) => { +mainTest.afterEach(async ({}, testInfo) => { await teamPage.deleteTeam(teamName); await updateTestResults(testInfo.status, testInfo.retry) }); @@ -465,8 +465,8 @@ mainTest.describe(() => { }); }); -test.describe(() => { - test.beforeEach(async ({ page }, testInfo) => { +mainTest.describe(() => { + mainTest.beforeEach(async ({ page }, testInfo) => { await testInfo.setTimeout(testInfo.timeout + 30000); await mainPage.createDefaultRectangleByCoordinates(200, 200); await mainPage.createComponentViaRightClick(); @@ -521,48 +521,39 @@ test.describe(() => { await dashboardPage.checkNumberOfFiles('3 files'); }); - // mainTest( - // qase(1092,'PENPOT-1092 Delete library which is used by a few files ( 1 library in a few files)'), - // async () => { - // await dashboardPage.deleteFileWithNameViaRightClick('New File 1'); - // await expect(dashboardPage.deleteFileModalWindow).toHaveScreenshot( - // 'library-delete-warning.png', - // ); - // await dashboardPage.clickDeleteFileButton(); - // - // await dashboardPage.openFileWithName('New File 2'); - // await mainPage.isSecondPageNameDisplayed('Main components'); - // await mainPage.clickOnPageOnLayersPanel(false); - // await expect(layersPanelPage.layersSidebar).toHaveScreenshot( - // 'library-backup-layers.png', - // ); - // await expect(mainPage.viewport).toHaveScreenshot( - // 'library-backup-viewport.png', - // ); - // await assetsPanelPage.clickAssetsTab(); - // await expect(assetsPanelPage.assetsPanel).toHaveScreenshot( - // 'library-backup-assets.png', - // ); - // await mainPage.clickPencilBoxButton(); - // await dashboardPage.isHeaderDisplayed('Projects'); - // - // await dashboardPage.openFileWithName('New File 3'); - // await mainPage.isSecondPageNameDisplayed('Main components'); - // await mainPage.clickOnPageOnLayersPanel(false); - // await expect(layersPanelPage.layersSidebar).toHaveScreenshot( - // 'library-backup-layers.png', - // ); - // await expect(mainPage.viewport).toHaveScreenshot( - // 'library-backup-viewport.png', - // ); - // await assetsPanelPage.clickAssetsTab(); - // await expect(assetsPanelPage.assetsPanel).toHaveScreenshot( - // 'library-backup-assets.png', - // ); - // }, - // ); - - test.afterEach(async () => { + mainTest( + qase(1092,'PENPOT-1092 Delete library which is used by a few files ( 1 library in a few files)'), + async () => { + await dashboardPage.deleteFileWithNameViaRightClick('New File 1'); + await expect(dashboardPage.deleteFileModalWindow).toHaveScreenshot( + 'library-delete-warning.png', + ); + await dashboardPage.clickDeleteFileButton(); + + await dashboardPage.openFileWithName('New File 2'); + await mainPage.isSecondPageAddedToAssetsPanel(false); + await expect(layersPanelPage.layersSidebar).toHaveScreenshot( + 'library-without-library-layers.png', + ); + await expect(mainPage.viewport).toHaveScreenshot( + 'library-without-library-viewport.png', + ); + + await mainPage.clickPencilBoxButton(); + await dashboardPage.isHeaderDisplayed('Projects'); + + await dashboardPage.openFileWithName('New File 3'); + await mainPage.isSecondPageAddedToAssetsPanel(false); + await expect(layersPanelPage.layersSidebar).toHaveScreenshot( + 'library-without-library-layers.png', + ); + await expect(mainPage.viewport).toHaveScreenshot( + 'library-without-library-viewport.png', + ); + }, + ); + + mainTest.afterEach(async () => { await mainPage.backToDashboardFromFileEditor(); }); }); diff --git a/tests/assets/shared-libraries.spec.js-snapshots/win32/chrome/library-without-library-layers.png b/tests/assets/shared-libraries.spec.js-snapshots/win32/chrome/library-without-library-layers.png new file mode 100644 index 00000000..adf005f1 Binary files /dev/null and b/tests/assets/shared-libraries.spec.js-snapshots/win32/chrome/library-without-library-layers.png differ diff --git a/tests/assets/shared-libraries.spec.js-snapshots/win32/chrome/library-without-library-viewport.png b/tests/assets/shared-libraries.spec.js-snapshots/win32/chrome/library-without-library-viewport.png new file mode 100644 index 00000000..4732168c Binary files /dev/null and b/tests/assets/shared-libraries.spec.js-snapshots/win32/chrome/library-without-library-viewport.png differ diff --git a/tests/assets/shared-libraries.spec.js-snapshots/win32/firefox/library-without-library-layers.png b/tests/assets/shared-libraries.spec.js-snapshots/win32/firefox/library-without-library-layers.png new file mode 100644 index 00000000..924b230d Binary files /dev/null and b/tests/assets/shared-libraries.spec.js-snapshots/win32/firefox/library-without-library-layers.png differ diff --git a/tests/assets/shared-libraries.spec.js-snapshots/win32/firefox/library-without-library-viewport.png b/tests/assets/shared-libraries.spec.js-snapshots/win32/firefox/library-without-library-viewport.png new file mode 100644 index 00000000..5477e29b Binary files /dev/null and b/tests/assets/shared-libraries.spec.js-snapshots/win32/firefox/library-without-library-viewport.png differ diff --git a/tests/components/main-components/component-grid-layout.spec.js-snapshots/win32/webkit/component-annotation-disabled.png b/tests/components/main-components/component-grid-layout.spec.js-snapshots/win32/webkit/component-annotation-disabled.png index 9a3dbcf2..dffd4862 100644 Binary files a/tests/components/main-components/component-grid-layout.spec.js-snapshots/win32/webkit/component-annotation-disabled.png and b/tests/components/main-components/component-grid-layout.spec.js-snapshots/win32/webkit/component-annotation-disabled.png differ diff --git a/tests/components/main-components/component-grid-layout.spec.js-snapshots/win32/webkit/component-annotation-edit.png b/tests/components/main-components/component-grid-layout.spec.js-snapshots/win32/webkit/component-annotation-edit.png index 536db930..e9765f1f 100644 Binary files a/tests/components/main-components/component-grid-layout.spec.js-snapshots/win32/webkit/component-annotation-edit.png and b/tests/components/main-components/component-grid-layout.spec.js-snapshots/win32/webkit/component-annotation-edit.png differ diff --git a/tests/components/main-components/component-grid-layout.spec.js-snapshots/win32/webkit/component-annotation.png b/tests/components/main-components/component-grid-layout.spec.js-snapshots/win32/webkit/component-annotation.png index 74882615..d1204c04 100644 Binary files a/tests/components/main-components/component-grid-layout.spec.js-snapshots/win32/webkit/component-annotation.png and b/tests/components/main-components/component-grid-layout.spec.js-snapshots/win32/webkit/component-annotation.png differ diff --git a/tests/components/main-components/component-grid-layout.spec.js-snapshots/win32/webkit/empty-board-component-with-grid-layout.png b/tests/components/main-components/component-grid-layout.spec.js-snapshots/win32/webkit/empty-board-component-with-grid-layout.png new file mode 100644 index 00000000..c1cf053b Binary files /dev/null and b/tests/components/main-components/component-grid-layout.spec.js-snapshots/win32/webkit/empty-board-component-with-grid-layout.png differ diff --git a/tests/components/main-components/context-menu-options.spec.js-snapshots/win32/webkit/component-annotation-edit.png b/tests/components/main-components/context-menu-options.spec.js-snapshots/win32/webkit/component-annotation-edit.png index a89d16b7..dc047efc 100644 Binary files a/tests/components/main-components/context-menu-options.spec.js-snapshots/win32/webkit/component-annotation-edit.png and b/tests/components/main-components/context-menu-options.spec.js-snapshots/win32/webkit/component-annotation-edit.png differ diff --git a/tests/components/main-components/context-menu-options.spec.js-snapshots/win32/webkit/component-annotation.png b/tests/components/main-components/context-menu-options.spec.js-snapshots/win32/webkit/component-annotation.png index 5649dd5b..26a8d4bd 100644 Binary files a/tests/components/main-components/context-menu-options.spec.js-snapshots/win32/webkit/component-annotation.png and b/tests/components/main-components/context-menu-options.spec.js-snapshots/win32/webkit/component-annotation.png differ diff --git a/tests/components/main-components/context-menu-options.spec.js-snapshots/win32/webkit/copy-component-annotation.png b/tests/components/main-components/context-menu-options.spec.js-snapshots/win32/webkit/copy-component-annotation.png index 98425ce5..14f5b3fa 100644 Binary files a/tests/components/main-components/context-menu-options.spec.js-snapshots/win32/webkit/copy-component-annotation.png and b/tests/components/main-components/context-menu-options.spec.js-snapshots/win32/webkit/copy-component-annotation.png differ diff --git a/tests/components/main-components/create-main-components.spec.js b/tests/components/main-components/create-main-components.spec.js index 1d8e1d99..c563854b 100644 --- a/tests/components/main-components/create-main-components.spec.js +++ b/tests/components/main-components/create-main-components.spec.js @@ -13,12 +13,15 @@ const { qase } = require('playwright-qase-reporter/dist/playwright'); const teamName = random().concat('autotest'); -test.beforeEach(async ({ page }) => { +test.beforeEach(async ({ page, browserName }) => { const dashboardPage = new DashboardPage(page); const teamPage = new TeamPage(page); const mainPage = new MainPage(page); await teamPage.createTeam(teamName); await dashboardPage.createFileViaPlaceholder(); + browserName === 'webkit' && !( await mainPage.isMainPageVisible()) + ? await dashboardPage.createFileViaPlaceholder() + : null; await mainPage.isMainPageLoaded(); }); diff --git a/tests/components/main-components/create-main-components.spec.js-snapshots/win32/webkit/multiple-components-asset-3-layers.png b/tests/components/main-components/create-main-components.spec.js-snapshots/win32/webkit/multiple-components-asset-3-layers.png index 038f5fed..f45c8d78 100644 Binary files a/tests/components/main-components/create-main-components.spec.js-snapshots/win32/webkit/multiple-components-asset-3-layers.png and b/tests/components/main-components/create-main-components.spec.js-snapshots/win32/webkit/multiple-components-asset-3-layers.png differ diff --git a/tests/components/main-components/create-main-components.spec.js-snapshots/win32/webkit/multiple-components-canvas-3-layers.png b/tests/components/main-components/create-main-components.spec.js-snapshots/win32/webkit/multiple-components-canvas-3-layers.png index e0bdaeac..7efc1180 100644 Binary files a/tests/components/main-components/create-main-components.spec.js-snapshots/win32/webkit/multiple-components-canvas-3-layers.png and b/tests/components/main-components/create-main-components.spec.js-snapshots/win32/webkit/multiple-components-canvas-3-layers.png differ diff --git a/tests/components/main-components/create-main-components.spec.js-snapshots/win32/webkit/text-component-asset.png b/tests/components/main-components/create-main-components.spec.js-snapshots/win32/webkit/text-component-asset.png index aefc3999..de9cc53d 100644 Binary files a/tests/components/main-components/create-main-components.spec.js-snapshots/win32/webkit/text-component-asset.png and b/tests/components/main-components/create-main-components.spec.js-snapshots/win32/webkit/text-component-asset.png differ diff --git a/tests/components/main-components/update-main-components.spec.js b/tests/components/main-components/update-main-components.spec.js index a43e25d4..bfa9e351 100644 --- a/tests/components/main-components/update-main-components.spec.js +++ b/tests/components/main-components/update-main-components.spec.js @@ -170,6 +170,7 @@ mainTest.describe(() => { await page.waitForTimeout(200); await mainPage.waitForChangeIsSaved(); await mainPage.refreshPage(); + await mainPage.waitForViewportVisible(); await expect(mainPage.viewport).toHaveScreenshot( 'main-copies-component-shadow-default.png', { @@ -186,7 +187,7 @@ mainTest.describe(() => { await layersPanelPage.clickMainComponentOnLayersTab(); await mainPage.waitForChangeIsSaved(); await mainPage.refreshPage(); - await page.waitForTimeout(200); + await mainPage.waitForViewportVisible(); await expect(mainPage.viewport).toHaveScreenshot('main-copies-component-shadow-updated.png', { mask: [mainPage.guides, mainPage.guidesFragment], maxDiffPixels: 0, @@ -238,7 +239,9 @@ mainTest.describe(() => { mainTest.describe("Text", () => { mainTest.beforeEach(async ({ page, browserName }, testInfo) => { - await testInfo.setTimeout(testInfo.timeout + 15000); + browserName === 'webkit' + ? await testInfo.setTimeout(testInfo.timeout + 40000) + : await testInfo.setTimeout(testInfo.timeout + 15000); await mainPage.createDefaultTextLayer(browserName); await mainPage.createComponentViaRightClick(); await mainPage.waitForChangeIsSaved(); @@ -254,7 +257,7 @@ mainTest.describe("Text", () => { mainTest( qase(1448,'PENPOT-1448 Create a component from text and 2 copies of it, change font, style and size of main'), - async () => { + async ({browserName}) => { await layersPanelPage.clickMainComponentOnLayersTab(); await layersPanelPage.selectMainComponentChildLayer(); await designPanelPage.changeTextFont('Source Serif 4'); @@ -263,7 +266,8 @@ mainTest.describe("Text", () => { await mainPage.waitForChangeIsSaved(); await layersPanelPage.clickMainComponentOnLayersTab(); await mainPage.page.waitForTimeout(4000); - await mainPage.refreshPage(); + browserName === 'webkit' ? null : await mainPage.refreshPage(); + await mainPage.waitForViewportVisible(); await expect(mainPage.viewport).toHaveScreenshot('main-copies-component-text.png', { mask: [mainPage.guides, mainPage.guidesFragment], maxDiffPixels: 0, @@ -318,6 +322,7 @@ mainTest.describe(() => { await designPanelPage.isFillHexCodeSetComponent('050e23'); await mainPage.waitForChangeIsSaved(); await mainPage.refreshPage(); + await mainPage.waitForViewportVisible(); await expect(mainPage.viewport).toHaveScreenshot( 'main-copies-component-change-fill.png', ); diff --git a/tests/components/main-components/update-main-components.spec.js-snapshots/win32/webkit/main-copies-component-text.png b/tests/components/main-components/update-main-components.spec.js-snapshots/win32/webkit/main-copies-component-text.png new file mode 100644 index 00000000..2523d485 Binary files /dev/null and b/tests/components/main-components/update-main-components.spec.js-snapshots/win32/webkit/main-copies-component-text.png differ diff --git a/tests/composition/composition-grid-layout.spec.js b/tests/composition/composition-grid-layout.spec.js index bfaea762..2abb410f 100644 --- a/tests/composition/composition-grid-layout.spec.js +++ b/tests/composition/composition-grid-layout.spec.js @@ -548,17 +548,6 @@ mainTest.describe(() => { }); }); - // mainTest.only('PENPOT-1738 Move element inside grid board', async ({ page }) => { - // await mainPage.createDefaultRectangleByCoordinates(200, 200, true); - // await layersPanelPage.dragAndDropComponentToBoard('Rectangle'); - // await mainPage.waitForChangeIsSaved(); - // await mainPage.dragAndDropComponentToAnotherFraction(2, page); - // await mainPage.waitForChangeIsSaved(); - // await expect(mainPage.viewport).toHaveScreenshot('board-with-grid-move-element.png', { - // mask: [mainPage.guides], - // }); - // }); - mainTest(qase([1739,1742],'PENPOT-1739,1742 Duplicate vertical and horizontal direction, undo element duplication'), async ({ browserName }) => { await mainPage.createDefaultRectangleByCoordinates(410, 410, true); await mainPage.waitForChangeIsSaved(); diff --git a/tests/composition/composition-text.spec.js b/tests/composition/composition-text.spec.js index 0dfdb0e5..0f1a82da 100644 --- a/tests/composition/composition-text.spec.js +++ b/tests/composition/composition-text.spec.js @@ -35,6 +35,7 @@ mainTest.describe(() => { mainTest.beforeEach(async ({ page, browserName }, testInfo) => { await testInfo.setTimeout(testInfo.timeout + 20000); const mainPage = new MainPage(page); + browserName === 'webkit' ? await mainPage.waitForViewportVisible(): null; await mainPage.createDefaultTextLayer(browserName); }); @@ -106,7 +107,7 @@ mainTest.describe(() => { }, ); - mainTest(qase(382,'CO-167 Add and edit Shadow to text'), async ({ page }) => { + mainTest(qase(382,'CO-167 Add and edit Shadow to text'), async ({ page, browserName }) => { const mainPage = new MainPage(page); const colorPalettePage = new ColorPalettePage(page); const designPanelPage = new DesignPanelPage(page); @@ -116,6 +117,7 @@ mainTest.describe(() => { await designPanelPage.clickShadowColorIcon(); await colorPalettePage.setHex('#304d6a'); await mainPage.clickMoveButton(); + browserName === 'webkit' ? await mainPage.waitForChangeIsUnsaved() : null; await mainPage.waitForChangeIsSaved(); await expect(mainPage.viewport).toHaveScreenshot('text-drop-shadow.png'); await designPanelPage.selectTypeForShadow('Inner shadow'); diff --git a/tests/panels-features/panels-features-main-menu.spec.js b/tests/panels-features/panels-features-main-menu.spec.js index 827fd4d9..0e6aa548 100644 --- a/tests/panels-features/panels-features-main-menu.spec.js +++ b/tests/panels-features/panels-features-main-menu.spec.js @@ -120,8 +120,7 @@ mainTest(qase(820,'PF-102 Hide/show board names'), async ({ page }) => { await expect(mainPage.viewport).toHaveScreenshot('board-show-name.png'); }); -mainTest.skip(qase(821,'PF-103-1 Hide/show pixel grid via main menu'), async ({ page }) => { - // todo bug 6365 > need to check after fix +mainTest(qase(821,'PF-103-1 Hide/show pixel grid via main menu'), async ({ page }) => { const mainPage = new MainPage(page); await mainPage.clickViewportTwice(); await mainPage.increaseZoom(10); diff --git a/tests/panels-features/panels-features-pages.spec.js b/tests/panels-features/panels-features-pages.spec.js index 6cefa484..ddee85d7 100644 --- a/tests/panels-features/panels-features-pages.spec.js +++ b/tests/panels-features/panels-features-pages.spec.js @@ -106,27 +106,27 @@ mainTest(qase(837,'PF-119 Delete page'), async ({ page }) => { await mainPage.isFirstPageNameDisplayed('Page 1'); await expect(mainPage.pagesBlock).toHaveScreenshot('page-1.png'); }); -//todo -// mainTest.only('PENPOT-1519 Copy and paste components from Page 1 to Page 2, on Page 2 right-click component and select "Show main component"', -// async ({ page, browserName }) => { -// const mainPage = new MainPage(page); -// const basePage = new BasePage(page); -// const layersPanelPage = new LayersPanelPage(page); -// await mainPage.createDefaultRectangleByCoordinates(300, 300); -// await mainPage.createComponentViaRightClick(); -// await mainPage.waitForChangeIsSaved(); -// await mainPage.pressCopyShortcut(browserName); -// await mainPage.clickAddPageButton(); -// await mainPage.waitForChangeIsSaved(); -// await mainPage.clickOnPageOnLayersPanel(false); -// await mainPage.pressPasteShortcut(browserName); -// await layersPanelPage.clickCopyComponentOnLayersTab(); -// await basePage.showMainComponentViaRightClick(); -// await mainPage.waitForChangeIsSaved(); -// await expect(mainPage.viewport).toHaveScreenshot( -// 'page-copies-component-show-main.png', -// ); -// }); + +mainTest('PENPOT-1519 Copy and paste components from Page 1 to Page 2, on Page 2 right-click component and select "Show main component"', + async ({ page, browserName }) => { + const mainPage = new MainPage(page); + const basePage = new BasePage(page); + const layersPanelPage = new LayersPanelPage(page); + await mainPage.createDefaultRectangleByCoordinates(300, 300); + await mainPage.createComponentViaRightClick(); + await mainPage.waitForChangeIsSaved(); + await mainPage.pressCopyShortcut(browserName); + await mainPage.clickAddPageButton(); + await mainPage.waitForChangeIsSaved(); + await mainPage.clickOnPageOnLayersPanel(false); + await mainPage.pressPasteShortcut(browserName); + await layersPanelPage.clickCopyComponentOnLayersTab(); + await basePage.showMainComponentViaRightClick(); + await mainPage.waitForChangeIsSaved(); + await expect(mainPage.viewport).toHaveScreenshot( + 'page-copies-component-show-main.png', + ); +}); mainTest(qase(1526,'PENPOT-1526 Add a component from local library to Page 1 and Page 2, edit component on Page 2 and click "Reset overrides"'), async ({ page }) => { diff --git a/tests/panels-features/panels-features-pages.spec.js-snapshots/win32/firefox/page-copies-component-show-main.png b/tests/panels-features/panels-features-pages.spec.js-snapshots/win32/firefox/page-copies-component-show-main.png new file mode 100644 index 00000000..eaaaa804 Binary files /dev/null and b/tests/panels-features/panels-features-pages.spec.js-snapshots/win32/firefox/page-copies-component-show-main.png differ diff --git a/tests/ui-theme/ui-theme-features-light-mode.spec.js b/tests/ui-theme/ui-theme-features-light-mode.spec.js index 86cb4a62..98e29e14 100644 --- a/tests/ui-theme/ui-theme-features-light-mode.spec.js +++ b/tests/ui-theme/ui-theme-features-light-mode.spec.js @@ -117,7 +117,7 @@ mainTest.describe('Settings - UI THEME', () => { mainTest( 'PENPOT-1686 Check Inspect tab' + 'PENPOT-1687 Check Interactions tab', - async () => { + async ({browserName}) => { await profilePage.backToDashboardFromAccount(); await dashboardPage.createFileViaPlaceholder(); await mainPage.isMainPageLoaded(); @@ -125,6 +125,7 @@ mainTest.describe('Settings - UI THEME', () => { await mainPage.waitForChangeIsSaved(); const newPage = await viewModePage.clickViewModeButton(); viewModePage = new ViewModePage(newPage); + browserName === 'webkit' ? await viewModePage.waitForViewerSection(15000) : null; await expect(viewModePage.viewerLoyautSection).toHaveScreenshot( 'view-mode-page-image.png', { maxDiffPixelRatio: 0.0002 }, diff --git a/tests/ui-theme/ui-theme-features-light-mode.spec.js-snapshots/win32/webkit/dashboard-image.png b/tests/ui-theme/ui-theme-features-light-mode.spec.js-snapshots/win32/webkit/dashboard-image.png index 2de146d6..03e464ed 100644 Binary files a/tests/ui-theme/ui-theme-features-light-mode.spec.js-snapshots/win32/webkit/dashboard-image.png and b/tests/ui-theme/ui-theme-features-light-mode.spec.js-snapshots/win32/webkit/dashboard-image.png differ diff --git a/tests/view-mode.spec.js b/tests/view-mode.spec.js index 7f0cc233..468a3f0c 100644 --- a/tests/view-mode.spec.js +++ b/tests/view-mode.spec.js @@ -20,7 +20,7 @@ const { waitMessage } = require('../helpers/gmail'); const teamName = random().concat('autotest'); let teamPage,dashboardPage,mainPage,viewModePage,prototypePanelPage,designPanelPage,layersPanelPage,profilePage,loginPage,registerPage; -test.beforeEach(async ({ page }) => { +test.beforeEach(async ({ page, browserName }, testInfo) => { teamPage = new TeamPage(page); dashboardPage = new DashboardPage(page); mainPage = new MainPage(page); @@ -31,9 +31,16 @@ test.beforeEach(async ({ page }) => { profilePage = new ProfilePage(page); loginPage = new LoginPage(page); registerPage = new RegisterPage(page); + browserName === 'webkit' + ? await testInfo.setTimeout(testInfo.timeout + 40000) + : await testInfo.setTimeout(testInfo.timeout + 10000); await teamPage.createTeam(teamName); - await teamPage.isTeamSelected(teamName); + browserName === 'webkit' ? await teamPage.waitForTeamBtn(15000) : null; + await teamPage.isTeamSelected(teamName, browserName); await dashboardPage.createFileViaPlaceholder(); + browserName === 'webkit' && !( await mainPage.isMainPageVisible()) + ? await dashboardPage.createFileViaPlaceholder() + : null; await mainPage.isMainPageLoaded(); }); @@ -44,33 +51,36 @@ test.afterEach(async ({ page }, testInfo) => { mainTest.describe(() => { - mainTest.afterEach(async ({ page }, testInfo) => { + mainTest.afterEach(async () => { await mainPage.backToDashboardFromFileEditor(); }); - mainTest(qase([685], 'CO-364 Click view mode (From right top click) - no boards created'), async () => { + mainTest(qase([685], 'CO-364 Click view mode (From right top click) - no boards created'), async ({browserName}) => { const newPage = await viewModePage.clickViewModeButton(); viewModePage = new ViewModePage(newPage); + browserName === 'webkit' ? await viewModePage.waitForViewerSection(45000) : null; await expect(viewModePage.viewerLoyautSection).toHaveScreenshot( 'no-board-view-mode-page-image.png', ); }); - mainTest(qase([688], 'CO-367 Click view mode (From shortcut G+V) - board is created'), async () => { + mainTest(qase([688], 'CO-367 Click view mode (From shortcut G+V) - board is created'), async ({browserName}) => { await mainPage.createDefaultBoardByCoordinates(300, 300); await mainPage.waitForChangeIsSaved(); const newPage = await viewModePage.clickViewModeShortcut(); viewModePage = new ViewModePage(newPage); + browserName === 'webkit' ? await viewModePage.waitForViewerSection(45000) : null; await expect(viewModePage.viewerLoyautSection).toHaveScreenshot( 'view-mode-page-image.png', ); }); - mainTest(qase([690], 'CO-369 Full screen on/off'), async () => { + mainTest(qase([690], 'CO-369 Full screen on/off'), async ({browserName}) => { await mainPage.createDefaultBoardByCoordinates(300, 300); await mainPage.waitForChangeIsSaved(); const newPage = await viewModePage.clickViewModeShortcut(); viewModePage = new ViewModePage(newPage); + browserName === 'webkit' ? await viewModePage.waitForViewerSection(45000) : null; await viewModePage.clickFullScreenButton(); await expect(viewModePage.fullScreenSection).toHaveScreenshot( 'view-mode-full-screen-image.png', @@ -81,35 +91,40 @@ mainTest.describe(() => { ); }); - mainTest(qase([698], 'CO-377 Click arrows to navigate to other boards'), async () => { + mainTest(qase([698], 'CO-377 Click arrows to navigate to other boards'), async ({browserName}) => { await mainPage.createDefaultBoardByCoordinates(300, 300); await mainPage.waitForChangeIsSaved(); await mainPage.createDefaultBoardByCoordinates(500, 500, true); await mainPage.waitForChangeIsSaved(); const newPage = await viewModePage.clickViewModeShortcut(); viewModePage = new ViewModePage(newPage); + browserName === 'webkit' ? await viewModePage.waitForViewerSection(45000) : null; await expect(viewModePage.viewerLoyautSection).toHaveScreenshot( 'first-board-view-mode-page-image.png', ); await viewModePage.clickNextButton(); + browserName === 'webkit' ? await newPage.waitForTimeout(1000) : null; await expect(viewModePage.viewerLoyautSection).toHaveScreenshot( 'second-board-view-mode-page-image.png', ); await viewModePage.clickPrevButton(); + browserName === 'webkit' ? await newPage.waitForTimeout(1000) : null; await expect(viewModePage.viewerLoyautSection).toHaveScreenshot( 'first-board-view-mode-page-image.png', ); await viewModePage.clickNextButton(); + browserName === 'webkit' ? await newPage.waitForTimeout(1000) : null; await expect(viewModePage.viewerLoyautSection).toHaveScreenshot( 'second-board-view-mode-page-image.png', ); await viewModePage.clickPrevButton(); + browserName === 'webkit' ? await newPage.waitForTimeout(1000) : null; await expect(viewModePage.viewerLoyautSection).toHaveScreenshot( 'first-board-view-mode-page-image.png', ); }); - mainTest(qase([700], 'CO-379 Click Back icon to reset view'), async () => { + mainTest(qase([700], 'CO-379 Click Back icon to reset view'), async ({browserName}) => { await mainPage.createDefaultBoardByCoordinates(300, 300); await mainPage.waitForChangeIsSaved(); await mainPage.createDefaultBoardByCoordinates(500, 500, true); @@ -118,6 +133,7 @@ mainTest.describe(() => { await mainPage.waitForChangeIsSaved(); const newPage = await viewModePage.clickViewModeShortcut(); viewModePage = new ViewModePage(newPage); + browserName === 'webkit' ? await viewModePage.waitForViewerSection(45000) : null; await expect(viewModePage.viewerLoyautSection).toHaveScreenshot( 'first-board-view-mode-page-image.png', ); @@ -135,28 +151,32 @@ mainTest.describe(() => { ); }); - mainTest(qase([699], 'CO-378 Click board dropdown to navigate to other boards'), async () => { + mainTest(qase([699], 'CO-378 Click board dropdown to navigate to other boards'), async ({browserName}) => { await mainPage.createDefaultBoardByCoordinates(300, 300); await mainPage.waitForChangeIsSaved(); await mainPage.createDefaultBoardByCoordinates(500, 500, true); await mainPage.waitForChangeIsSaved(); const newPage = await viewModePage.clickViewModeShortcut(); viewModePage = new ViewModePage(newPage); + browserName === 'webkit' ? await viewModePage.waitForViewerSection(45000) : null; await viewModePage.clickSelectBoardDropdown(); + browserName === 'webkit' ? await newPage.waitForTimeout(1000) : null; await expect(viewModePage.viewerLoyautSection).toHaveScreenshot( 'board-dropdown-view-mode-page-image.png', ); await viewModePage.selectSecondBoard(); + browserName === 'webkit' ? await newPage.waitForTimeout(1000) : null; await expect(viewModePage.viewerLoyautSection).toHaveScreenshot( 'second-board-selected-view-mode-page-image.png', ); await viewModePage.selectFirstBoard(); + browserName === 'webkit' ? await newPage.waitForTimeout(1000) : null; await expect(viewModePage.viewerLoyautSection).toHaveScreenshot( 'first-board-selected-view-mode-page-image.png', ); }); - mainTest(qase([689], 'CO-368 Interactions dropdown'), async ({ page }) => { + mainTest(qase([689], 'CO-368 Interactions dropdown'), async ({ browserName }) => { await mainPage.createDefaultBoardByCoordinates(300, 300); await mainPage.createDefaultBoardByCoordinates(500, 500, true); await mainPage.waitForChangeIsSaved(); @@ -164,6 +184,7 @@ mainTest.describe(() => { await prototypePanelPage.dragAndDropPrototypeArrowConnector(300, 300); const newPage = await viewModePage.clickViewModeShortcut(); viewModePage = new ViewModePage(newPage); + browserName === 'webkit' ? await viewModePage.waitForViewerSection(45000) : null; await viewModePage.clickInteractionsDropdown(); await expect(viewModePage.interactionsDropdownOptions).toHaveScreenshot( 'show-on-click-interactions-options-default-image.png', @@ -188,64 +209,76 @@ mainTest.describe(() => { ); }); - mainTest(qase([691], 'CO-370 Change scale'), async () => { + mainTest(qase([691], 'CO-370 Change scale'), async ({browserName}) => { await mainPage.createDefaultBoardByCoordinates(300, 300); await mainPage.waitForChangeIsSaved(); const newPage = await viewModePage.clickViewModeShortcut(); viewModePage = new ViewModePage(newPage); + browserName === 'webkit' ? await viewModePage.waitForViewerSection(45000) : null; await viewModePage.openScaleDropdown(); + browserName === 'webkit' ? await newPage.waitForTimeout(1000) : null; await expect(viewModePage.scaleDropdownOptions).toHaveScreenshot( 'scale-dropdown-view-mode-page-image.png', ); await viewModePage.clickDownscaleButton(); + browserName === 'webkit' ? await newPage.waitForTimeout(1000) : null; await expect(viewModePage.viewerLoyautSection).toHaveScreenshot( 'downscale-board-view-mode-page-image.png', ); await viewModePage.clickResetScaleButton(); await viewModePage.clickUpscaleButton(); + browserName === 'webkit' ? await newPage.waitForTimeout(1000) : null; await expect(viewModePage.viewerLoyautSection).toHaveScreenshot( 'upscale-board-view-mode-page-image.png', ); await viewModePage.selectFitScaleOptions(); + browserName === 'webkit' ? await newPage.waitForTimeout(1000) : null; await expect(viewModePage.viewerLoyautSection).toHaveScreenshot( 'fit-scale-board-view-mode-page-image.png', ); await viewModePage.selectFillScaleOptions(); + browserName === 'webkit' ? await newPage.waitForTimeout(1000) : null; await expect(viewModePage.viewerLoyautSection).toHaveScreenshot( 'fill-scale-board-view-mode-page-image.png', ); await viewModePage.selectFullScreenScaleOptions(); + browserName === 'webkit' ? await newPage.waitForTimeout(1000) : null; await expect(viewModePage.fullScreenSection).toHaveScreenshot( 'full-screen-scale-board-view-mode-page-image.png', ); await viewModePage.clickResetScaleButton(); + browserName === 'webkit' ? await newPage.waitForTimeout(1000) : null; await expect(viewModePage.fullScreenSection).toHaveScreenshot( 'full-screen-default-scale-board-view-mode-page-image.png', ); }); - mainTest(qase([713], 'CO-392 Zoom by pressing + and - keys'), async () => { + mainTest(qase([713], 'CO-392 Zoom by pressing + and - keys'), async ({browserName}) => { await mainPage.createDefaultBoardByCoordinates(300, 300); await mainPage.waitForChangeIsSaved(); const newPage = await viewModePage.clickViewModeShortcut(); viewModePage = new ViewModePage(newPage); + browserName === 'webkit' ? await viewModePage.waitForViewerSection(45000) : null; await viewModePage.clickOnAdd(); + browserName === 'webkit' ? await newPage.waitForTimeout(1000) : null; await expect(viewModePage.viewerLoyautSection).toHaveScreenshot( 'view-mode-page-add-button-image.png', ); await viewModePage.clickOnSubtract(); + browserName === 'webkit' ? await newPage.waitForTimeout(1000) : null; await expect(viewModePage.viewerLoyautSection).toHaveScreenshot( 'view-mode-page-subtract-button-image.png', ); }); - mainTest(qase([708], 'CO-387 Page dropdown'), async () => { + mainTest(qase([708], 'CO-387 Page dropdown'), async ({browserName}) => { await mainPage.createDefaultBoardByCoordinates(300, 300); await mainPage.waitForChangeIsSaved(); await mainPage.clickAddPageButton(); await mainPage.waitForChangeIsSaved(); const newPage = await viewModePage.clickViewModeShortcut(); viewModePage = new ViewModePage(newPage); + browserName === 'webkit' ? await viewModePage.waitForViewerSection(45000) : null; await viewModePage.openPageDropdown(); await expect(viewModePage.pageDropdownOptions).toHaveScreenshot( 'page-list-image.png', @@ -264,11 +297,12 @@ mainTest.describe(() => { ); }); - mainTest(qase([701], 'CO-380 Create comment'), async () => { + mainTest(qase([701], 'CO-380 Create comment'), async ({browserName}) => { await mainPage.createDefaultBoardByCoordinates(300, 300); await mainPage.waitForChangeIsSaved(); const newPage = await viewModePage.clickViewModeShortcut(); viewModePage = new ViewModePage(newPage); + browserName === 'webkit' ? await viewModePage.waitForViewerSection(45000) : null; await viewModePage.clickCommentsButton(); await viewModePage.addComment(); @@ -287,11 +321,12 @@ mainTest.describe(() => { }); }); - mainTest(qase([709], 'CO-388 Reply comment'), async () => { + mainTest(qase([709], 'CO-388 Reply comment'), async ({browserName}) => { await mainPage.createDefaultBoardByCoordinates(300, 300); await mainPage.waitForChangeIsSaved(); const newPage = await viewModePage.clickViewModeShortcut(); viewModePage = new ViewModePage(newPage); + browserName === 'webkit' ? await viewModePage.waitForViewerSection(45000) : null; await viewModePage.clickCommentsButton(); await viewModePage.addComment(); @@ -309,11 +344,12 @@ mainTest.describe(() => { }); }); - mainTest(qase([710], 'CO-389 Edit comment'), async () => { + mainTest(qase([710], 'CO-389 Edit comment'), async ({browserName}) => { await mainPage.createDefaultBoardByCoordinates(300, 300); await mainPage.waitForChangeIsSaved(); const newPage = await viewModePage.clickViewModeShortcut(); viewModePage = new ViewModePage(newPage); + browserName === 'webkit' ? await viewModePage.waitForViewerSection(45000) : null; await viewModePage.clickCommentsButton(); await viewModePage.addComment(); @@ -330,16 +366,18 @@ mainTest.describe(() => { await commentsPanelPage.reloadPage(); await commentsPanelPage.clickCommentThreadIcon(); await commentsPanelPage.isCommentDisplayedInPopUp(editedComment); + browserName === 'webkit' ? await newPage.waitForTimeout(1000) : null; await expect(newPage).toHaveScreenshot('comment-edited.png', { mask: [commentsPanelPage.commentsAuthorSection], }); }); - mainTest(qase([711], 'CO-390 Delete thread'), async () => { + mainTest(qase([711], 'CO-390 Delete thread'), async ({browserName}) => { await mainPage.createDefaultBoardByCoordinates(300, 300); await mainPage.waitForChangeIsSaved(); const newPage = await viewModePage.clickViewModeShortcut(); viewModePage = new ViewModePage(newPage); + browserName === 'webkit' ? await viewModePage.waitForViewerSection(45000) : null; await viewModePage.clickCommentsButton(); await viewModePage.addComment(); @@ -351,16 +389,18 @@ mainTest.describe(() => { await commentsPanelPage.clickDeleteCommentOption(); await commentsPanelPage.clickDeleteThreadButton(); await commentsPanelPage.isCommentThreadIconNotDisplayed(); + browserName === 'webkit' ? await newPage.waitForTimeout(1000) : null; await expect(newPage).toHaveScreenshot('comment-removed.png', { mask: [commentsPanelPage.commentsAuthorSection], }); }); - mainTest(qase([703], 'CO-382 Comments dropdown (Hide resolved comments)'), async () => { + mainTest(qase([703], 'CO-382 Comments dropdown (Hide resolved comments)'), async ({browserName}) => { await mainPage.createDefaultBoardByCoordinates(300, 300); await mainPage.waitForChangeIsSaved(); const newPage = await viewModePage.clickViewModeShortcut(); viewModePage = new ViewModePage(newPage); + browserName === 'webkit' ? await viewModePage.waitForViewerSection(45000) : null; const commentsPanelPage = new CommentsPanelPage(newPage); await viewModePage.clickCommentsButton(); await viewModePage.addComment(); @@ -378,22 +418,25 @@ mainTest.describe(() => { await viewModePage.openCommentsDropdown(); await viewModePage.selectHideResolvedCommentsOption(); await commentsPanelPage.isCommentResolvedThreadIconNotDisplayed(); + browserName === 'webkit' ? await newPage.waitForTimeout(1000) : null; await expect(newPage).toHaveScreenshot('resolved-comments-hidden.png', { mask: [commentsPanelPage.commentsAuthorSection], }); await viewModePage.openCommentsDropdown(); await viewModePage.selectHideResolvedCommentsOption(); await commentsPanelPage.isCommentResolvedThreadIconDisplayed(); + browserName === 'webkit' ? await newPage.waitForTimeout(1000) : null; await expect(newPage).toHaveScreenshot('resolved-comments-show.png', { mask: [commentsPanelPage.commentsAuthorSection], }); }); - mainTest(qase([704], 'CO-383 Comments dropdown (Show comments list)'), async () => { + mainTest(qase([704], 'CO-383 Comments dropdown (Show comments list)'), async ({browserName}) => { await mainPage.createDefaultBoardByCoordinates(300, 300); await mainPage.waitForChangeIsSaved(); const newPage = await viewModePage.clickViewModeShortcut(); viewModePage = new ViewModePage(newPage); + browserName === 'webkit' ? await viewModePage.waitForViewerSection(45000) : null; const commentsPanelPage = new CommentsPanelPage(newPage); await viewModePage.clickCommentsButton(); await viewModePage.addComment(); @@ -416,20 +459,23 @@ mainTest.describe(() => { }); }); - mainTest(qase([706], 'CO-385 Switch to Inspect view'), async () => { + mainTest(qase([706], 'CO-385 Switch to Inspect view'), async ({browserName}) => { await mainPage.createDefaultBoardByCoordinates(300, 300); await mainPage.waitForChangeIsSaved(); const newPage = await viewModePage.clickViewModeShortcut(); viewModePage = new ViewModePage(newPage); + browserName === 'webkit' ? await viewModePage.waitForViewerSection(45000) : null; await viewModePage.openInspectTab(); + browserName === 'webkit' ? await newPage.waitForTimeout(1000) : null; await expect(viewModePage.viewerLoyautSection).toHaveScreenshot( 'view-mode-inspect-page-image.png'); await viewModePage.openInteractionsTab(); + browserName === 'webkit' ? await newPage.waitForTimeout(1000) : null; await expect(viewModePage.viewerLoyautSection).toHaveScreenshot( 'view-mode-interactions-page-image.png'); }); - mainTest(qase([715], 'CO-394 Inspect functionality - Board elements dropdown in the top left'), async () => { + mainTest(qase([715], 'CO-394 Inspect functionality - Board elements dropdown in the top left'), async ({browserName}) => { await mainPage.createDefaultBoardByCoordinates(300, 300); await designPanelPage.changeHeightAndWidthForLayer('200', '200'); await mainPage.waitForChangeIsSaved(); @@ -439,6 +485,7 @@ mainTest.describe(() => { const newPage = await viewModePage.clickViewModeShortcut(); viewModePage = new ViewModePage(newPage); + browserName === 'webkit' ? await viewModePage.waitForViewerSection(45000) : null; layersPanelPage = new LayersPanelPage(newPage); const inspectPanelPage = new InspectPanelPage(newPage); await viewModePage.openInspectTab(); @@ -449,7 +496,7 @@ mainTest.describe(() => { 'view-mode-code-tab-image.png'); }); - mainTest(qase([717], 'CO-396 Inspect functionality- Export'), async () => { + mainTest(qase([717], 'CO-396 Inspect functionality- Export'), async ({browserName}) => { await mainPage.createDefaultBoardByCoordinates(300, 300); await designPanelPage.changeHeightAndWidthForLayer('200', '200'); await mainPage.waitForChangeIsSaved(); @@ -459,6 +506,7 @@ mainTest.describe(() => { const newPage = await viewModePage.clickViewModeShortcut(); viewModePage = new ViewModePage(newPage); + browserName === 'webkit' ? await viewModePage.waitForViewerSection(45000) : null; designPanelPage = new DesignPanelPage(newPage); await viewModePage.openInspectTab(); @@ -492,6 +540,7 @@ mainTest.describe(() => { const newPage = await viewModePage.clickViewModeShortcut(); viewModePage = new ViewModePage(newPage); + browserName === 'webkit' ? await viewModePage.waitForViewerSection(45000) : null; layersPanelPage = new LayersPanelPage(newPage); await viewModePage.openInspectTab(); await layersPanelPage.clickLayerOnLayersTab('Rectangle'); @@ -511,13 +560,14 @@ mainTest.describe(() => { 'view-mode-image-selected-image.png'); }); - mainTest(qase([1787], 'CO-389 Copy layout and paste'), async ({ page, browserName }) => { + mainTest(qase([1787], 'CO-389 Copy layout and paste'), async ({ browserName }) => { await mainPage.createDefaultBoardByCoordinates(300, 300); await designPanelPage.changeHeightAndWidthForLayer('200', '200'); await mainPage.waitForChangeIsSaved(); const newPage = await viewModePage.clickViewModeShortcut(); viewModePage = new ViewModePage(newPage); + browserName === 'webkit' ? await viewModePage.waitForViewerSection(45000) : null; layersPanelPage = new LayersPanelPage(newPage); await viewModePage.openInspectTab(); await viewModePage.copyWidth(); @@ -536,11 +586,12 @@ mainTest.describe(() => { const newPage = await viewModePage.clickViewModeShortcut(); viewModePage = new ViewModePage(newPage); + browserName === 'webkit' ? await viewModePage.waitForViewerSection(45000) : null; layersPanelPage = new LayersPanelPage(newPage); - await viewModePage.clickEditButton(); - await newPage.waitForTimeout(1000); - await viewModePage.isPageSwitched(newPage); + await viewModePage.clickEditButton(); + await newPage.waitForTimeout(1000); + await viewModePage.isPageSwitched(newPage); await page.close(); await viewModePage.clickEditButton(); @@ -556,14 +607,16 @@ mainTest.describe(() => { }); mainTest.describe(() => { - mainTest(qase([693], 'CO-372 Share prototype - get link (2 pages)'), async ({ page }) => { + mainTest(qase([693], 'CO-372 Share prototype - get link (2 pages)'), async ({ page, browserName }) => { await mainPage.createDefaultBoardByCoordinates(300, 300); await mainPage.waitForChangeIsSaved(); await mainPage.clickAddPageButton(); await mainPage.waitForChangeIsSaved(); const newPage = await viewModePage.clickViewModeShortcut(); viewModePage = new ViewModePage(newPage); + browserName === 'webkit' ? await viewModePage.waitForViewerSection(45000) : null; await viewModePage.clickShareButton(); + browserName === 'webkit' ? await newPage.waitForTimeout(1000) : null; await expect(viewModePage.shareLincDialog).toHaveScreenshot( 'view-mode-share-window-image.png', ); @@ -591,11 +644,12 @@ mainTest.describe(() => { await loginPage.goto(); }); - mainTest(qase([694], 'CO-373 Share prototype - destroy link'), async ({ page }) => { + mainTest(qase([694], 'CO-373 Share prototype - destroy link'), async ({ page, browserName }) => { await mainPage.createDefaultBoardByCoordinates(300, 300); await mainPage.waitForChangeIsSaved(); const newPage = await viewModePage.clickViewModeShortcut(); viewModePage = new ViewModePage(newPage); + browserName === 'webkit' ? await viewModePage.waitForViewerSection(45000) : null; await viewModePage.clickShareButton(); await viewModePage.clickGetLincButton(); const shareLinc = await viewModePage.clickCopyLincButton(); @@ -614,11 +668,12 @@ mainTest.describe(() => { await loginPage.goto(); }); - mainTest(qase([696], 'CO-375 Share prototype - manage permissions ("Can comment")'), async ({ page }) => { + mainTest(qase([696], 'CO-375 Share prototype - manage permissions ("Can comment")'), async ({ page, browserName }) => { await mainPage.createDefaultBoardByCoordinates(300, 300); await mainPage.waitForChangeIsSaved(); const newPage = await viewModePage.clickViewModeShortcut(); viewModePage = new ViewModePage(newPage); + browserName === 'webkit' ? await viewModePage.waitForViewerSection(45000) : null; await viewModePage.clickShareButton(); await viewModePage.clickManagePermissionsButton(); await viewModePage.selectAllUsersCommentPermission(); @@ -648,11 +703,12 @@ mainTest.describe(() => { await profilePage.logout(); }); - mainTest(qase([697], 'CO-376 Share prototype - manage permissions ("Can inspect code ")'), async ({ page }) => { + mainTest(qase([697], 'CO-376 Share prototype - manage permissions ("Can inspect code ")'), async ({ page, browserName }) => { await mainPage.createDefaultBoardByCoordinates(300, 300); await mainPage.waitForChangeIsSaved(); const newPage = await viewModePage.clickViewModeShortcut(); viewModePage = new ViewModePage(newPage); + browserName === 'webkit' ? await viewModePage.waitForViewerSection(45000) : null; await viewModePage.clickShareButton(); await viewModePage.clickManagePermissionsButton(); await viewModePage.selectAllUsersInspectPermission(); diff --git a/tests/view-mode.spec.js-snapshots/win32/webkit/comment-closed-pop-up.png b/tests/view-mode.spec.js-snapshots/win32/webkit/comment-closed-pop-up.png index de54c523..3e36b0fe 100644 Binary files a/tests/view-mode.spec.js-snapshots/win32/webkit/comment-closed-pop-up.png and b/tests/view-mode.spec.js-snapshots/win32/webkit/comment-closed-pop-up.png differ diff --git a/tests/view-mode.spec.js-snapshots/win32/webkit/comment-edited.png b/tests/view-mode.spec.js-snapshots/win32/webkit/comment-edited.png index 1314edbb..cb035d7f 100644 Binary files a/tests/view-mode.spec.js-snapshots/win32/webkit/comment-edited.png and b/tests/view-mode.spec.js-snapshots/win32/webkit/comment-edited.png differ diff --git a/tests/view-mode.spec.js-snapshots/win32/webkit/comment-opened-pop-up.png b/tests/view-mode.spec.js-snapshots/win32/webkit/comment-opened-pop-up.png index de54c523..3e36b0fe 100644 Binary files a/tests/view-mode.spec.js-snapshots/win32/webkit/comment-opened-pop-up.png and b/tests/view-mode.spec.js-snapshots/win32/webkit/comment-opened-pop-up.png differ diff --git a/tests/view-mode.spec.js-snapshots/win32/webkit/comment-reply.png b/tests/view-mode.spec.js-snapshots/win32/webkit/comment-reply.png index 1419bac2..4c3dab72 100644 Binary files a/tests/view-mode.spec.js-snapshots/win32/webkit/comment-reply.png and b/tests/view-mode.spec.js-snapshots/win32/webkit/comment-reply.png differ