diff --git a/packages/graphql/schemas/schema.graphql b/packages/graphql/schemas/schema.graphql index b306ff8bc67a..154ee28131a1 100644 --- a/packages/graphql/schemas/schema.graphql +++ b/packages/graphql/schemas/schema.graphql @@ -23,7 +23,7 @@ enum AuthStateNameEnum { """Container representing a browser""" type Browser implements Node { channel: String! - disabled: Boolean! + disabled: Boolean displayName: String! family: BrowserFamily! diff --git a/packages/graphql/src/schemaTypes/objectTypes/gql-Browser.ts b/packages/graphql/src/schemaTypes/objectTypes/gql-Browser.ts index 8b3bec0727a7..b4b67d0efc03 100644 --- a/packages/graphql/src/schemaTypes/objectTypes/gql-Browser.ts +++ b/packages/graphql/src/schemaTypes/objectTypes/gql-Browser.ts @@ -7,7 +7,7 @@ export const Browser = objectType({ node: (obj, args, ctx) => ctx.browser.idForBrowser(obj), definition (t) { t.nonNull.string('channel') - t.nonNull.boolean('disabled') + t.boolean('disabled') t.nonNull.boolean('isSelected', { resolve: (source, args, ctx) => ctx.browser.isSelected(source), diff --git a/packages/server/lib/unhandled_exceptions.ts b/packages/server/lib/unhandled_exceptions.ts index ce940b8cb0f2..42181aefc388 100644 --- a/packages/server/lib/unhandled_exceptions.ts +++ b/packages/server/lib/unhandled_exceptions.ts @@ -3,7 +3,7 @@ const debug = Debug('cypress:server:unhandled_exceptions') export function handle (shouldExitCb?: (err: Error) => boolean) { function globalExceptionHandler (err: Error) { - if (!shouldExitCb?.(err)) { + if (shouldExitCb && !shouldExitCb(err)) { debug('suppressing unhandled exception, not exiting %o', { err }) handle(shouldExitCb) diff --git a/packages/server/lib/util/print-run.ts b/packages/server/lib/util/print-run.ts index 36db19dea534..ed921e6daf85 100644 --- a/packages/server/lib/util/print-run.ts +++ b/packages/server/lib/util/print-run.ts @@ -185,7 +185,7 @@ export function displayRunStarting (options: { browser: Browser, config: Cfg, gr const experimental = experiments.getExperimentsFromResolved(config.resolved) const enabledExperiments = _.pickBy(experimental, _.property('enabled')) - const hasExperiments = !_.isEmpty(enabledExperiments) + const hasExperiments = !process.env.CYPRESS_INTERNAL_SKIP_EXPERIMENT_LOGS && !_.isEmpty(enabledExperiments) // if we show Node Version, then increase 1st column width // to include wider 'Node Version:'. diff --git a/packages/server/test/unit/unhandled_exceptions_spec.js b/packages/server/test/unit/unhandled_exceptions_spec.js index f220bb7e163b..2432cc3cc32a 100644 --- a/packages/server/test/unit/unhandled_exceptions_spec.js +++ b/packages/server/test/unit/unhandled_exceptions_spec.js @@ -15,6 +15,7 @@ describe('unhandled_exceptions: infinite loop guard', () => { get logException () { errCount++ if (errCount < INFINITE_LOOP_GUARD) { + // simulate an unhandled exception in sentry throw new SyntaxError('Invalid file') } @@ -23,6 +24,8 @@ describe('unhandled_exceptions: infinite loop guard', () => { }, }) + require('../../lib/unhandled_exceptions').handle() + sinon.stub(process, 'exit').callsFake(() => { // Should only be hit if we hit the infinite loop }) diff --git a/packages/types/src/browser.ts b/packages/types/src/browser.ts index 2f8987213fd4..56b09de14a0e 100644 --- a/packages/types/src/browser.ts +++ b/packages/types/src/browser.ts @@ -1,10 +1,5 @@ export const BROWSER_FAMILY = ['chromium', 'firefox', 'webkit'] -if (process.env.CYPRESS_INTERNAL_ENV === 'production') { - // gate webkit behind env, while still keeping types consistent - delete BROWSER_FAMILY[2] -} - type BrowserName = 'electron' | 'chrome' | 'chromium' | 'firefox' | 'webkit' | string export type BrowserChannel = 'stable' | 'canary' | 'beta' | 'dev' | 'nightly' | string diff --git a/system-tests/lib/system-tests.ts b/system-tests/lib/system-tests.ts index 7c04e5dd43ff..054ceaf6d0fe 100644 --- a/system-tests/lib/system-tests.ts +++ b/system-tests/lib/system-tests.ts @@ -928,7 +928,11 @@ const systemTests = { ...(options.noExit ? { CYPRESS_INTERNAL_FORCE_FILEWATCH: '1' } : {}), // opt in to WebKit experimental support if we are running w WebKit - ...(specifiedBrowser === 'webkit' ? { CYPRESS_experimentalWebKitSupport: 'true' } : {}), + ...(specifiedBrowser === 'webkit' ? { + CYPRESS_experimentalWebKitSupport: 'true', + // prevent snapshots from failing due to "Experiments: experimentalWebKitSupport=true" difference + CYPRESS_INTERNAL_SKIP_EXPERIMENT_LOGS: '1', + } : {}), }) .extend(options.processEnv) .value()