Skip to content

Commit

Permalink
ci: remove unneeded setViewportSize calls (#2240)
Browse files Browse the repository at this point in the history
  • Loading branch information
nickofthyme authored Nov 10, 2023
1 parent 0dd26a5 commit 5193a64
Show file tree
Hide file tree
Showing 337 changed files with 57 additions and 32 deletions.
11 changes: 8 additions & 3 deletions e2e/page_objects/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,11 @@ export class CommonPage {

if (options?.action) {
await options.action();

if (options.waitSelector) {
// check waitSelector again after any actions
await this.waitForElement(page)(options.waitSelector, options.timeout);
}
}

if (options?.delay) {
Expand Down Expand Up @@ -549,15 +554,15 @@ export class CommonPage {
});
};

setResizeDimensions = (page: Page) => async (dimensions: { height?: string; width?: string }) => {
setResizeDimensions = (page: Page) => async (dimensions: { height?: string | number; width?: string | number }) => {
const el = page.locator('#story-resize-wrapper');
if (!(await el.isVisible())) {
throw new Error('setResizeDimensions was called when no #story-resize-wrapper exists');
}

await el.evaluate((element, { height, width }) => {
if (height !== undefined) element.style.height = height;
if (width !== undefined) element.style.width = width;
if (height !== undefined) element.style.height = typeof height === 'number' ? `${height}px` : height;
if (width !== undefined) element.style.width = typeof width === 'number' ? `${width}px` : width;
}, dimensions);
};
}
Expand Down
4 changes: 2 additions & 2 deletions e2e/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const config: PlaywrightTestConfig = {
use: {
headless: true,
locale: 'en-us',
viewport: { width: 785, height: 600 },
viewport: { width: 785, height: 1000 },
trace: 'retain-on-failure',
screenshot: 'off', // already testing screenshots
video: 'retain-on-failure',
Expand All @@ -39,7 +39,7 @@ const config: PlaywrightTestConfig = {
},
},
// TODO limit this to only flaky tests. Watch https://github.com/microsoft/playwright/issues/15657
retries: 1,
retries: isCI ? 1 : 0,
forbidOnly: isCI,
timeout: 10 * 1000,
preserveOutput: 'failures-only',
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 5193a64

Please sign in to comment.