From f78d38358988e84c41902ca259e0e254084f6063 Mon Sep 17 00:00:00 2001 From: AtofStryker Date: Wed, 8 Jan 2025 16:43:41 -0500 Subject: [PATCH] chore: update welcome screen for Cypress 14 --- .../data-context/src/data/coreDataShape.ts | 2 - .../src/sources/MigrationDataSource.ts | 31 ----- .../support/mock-graphql/stubgql-Query.ts | 10 -- packages/graphql/schemas/schema.graphql | 3 - .../src/schemaTypes/objectTypes/gql-Query.ts | 11 -- .../launchpad/cypress/e2e/migration.cy.ts | 122 ------------------ .../launchpad/cypress/e2e/slow-network.cy.ts | 7 - packages/launchpad/src/Main.vue | 3 - .../src/migration/MajorVersionWelcome.cy.tsx | 23 ++-- .../src/migration/MajorVersionWelcome.vue | 79 +++++------- 10 files changed, 45 insertions(+), 246 deletions(-) diff --git a/packages/data-context/src/data/coreDataShape.ts b/packages/data-context/src/data/coreDataShape.ts index 3e37c90a35ee..658ffced2aad 100644 --- a/packages/data-context/src/data/coreDataShape.ts +++ b/packages/data-context/src/data/coreDataShape.ts @@ -94,7 +94,6 @@ export interface WizardDataShape { export interface MigrationDataShape { // TODO: have the model of migration here step: MigrationStep - videoEmbedHtml: string | null legacyConfigForMigration?: LegacyCypressConfigJson | null filteredSteps: MigrationStep[] flags: { @@ -225,7 +224,6 @@ export function makeCoreData (modeOptions: Partial = {}): CoreDa }, migration: { step: 'renameAuto', - videoEmbedHtml: null, legacyConfigForMigration: null, filteredSteps: [...MIGRATION_STEPS], flags: { diff --git a/packages/data-context/src/sources/MigrationDataSource.ts b/packages/data-context/src/sources/MigrationDataSource.ts index a5c00f14b086..0d2d67790aa3 100644 --- a/packages/data-context/src/sources/MigrationDataSource.ts +++ b/packages/data-context/src/sources/MigrationDataSource.ts @@ -96,37 +96,6 @@ export class MigrationDataSource { return this.ctx.lifecycleManager.metaState.needsCypressJsonMigration && Boolean(legacyConfigFileExists) } - async getVideoEmbedHtml () { - if (this.ctx.coreData.migration.videoEmbedHtml) { - return this.ctx.coreData.migration.videoEmbedHtml - } - - const versionData = await this.ctx.versions.versionData() - const embedOnLink = `https://on.cypress.io/v13-video-embed/${versionData.current.version}` - - debug(`Getting videoEmbedHtml at link: ${embedOnLink}`) - - // Time out request if it takes longer than 3 seconds - const controller = new AbortController() - const timeoutId = setTimeout(() => controller.abort(), 3000) - - try { - const response = await this.ctx.util.fetch(embedOnLink, { method: 'GET', signal: controller.signal }) - const { videoHtml } = await response.json() - - this.ctx.update((d) => { - d.migration.videoEmbedHtml = videoHtml - }) - - return videoHtml - } catch { - // fail silently, no user-facing error is needed - return null - } finally { - clearTimeout(timeoutId) - } - } - async getComponentTestingMigrationStatus () { debug('getComponentTestingMigrationStatus: start') if (!this.legacyConfig || !this.ctx.currentProject) { diff --git a/packages/frontend-shared/cypress/support/mock-graphql/stubgql-Query.ts b/packages/frontend-shared/cypress/support/mock-graphql/stubgql-Query.ts index 8a2b9860bf48..14dabf0b80a0 100644 --- a/packages/frontend-shared/cypress/support/mock-graphql/stubgql-Query.ts +++ b/packages/frontend-shared/cypress/support/mock-graphql/stubgql-Query.ts @@ -43,14 +43,4 @@ export const stubQuery: MaybeResolver = { scaffoldedFiles () { return null }, - videoEmbedHtml () { - return `