diff --git a/pages/base-page.js b/pages/base-page.js index 004302d..0d20177 100644 --- a/pages/base-page.js +++ b/pages/base-page.js @@ -37,12 +37,12 @@ exports.BasePage = class BasePage { this.selectionToBoardMenuItem = page.locator( 'ul[class*="workspace-context-menu"] li:has-text("Selection to board")', ); - this.createComponentMenuItem = page.locator( - 'ul[class*="workspace-context-menu"] li:has-text("Create component")', - ); - this.createMultipleComponentsMenuItem = page.locator( - 'ul[class*="workspace-context-menu"] li:has-text("Create multiple components")', - ); + // this.createComponentMenuItem = page.locator( + // 'ul[class*="workspace-context-menu"] li:has-text("Create component")', + // ); + // this.createMultipleComponentsMenuItem = page.locator( + // 'ul[class*="workspace-context-menu"] li:has-text("Create multiple components")', + // ); this.flipVerticalMenuItem = page.locator( 'ul[class*="workspace-context-menu"] li:has-text("Flip vertical")', ); @@ -71,7 +71,7 @@ exports.BasePage = class BasePage { 'ul[class*="workspace_context_menu"] span:has-text("Restore main component")', ); this.createMultipleComponentsMenuItem = page.locator( - 'ul[class*="workspace_context_menu"] span:has-text("Create multiple components")', + 'li[class*="context-menu-item"] span:has-text("Create multiple components")', ); this.showInAssetsPanelOption = page.locator( 'ul[class*="workspace_context_menu"] span:has-text("Show in assets panel")', diff --git a/pages/dashboard/dashboard-page.js b/pages/dashboard/dashboard-page.js index 4938031..8130161 100644 --- a/pages/dashboard/dashboard-page.js +++ b/pages/dashboard/dashboard-page.js @@ -535,10 +535,11 @@ exports.DashboardPage = class DashboardPage extends BasePage { async moveFileToOtherTeamViaRightClick(fileName, otherTeamName) { const elem = this.page.locator(`button[title="${fileName}"]`).first(); await elem.click({ button: 'right' }); + await this.page.waitForTimeout(500); await this.moveToFileMenuItem.click(); 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(`//li[@role="menuitem"]/a[text()="${otherTeamName}"]`).click(); + await this.page.locator(`//li[@role="menuitem"]/a[text()="Drafts"]`).click(); await this.page.locator(`input[value="Move"]`).click(); } diff --git a/pages/dashboard/team-page.js b/pages/dashboard/team-page.js index cdfc6c7..a72418a 100644 --- a/pages/dashboard/team-page.js +++ b/pages/dashboard/team-page.js @@ -19,7 +19,7 @@ exports.TeamPage = class TeamPage extends BasePage { this.teamCurrentNameDiv = page.locator( 'button[class*="current-team"] div[class*="team-name"]', ); - this.teamNameLabel = page.locator('div[class*="team__name"]'); + this.teamNameLabel = page.locator('//div[text()="Team info"]/following-sibling::div[1]'); this.teamOptionsMenuButton = page.locator('button[class*="switch-options"]'); this.deleteTeamMenuItem = page.locator('#teams-options-delete-team'); this.deleteTeamButton = page.locator('input[value="Delete team"]'); @@ -39,9 +39,9 @@ exports.TeamPage = class TeamPage extends BasePage { this.teamFilesSpan = page.locator( `//*[contains(@class,'team__document-icon')]/../span`, ); - this.teamInfoSection = page.locator(`div[class*="info-block"] div[class='main_ui_dashboard_team__block-text']`); - this.teamOwnerSection = page.locator(`//*[contains(@class,'team__group-icon')]/../../../div[2]`); - this.teamStatsSection = page.locator(`//*[contains(@class,'team__group-icon')]/../../../div[3]`); + this.teamInfoSection = page.locator('//div[text()="Team info"]/..'); + this.teamOwnerSection = page.locator('//div[text()="Team members"]/..'); + this.teamStatsSection = page.locator('//div[text()="Team projects"]/..'); //Invitations this.invitationsMenuItem = page.locator('li[data-test="team-invitations"]'); @@ -87,7 +87,7 @@ exports.TeamPage = class TeamPage extends BasePage { 'aside[class*="warning"] div[class*="context_notification"]', ); this.teamSettingsSection = page.locator('.main_ui_dashboard__dashboard-content'); - this.teamIcon = page.locator(`div[class*='team__icon'] span`); + this.teamIcon = page.locator(`div[class*='team-icon'] img`); } async createTeam(teamName) { @@ -120,7 +120,7 @@ exports.TeamPage = class TeamPage extends BasePage { async deleteTeam(teamName) { await this.openTeamsListIfClosed(); const teamSel = this.page.locator( - `ul[class*="teams-dropdown"] li[class*="team-dropdown-item"] span[title="${teamName}"]`, + `ul[class*="teams-dropdown"] li[role="menuitem"] span[title="${teamName}"]`, ); if (await teamSel.isVisible()) { await teamSel.click(); diff --git a/pages/workspace/design-panel-page.js b/pages/workspace/design-panel-page.js index c4f7efd..d5aa507 100644 --- a/pages/workspace/design-panel-page.js +++ b/pages/workspace/design-panel-page.js @@ -19,12 +19,8 @@ exports.DesignPanelPage = class DesignPanelPage extends BasePage { this.generalCornerRadiusInput = page.locator('div[title="Radius"] input'); this.topLeftCornerRadiusInput = page.locator('div[title="Top left"] input'); this.topRightCornerRadiusInput = page.locator('div[title="Top right"] input'); - this.bottomLeftCornerRadiusInput = page.locator( - 'div[title="Bottom left"] input', - ); - this.bottomRightCornerRadiusInput = page.locator( - 'div[title="Bottom right"] input', - ); + this.bottomLeftCornerRadiusInput = page.locator('div[title="Bottom left"] input'); + this.bottomRightCornerRadiusInput = page.locator('div[title="Bottom right"] input'); this.sizeWidthInput = page.locator('div[title="Width"] input'); this.sizeHeightInput = page.locator('div[title="Height"] input'); this.xAxisInput = page.locator('div[title="X axis"] input'); @@ -299,6 +295,9 @@ exports.DesignPanelPage = class DesignPanelPage extends BasePage { this.detachInstanceOptionDesign = page.locator( 'ul[class*="component__custom-select-dropdown"] span:text-is("Detach instance")', ); + this.clipContentButton = page.locator( + '//input[@id="clip-content"]/..', + ); } async isFlexElementSectionOpened() { @@ -452,31 +451,31 @@ exports.DesignPanelPage = class DesignPanelPage extends BasePage { async changeGeneralCornerRadiusForLayer(value) { await this.generalCornerRadiusInput.clear(); await this.generalCornerRadiusInput.pressSequentially(value); - await this.clickMoveButton(); + await this.clickOnEnter(); } async changeTopLeftCornerRadiusForLayer(value) { await this.topLeftCornerRadiusInput.clear(); await this.topLeftCornerRadiusInput.pressSequentially(value); - await this.clickMoveButton(); + await this.clickOnEnter(); } async changeTopRightCornerRadiusForLayer(value) { await this.topRightCornerRadiusInput.clear(); await this.topRightCornerRadiusInput.pressSequentially(value); - await this.clickMoveButton(); + await this.clickOnEnter(); } async changeBottomLeftCornerRadiusForLayer(value) { await this.bottomLeftCornerRadiusInput.clear(); await this.bottomLeftCornerRadiusInput.pressSequentially(value); - await this.clickMoveButton(); + await this.clickOnEnter(); } async changeBottomRightCornerRadiusForLayer(value) { await this.bottomRightCornerRadiusInput.clear(); await this.bottomRightCornerRadiusInput.pressSequentially(value); - await this.clickMoveButton(); + await this.clickOnEnter(); } async changeWidthForLayer(width) { @@ -989,4 +988,8 @@ exports.DesignPanelPage = class DesignPanelPage extends BasePage { async clickOnDetachInstanceOption() { await this.detachInstanceOptionDesign.click(); } + + async clickOnClipContentButton() { + await this.clipContentButton.click(); + } }; diff --git a/pages/workspace/main-page.js b/pages/workspace/main-page.js index ca481c9..70ae8f1 100644 --- a/pages/workspace/main-page.js +++ b/pages/workspace/main-page.js @@ -842,6 +842,7 @@ exports.MainPage = class MainPage extends BasePage { if (singleComponent) { await this.createComponentMenuItem.click(); } else { + await this.page.waitForTimeout(200); await this.createMultipleComponentsMenuItem.click(); } } diff --git a/tests/assets/shared-libraries.spec.js b/tests/assets/shared-libraries.spec.js index fcdccee..7ffb3be 100644 --- a/tests/assets/shared-libraries.spec.js +++ b/tests/assets/shared-libraries.spec.js @@ -653,6 +653,7 @@ test.describe(() => { }); test.afterEach(async ({ page }) => { + await teamPage.page.waitForTimeout(1000); await teamPage.deleteTeam(team2); }); }); diff --git a/tests/components/main-components/flext-layout-cases.spec.js b/tests/components/main-components/flext-layout-cases.spec.js index e7874a0..cbb28ae 100644 --- a/tests/components/main-components/flext-layout-cases.spec.js +++ b/tests/components/main-components/flext-layout-cases.spec.js @@ -99,9 +99,6 @@ test.describe(() => { await mainPage.addFlexLayoutViaRightClick(); await mainPage.waitForChangeIsSaved(); - await mainPage.createDefaultRectangleByCoordinates(200, 200, true); - await mainPage.createComponentViaRightClick(); - await mainPage.waitForChangeIsSaved(); }); mainTest( @@ -109,6 +106,9 @@ test.describe(() => { async ( {page}, testInfo) => { await testInfo.setTimeout(testInfo.timeout + 20000); + await mainPage.createDefaultRectangleByCoordinates(200, 200, true); + await mainPage.waitForChangeIsSaved(); + await mainPage.clickCreatedBoardTitleOnCanvas(); await designPanelPage.changeAxisXandYForLayer('600', '200'); @@ -119,7 +119,6 @@ test.describe(() => { await mainPage.waitForChangeIsSaved(); await mainPage.createDefaultEllipseByCoordinates(200, 200, true); - await mainPage.createComponentViaRightClick(); await mainPage.waitForChangeIsSaved(); await mainPage.clickViewportTwice(); @@ -147,6 +146,9 @@ test.describe(() => { mainTest( 'PENPOT-1514 Create component inside flex board, change alignment for element', async () => { + await mainPage.createDefaultRectangleByCoordinates(200, 200, true); + await mainPage.createComponentViaRightClick(); + await mainPage.waitForChangeIsSaved(); await mainPage.clickCreatedBoardTitleOnCanvas(); await designPanelPage.changeLayoutAlignment('Center'); await mainPage.waitForChangeIsSaved(); diff --git a/tests/components/main-components/flext-layout-cases.spec.js-snapshots/win32/chrome/component-inside-board-change-paddings.png b/tests/components/main-components/flext-layout-cases.spec.js-snapshots/win32/chrome/component-inside-board-change-paddings.png index 1ad6f2c..8fca898 100644 Binary files a/tests/components/main-components/flext-layout-cases.spec.js-snapshots/win32/chrome/component-inside-board-change-paddings.png and b/tests/components/main-components/flext-layout-cases.spec.js-snapshots/win32/chrome/component-inside-board-change-paddings.png differ diff --git a/tests/components/main-components/flext-layout-cases.spec.js-snapshots/win32/firefox/component-inside-board-change-paddings.png b/tests/components/main-components/flext-layout-cases.spec.js-snapshots/win32/firefox/component-inside-board-change-paddings.png new file mode 100644 index 0000000..fda9caa Binary files /dev/null and b/tests/components/main-components/flext-layout-cases.spec.js-snapshots/win32/firefox/component-inside-board-change-paddings.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 8164e03..48b8d44 100644 --- a/tests/components/main-components/update-main-components.spec.js +++ b/tests/components/main-components/update-main-components.spec.js @@ -70,6 +70,8 @@ test.describe(() => { await mainPage.createDefaultRectangleByCoordinates(200, 300); await mainPage.createComponentViaRightClick(); await mainPage.waitForChangeIsSaved(); + await designPanelPage.clickOnClipContentButton(); + await mainPage.waitForChangeIsSaved(); await mainPage.duplicateLayerViaRightClick(); await mainPage.waitForChangeIsSaved(); await layersPanelPage.clickCopyComponentOnLayersTab(); diff --git a/tests/components/main-components/update-main-components.spec.js-snapshots/win32/chrome/main-copies-component-text.png b/tests/components/main-components/update-main-components.spec.js-snapshots/win32/chrome/main-copies-component-text.png index 97cb2b8..5348661 100644 Binary files a/tests/components/main-components/update-main-components.spec.js-snapshots/win32/chrome/main-copies-component-text.png and b/tests/components/main-components/update-main-components.spec.js-snapshots/win32/chrome/main-copies-component-text.png differ diff --git a/tests/components/main-components/update-main-components.spec.js-snapshots/win32/firefox/main-copies-component-text.png b/tests/components/main-components/update-main-components.spec.js-snapshots/win32/firefox/main-copies-component-text.png index 9bb909c..c8feb6f 100644 Binary files a/tests/components/main-components/update-main-components.spec.js-snapshots/win32/firefox/main-copies-component-text.png and b/tests/components/main-components/update-main-components.spec.js-snapshots/win32/firefox/main-copies-component-text.png differ diff --git a/tests/dashboard/dashboard-teams.spec.js-snapshots/win32/chrome/team-owner-block.png b/tests/dashboard/dashboard-teams.spec.js-snapshots/win32/chrome/team-owner-block.png index c839ada..39b9bbc 100644 Binary files a/tests/dashboard/dashboard-teams.spec.js-snapshots/win32/chrome/team-owner-block.png and b/tests/dashboard/dashboard-teams.spec.js-snapshots/win32/chrome/team-owner-block.png differ diff --git a/tests/dashboard/dashboard-teams.spec.js-snapshots/win32/chrome/team-profile-image.png b/tests/dashboard/dashboard-teams.spec.js-snapshots/win32/chrome/team-profile-image.png index 18ed5ce..05c8c48 100644 Binary files a/tests/dashboard/dashboard-teams.spec.js-snapshots/win32/chrome/team-profile-image.png and b/tests/dashboard/dashboard-teams.spec.js-snapshots/win32/chrome/team-profile-image.png differ diff --git a/tests/dashboard/dashboard-teams.spec.js-snapshots/win32/chrome/team-stats-block.png b/tests/dashboard/dashboard-teams.spec.js-snapshots/win32/chrome/team-stats-block.png index 6deb56c..f1de0e4 100644 Binary files a/tests/dashboard/dashboard-teams.spec.js-snapshots/win32/chrome/team-stats-block.png and b/tests/dashboard/dashboard-teams.spec.js-snapshots/win32/chrome/team-stats-block.png differ diff --git a/tests/dashboard/dashboard-teams.spec.js-snapshots/win32/firefox/team-owner-block.png b/tests/dashboard/dashboard-teams.spec.js-snapshots/win32/firefox/team-owner-block.png index 23b04e1..2c71795 100644 Binary files a/tests/dashboard/dashboard-teams.spec.js-snapshots/win32/firefox/team-owner-block.png and b/tests/dashboard/dashboard-teams.spec.js-snapshots/win32/firefox/team-owner-block.png differ diff --git a/tests/dashboard/dashboard-teams.spec.js-snapshots/win32/firefox/team-profile-image.png b/tests/dashboard/dashboard-teams.spec.js-snapshots/win32/firefox/team-profile-image.png index 095034c..a4d7495 100644 Binary files a/tests/dashboard/dashboard-teams.spec.js-snapshots/win32/firefox/team-profile-image.png and b/tests/dashboard/dashboard-teams.spec.js-snapshots/win32/firefox/team-profile-image.png differ diff --git a/tests/dashboard/dashboard-teams.spec.js-snapshots/win32/firefox/team-stats-block.png b/tests/dashboard/dashboard-teams.spec.js-snapshots/win32/firefox/team-stats-block.png index e258997..d0f1a77 100644 Binary files a/tests/dashboard/dashboard-teams.spec.js-snapshots/win32/firefox/team-stats-block.png and b/tests/dashboard/dashboard-teams.spec.js-snapshots/win32/firefox/team-stats-block.png differ diff --git a/tests/dashboard/dashboard-teams.spec.js-snapshots/win32/webkit/team-owner-block.png b/tests/dashboard/dashboard-teams.spec.js-snapshots/win32/webkit/team-owner-block.png index 9f3489a..f161066 100644 Binary files a/tests/dashboard/dashboard-teams.spec.js-snapshots/win32/webkit/team-owner-block.png and b/tests/dashboard/dashboard-teams.spec.js-snapshots/win32/webkit/team-owner-block.png differ diff --git a/tests/dashboard/dashboard-teams.spec.js-snapshots/win32/webkit/team-profile-image.png b/tests/dashboard/dashboard-teams.spec.js-snapshots/win32/webkit/team-profile-image.png index d00be85..2bec8ab 100644 Binary files a/tests/dashboard/dashboard-teams.spec.js-snapshots/win32/webkit/team-profile-image.png and b/tests/dashboard/dashboard-teams.spec.js-snapshots/win32/webkit/team-profile-image.png differ diff --git a/tests/dashboard/dashboard-teams.spec.js-snapshots/win32/webkit/team-stats-block.png b/tests/dashboard/dashboard-teams.spec.js-snapshots/win32/webkit/team-stats-block.png index 6a45aba..561cc2c 100644 Binary files a/tests/dashboard/dashboard-teams.spec.js-snapshots/win32/webkit/team-stats-block.png and b/tests/dashboard/dashboard-teams.spec.js-snapshots/win32/webkit/team-stats-block.png differ diff --git a/tests/ui-theme/ui-theme-features-light-mode.spec.js-snapshots/win32/chrome/dashboard-image.png b/tests/ui-theme/ui-theme-features-light-mode.spec.js-snapshots/win32/chrome/dashboard-image.png index ab2c81e..1a52e76 100644 Binary files a/tests/ui-theme/ui-theme-features-light-mode.spec.js-snapshots/win32/chrome/dashboard-image.png and b/tests/ui-theme/ui-theme-features-light-mode.spec.js-snapshots/win32/chrome/dashboard-image.png differ diff --git a/tests/ui-theme/ui-theme-features-light-mode.spec.js-snapshots/win32/chrome/team-settings-image.png b/tests/ui-theme/ui-theme-features-light-mode.spec.js-snapshots/win32/chrome/team-settings-image.png index 17329c3..680825f 100644 Binary files a/tests/ui-theme/ui-theme-features-light-mode.spec.js-snapshots/win32/chrome/team-settings-image.png and b/tests/ui-theme/ui-theme-features-light-mode.spec.js-snapshots/win32/chrome/team-settings-image.png differ diff --git a/tests/ui-theme/ui-theme-features-light-mode.spec.js-snapshots/win32/chrome/view-mode-inspect-page-image.png b/tests/ui-theme/ui-theme-features-light-mode.spec.js-snapshots/win32/chrome/view-mode-inspect-page-image.png index 4839752..7471792 100644 Binary files a/tests/ui-theme/ui-theme-features-light-mode.spec.js-snapshots/win32/chrome/view-mode-inspect-page-image.png and b/tests/ui-theme/ui-theme-features-light-mode.spec.js-snapshots/win32/chrome/view-mode-inspect-page-image.png differ diff --git a/tests/ui-theme/ui-theme-features-light-mode.spec.js-snapshots/win32/firefox/dashboard-image.png b/tests/ui-theme/ui-theme-features-light-mode.spec.js-snapshots/win32/firefox/dashboard-image.png index 31ef6ae..fa34fe1 100644 Binary files a/tests/ui-theme/ui-theme-features-light-mode.spec.js-snapshots/win32/firefox/dashboard-image.png and b/tests/ui-theme/ui-theme-features-light-mode.spec.js-snapshots/win32/firefox/dashboard-image.png differ diff --git a/tests/ui-theme/ui-theme-features-light-mode.spec.js-snapshots/win32/firefox/team-settings-image.png b/tests/ui-theme/ui-theme-features-light-mode.spec.js-snapshots/win32/firefox/team-settings-image.png index b7e561c..faf0aa9 100644 Binary files a/tests/ui-theme/ui-theme-features-light-mode.spec.js-snapshots/win32/firefox/team-settings-image.png and b/tests/ui-theme/ui-theme-features-light-mode.spec.js-snapshots/win32/firefox/team-settings-image.png differ 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 d4b0541..b50be7a 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/ui-theme/ui-theme-features-light-mode.spec.js-snapshots/win32/webkit/team-settings-image.png b/tests/ui-theme/ui-theme-features-light-mode.spec.js-snapshots/win32/webkit/team-settings-image.png index 05d99bd..0d9195f 100644 Binary files a/tests/ui-theme/ui-theme-features-light-mode.spec.js-snapshots/win32/webkit/team-settings-image.png and b/tests/ui-theme/ui-theme-features-light-mode.spec.js-snapshots/win32/webkit/team-settings-image.png differ diff --git a/tests/ui-theme/ui-theme-features-light-mode.spec.js-snapshots/win32/webkit/view-mode-inspect-page-image.png b/tests/ui-theme/ui-theme-features-light-mode.spec.js-snapshots/win32/webkit/view-mode-inspect-page-image.png index 7eb74d0..73cc368 100644 Binary files a/tests/ui-theme/ui-theme-features-light-mode.spec.js-snapshots/win32/webkit/view-mode-inspect-page-image.png and b/tests/ui-theme/ui-theme-features-light-mode.spec.js-snapshots/win32/webkit/view-mode-inspect-page-image.png differ diff --git a/tests/ui-theme/ui-theme-features-light-mode.spec.js-snapshots/win32/webkit/view-mode-page-image.png b/tests/ui-theme/ui-theme-features-light-mode.spec.js-snapshots/win32/webkit/view-mode-page-image.png index 649045a..e7ab1a8 100644 Binary files a/tests/ui-theme/ui-theme-features-light-mode.spec.js-snapshots/win32/webkit/view-mode-page-image.png and b/tests/ui-theme/ui-theme-features-light-mode.spec.js-snapshots/win32/webkit/view-mode-page-image.png differ