diff --git a/graphql-codegen.yml b/graphql-codegen.yml index 633927cd77..c70f4e72a2 100644 --- a/graphql-codegen.yml +++ b/graphql-codegen.yml @@ -44,24 +44,6 @@ config: DateTime: string JSON: any generates: - './packages/data-context/src/gen/all-operations.gen.ts': - config: - <<: *documentFilters - flattenGeneratedTypes: true - schema: 'packages/graphql/schemas/schema.graphql' - documents: - - './packages/frontend-shared/src/gql-components/**/*.{vue,ts,tsx,js,jsx}' - - './packages/app/src/**/*.{vue,ts,tsx,js,jsx}' - - './packages/launchpad/src/**/*.{vue,ts,tsx,js,jsx}' - plugins: - - add: - content: '/* eslint-disable */' - - 'typescript': - noExport: true - - 'typescript-operations': - noExport: true - - 'typed-document-node' - ### # Generates types for us to infer the correct "source types" when we mock out on the frontend # This ensures we have proper type checking when we're using cy.mountFragment in component tests diff --git a/npm/webpack-dev-server-fresh/test/.mocharc.js b/npm/webpack-dev-server-fresh/test/.mocharc.js index 44e0d5a0f7..b41c643ee9 100644 --- a/npm/webpack-dev-server-fresh/test/.mocharc.js +++ b/npm/webpack-dev-server-fresh/test/.mocharc.js @@ -1,3 +1,4 @@ module.exports = { spec: 'test/**/*.spec.ts', + timeout: 10000, } diff --git a/npm/webpack-dev-server/test/.mocharc.js b/npm/webpack-dev-server/test/.mocharc.js index 44e0d5a0f7..b41c643ee9 100644 --- a/npm/webpack-dev-server/test/.mocharc.js +++ b/npm/webpack-dev-server/test/.mocharc.js @@ -1,3 +1,4 @@ module.exports = { spec: 'test/**/*.spec.ts', + timeout: 10000, } diff --git a/packages/app/cypress/e2e/sidebar_navigation.cy.ts b/packages/app/cypress/e2e/sidebar_navigation.cy.ts index 09e4a415b8..77c9cab23e 100644 --- a/packages/app/cypress/e2e/sidebar_navigation.cy.ts +++ b/packages/app/cypress/e2e/sidebar_navigation.cy.ts @@ -65,6 +65,7 @@ describe('Sidebar Navigation', () => { it('closes the left nav bar when clicking the expand button and persist the state if browser is refreshed', () => { cy.findByLabelText('Sidebar').closest('[aria-expanded]').should('have.attr', 'aria-expanded', 'true') + cy.contains('todos') cy.findAllByText('todos').eq(1).as('title') cy.get('@title').should('be.visible') diff --git a/packages/app/cypress/e2e/specs_list_e2e.cy.ts b/packages/app/cypress/e2e/specs_list_e2e.cy.ts index 7b8c464115..3ef7c0f98f 100644 --- a/packages/app/cypress/e2e/specs_list_e2e.cy.ts +++ b/packages/app/cypress/e2e/specs_list_e2e.cy.ts @@ -20,6 +20,7 @@ describe('App: Spec List (E2E)', () => { }) cy.visitApp() + cy.contains('E2E Specs') }) it('shows the "Specs" navigation as highlighted in the lefthand nav bar', () => { diff --git a/packages/app/cypress/e2e/top-nav.cy.ts b/packages/app/cypress/e2e/top-nav.cy.ts index 87977c432a..86f49c62a6 100644 --- a/packages/app/cypress/e2e/top-nav.cy.ts +++ b/packages/app/cypress/e2e/top-nav.cy.ts @@ -1,15 +1,18 @@ import type { SinonStub } from 'sinon' import defaultMessages from '@packages/frontend-shared/src/locales/en-US.json' +import type Sinon from 'sinon' const pkg = require('@packages/root') const loginText = defaultMessages.topNav.login +beforeEach(() => { + cy.clock(Date.UTC(2021, 9, 30), ['Date']) +}) + describe('App Top Nav Workflows', () => { beforeEach(() => { cy.scaffoldProject('launchpad') - - cy.clock(Date.UTC(2021, 9, 30), ['Date']) }) describe('Page Name', () => { @@ -219,16 +222,15 @@ describe('App Top Nav Workflows', () => { context('version data unreachable', () => { it('treats unreachable data as current version', () => { cy.withCtx((ctx, o) => { + (ctx.util.fetch as Sinon.SinonStub).restore() const oldFetch = ctx.util.fetch - o.sinon.stub(ctx.util, 'fetch').get(() => { - return async (url: RequestInfo, init?: RequestInit) => { - if (['https://download.cypress.io/desktop.json', 'https://registry.npmjs.org/cypress'].includes(String(url))) { - throw new Error(String(url)) - } - - return oldFetch(url, init) + o.sinon.stub(ctx.util, 'fetch').callsFake(async (url: RequestInfo | URL, init?: RequestInit) => { + if (['https://download.cypress.io/desktop.json', 'https://registry.npmjs.org/cypress'].includes(String(url))) { + throw new Error(String(url)) } + + return oldFetch(url, init) }) }) @@ -627,6 +629,8 @@ describe('Growth Prompts Can Open Automatically', () => { ) cy.visitApp() + cy.contains('E2E Specs') + cy.wait(1000) cy.contains('Configure CI').should('be.visible') }) @@ -642,6 +646,8 @@ describe('Growth Prompts Can Open Automatically', () => { ) cy.visitApp() + cy.contains('E2E Specs') + cy.wait(1000) cy.contains('Configure CI').should('not.exist') }) }) diff --git a/packages/app/src/main.ts b/packages/app/src/main.ts index c0c1eb7ca8..4404c76e84 100644 --- a/packages/app/src/main.ts +++ b/packages/app/src/main.ts @@ -38,9 +38,11 @@ app.use(Toast, { closeOnClick: false, }) -app.use(urql, makeUrqlClient({ target: 'app', namespace: config.namespace, socketIoRoute: config.socketIoRoute })) -app.use(createRouter()) -app.use(createI18n()) -app.use(createPinia()) +makeUrqlClient({ target: 'app', namespace: config.namespace, socketIoRoute: config.socketIoRoute }).then((client) => { + app.use(urql, client) + app.use(createRouter()) + app.use(createI18n()) + app.use(createPinia()) -app.mount('#app') + app.mount('#app') +}) diff --git a/packages/app/src/navigation/SidebarNavigation.vue b/packages/app/src/navigation/SidebarNavigation.vue index f691b62a30..347add500f 100644 --- a/packages/app/src/navigation/SidebarNavigation.vue +++ b/packages/app/src/navigation/SidebarNavigation.vue @@ -131,7 +131,7 @@ query SideBarNavigation { } ` -const query = useQuery({ query: SideBarNavigationDocument, requestPolicy: 'network-only' }) +const query = useQuery({ query: SideBarNavigationDocument }) const setPreferences = useMutation(SideBarNavigation_SetPreferencesDocument) diff --git a/packages/app/src/pages/Specs/Index.vue b/packages/app/src/pages/Specs/Index.vue index 0b545eb69b..bc39deb8e6 100644 --- a/packages/app/src/pages/Specs/Index.vue +++ b/packages/app/src/pages/Specs/Index.vue @@ -21,10 +21,6 @@ @showCreateSpecModal="showCreateSpecModal" /> - -