From ca7bad2e16165fe68d41014343d1a3b49cd3460e Mon Sep 17 00:00:00 2001 From: Ryan Manuel Date: Mon, 28 Aug 2023 19:48:06 -0500 Subject: [PATCH] fix last flake --- .../cypress/e2e/e2ePluginSetup.ts | 1 - .../cypress/e2e/config-warning.cy.ts | 21 +------------------ .../cypress-component-only.config.js | 16 ++++++++++++++ 3 files changed, 17 insertions(+), 21 deletions(-) create mode 100644 system-tests/projects/experimentalSingleTabRunMode/cypress-component-only.config.js diff --git a/packages/frontend-shared/cypress/e2e/e2ePluginSetup.ts b/packages/frontend-shared/cypress/e2e/e2ePluginSetup.ts index 19f307681ee1..d98036679482 100644 --- a/packages/frontend-shared/cypress/e2e/e2ePluginSetup.ts +++ b/packages/frontend-shared/cypress/e2e/e2ePluginSetup.ts @@ -438,7 +438,6 @@ async function makeE2ETasks () { // Handle any pre-loading that should occur based on the launch arg settings await ctx.initializeMode() - await ctx.lifecycleManager.waitForInitializeSuccess() return { modeOptions, diff --git a/packages/launchpad/cypress/e2e/config-warning.cy.ts b/packages/launchpad/cypress/e2e/config-warning.cy.ts index ae7c6f65065f..39be86e5fe56 100644 --- a/packages/launchpad/cypress/e2e/config-warning.cy.ts +++ b/packages/launchpad/cypress/e2e/config-warning.cy.ts @@ -75,26 +75,7 @@ describe('baseUrl', () => { describe('experimentalSingleTabRunMode', () => { it('is a valid config for component testing', () => { cy.scaffoldProject('experimentalSingleTabRunMode') - cy.openProject('experimentalSingleTabRunMode', ['--component']) - cy.withCtx(async (ctx) => { - await ctx.actions.file.writeFileInProject('cypress.config.js', ` - const { defineConfig } = require('cypress') - - module.exports = defineConfig({ - component: { - experimentalSingleTabRunMode: true, - devServer () { - // This test doesn't need to actually run any component tests - // so we create a fake dev server to make it run faster and - // avoid flake on CI. - return { - port: 1234, - close: () => {}, - } - }, - }, - })`) - }) + cy.openProject('experimentalSingleTabRunMode', ['--component', '--config-file', 'cypress-component-only.config.js']) cy.visitLaunchpad() cy.skipWelcome() diff --git a/system-tests/projects/experimentalSingleTabRunMode/cypress-component-only.config.js b/system-tests/projects/experimentalSingleTabRunMode/cypress-component-only.config.js new file mode 100644 index 000000000000..3111795b2c36 --- /dev/null +++ b/system-tests/projects/experimentalSingleTabRunMode/cypress-component-only.config.js @@ -0,0 +1,16 @@ +const { defineConfig } = require('cypress') + +module.exports = defineConfig({ + component: { + experimentalSingleTabRunMode: true, + devServer () { + // This test doesn't need to actually run any component tests + // so we create a fake dev server to make it run faster and + // avoid flake on CI. + return { + port: 1234, + close: () => {}, + } + }, + }, +})