Skip to content

Commit

Permalink
refactor(e2e): Switch e2e tests to HEADLESS mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Vere-Grey committed Jan 17, 2025
1 parent ef2e462 commit 66aef75
Show file tree
Hide file tree
Showing 15 changed files with 8 additions and 4 deletions.
1 change: 0 additions & 1 deletion packages/suite-desktop-core/e2e/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ const config: PlaywrightTestConfig = {
workers: 1, // to disable parallelism between test files
use: {
viewport: { width: 1280, height: 720 },
headless: process.env.HEADLESS === 'true',
trace: 'on',
video: 'on',
screenshot: 'on',
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.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export class OnboardingActions {
readonly createWalletButton: Locator;
readonly selectSeedTypeOpenButton: Locator;
readonly selectSeedConfirmButton: Locator;
readonly continueAtYourOwnRiskButton: Locator;

isModelWithSecureElement = () => ['T2B1', 'T3T1'].includes(this.model);

Expand Down Expand Up @@ -77,6 +78,7 @@ export class OnboardingActions {
this.selectSeedConfirmButton = this.page.getByTestId(
'@onboarding/select-seed-type-confirm',
);
this.continueAtYourOwnRiskButton = this.page.getByTestId('@continue-to-suite');
}

@step()
Expand All @@ -90,6 +92,9 @@ export class OnboardingActions {

@step()
async completeOnboarding({ enableViewOnly = false } = {}) {
if (await this.continueAtYourOwnRiskButton.isVisible()) {
await this.page.getByTestId('@continue-to-suite').click();
}
await this.disableFirmwareHashCheck();
await this.optionallyDismissFwHashCheckError();
await this.analyticsPage.continueButton.click();
Expand Down
6 changes: 3 additions & 3 deletions packages/suite-desktop-core/e2e/tests/browser/safari.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ test.use({ startEmulator: false, browserName: 'webkit' });
test.describe('Safari', { tag: ['@group=other', '@webOnly', '@snapshot'] }, () => {
test('Suite does not support Safari', async ({ page, onboardingPage }) => {
await expect(page.locator('body')).toMatchAriaSnapshot(safariAria);
await expect(page.getByTestId('@continue-to-suite')).toHaveText('Continue at my own risk');
await page.getByTestId('@continue-to-suite').click();
await expect(onboardingPage.welcomeTitle).toBeVisible({ timeout: 20_000 });
await expect(onboardingPage.continueAtYourOwnRiskButton).toHaveText(
'Continue at my own risk',
);
});
});

0 comments on commit 66aef75

Please sign in to comment.