diff --git a/e2e/playwright/projects.spec.ts b/e2e/playwright/projects.spec.ts index 504f385a4..8f8a6b66e 100644 --- a/e2e/playwright/projects.spec.ts +++ b/e2e/playwright/projects.spec.ts @@ -8,6 +8,7 @@ import { createProject, getPlaywrightDownloadDir, orRunWhenFullSuiteEnabled, + runningOnWindows, } from './test-utils' import fsp from 'fs/promises' import fs from 'fs' @@ -351,6 +352,9 @@ test( 'open a file in a project works and renders, open another file in the same project with errors, it should clear the scene', { tag: '@electron' }, async ({ context, page }, testInfo) => { + if (runningOnWindows()) { + test.fixme(orRunWhenFullSuiteEnabled()) + } await context.folderSetupFn(async (dir) => { const bracketDir = path.join(dir, 'bracket') await fsp.mkdir(bracketDir, { recursive: true }) @@ -1328,6 +1332,9 @@ test( 'Can load a file with CRLF line endings', { tag: '@electron' }, async ({ context, page }, testInfo) => { + if (runningOnWindows()) { + test.fixme(orRunWhenFullSuiteEnabled()) + } await context.folderSetupFn(async (dir) => { const routerTemplateDir = path.join(dir, 'router-template-slate') await fsp.mkdir(routerTemplateDir, { recursive: true }) diff --git a/e2e/playwright/test-utils.test.ts b/e2e/playwright/test-utils.test.ts index 0d0521084..e8dc1491b 100644 --- a/e2e/playwright/test-utils.test.ts +++ b/e2e/playwright/test-utils.test.ts @@ -69,28 +69,31 @@ describe('utility to bypass unreliable tests', () => { afterAll(() => { process.env = { ...originalEnv } }) + it('always runs them on dedicated branch', () => { process.env.GITHUB_EVENT_NAME = 'push' process.env.GITHUB_REF = 'refs/heads/all-e2e' process.env.GITHUB_HEAD_REF = '' process.env.GITHUB_BASE_REF = '' - const condition = orRunWhenFullSuiteEnabled() - expect(condition).toBe(false) + const shouldSkip = orRunWhenFullSuiteEnabled() + expect(shouldSkip).toBe(false) }) + it('skips them on the main branch', () => { process.env.GITHUB_EVENT_NAME = 'push' process.env.GITHUB_REF = 'refs/heads/main' process.env.GITHUB_HEAD_REF = '' process.env.GITHUB_BASE_REF = '' - const condition = orRunWhenFullSuiteEnabled() - expect(condition).toBe(true) + const shouldSkip = orRunWhenFullSuiteEnabled() + expect(shouldSkip).toBe(true) }) + it('skips them on pull requests', () => { process.env.GITHUB_EVENT_NAME = 'pull_request' process.env.GITHUB_REF = 'refs/pull/5883/merge' process.env.GITHUB_HEAD_REF = 'my-branch' process.env.GITHUB_BASE_REF = 'main' - const condition = orRunWhenFullSuiteEnabled() - expect(condition).toBe(true) + const shouldSkip = orRunWhenFullSuiteEnabled() + expect(shouldSkip).toBe(true) }) }) diff --git a/playwright.electron.config.ts b/playwright.electron.config.ts index 19b2fc82b..2276f3486 100644 --- a/playwright.electron.config.ts +++ b/playwright.electron.config.ts @@ -7,6 +7,7 @@ import { platform } from 'os' export default defineConfig({ timeout: 120_000, // override the default 30s timeout testDir: './e2e/playwright', + testIgnore: '*.test.ts', // ignore unit tests /* Run tests in files in parallel */ fullyParallel: true, /* Fail the build on CI if you accidentally left test.only in the source code. */