Skip to content

Commit

Permalink
set more time for timeout
Browse files Browse the repository at this point in the history
fix tests
  • Loading branch information
Staschalapko committed Mar 8, 2024
1 parent e2874fd commit f1fb3ca
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
3 changes: 2 additions & 1 deletion pages/dashboard/dashboard-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion pages/workspace/layers-panel-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"]',
Expand Down
2 changes: 1 addition & 1 deletion playwright.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand Down
4 changes: 3 additions & 1 deletion tests/assets/library-backup-page.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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');
Expand Down
12 changes: 7 additions & 5 deletions tests/components/main-components/flext-layout-cases.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand Down Expand Up @@ -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');
Expand All @@ -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');
Expand Down Expand Up @@ -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');

Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit f1fb3ca

Please sign in to comment.