Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
flotwig committed Sep 7, 2022
1 parent 804f7e7 commit 7b473de
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/graphql/schemas/schema.graphql
Expand Up @@ -23,7 +23,7 @@ enum AuthStateNameEnum {
"""Container representing a browser"""
type Browser implements Node {
channel: String!
disabled: Boolean!
disabled: Boolean
displayName: String!
family: BrowserFamily!

Expand Down
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion packages/server/lib/unhandled_exceptions.ts
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion packages/server/lib/util/print-run.ts
Expand Up @@ -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:'.
Expand Down
3 changes: 3 additions & 0 deletions packages/server/test/unit/unhandled_exceptions_spec.js
Expand Up @@ -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')
}

Expand All @@ -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
})
Expand Down
5 changes: 0 additions & 5 deletions 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
Expand Down
6 changes: 5 additions & 1 deletion system-tests/lib/system-tests.ts
Expand Up @@ -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()
Expand Down

5 comments on commit 7b473de

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 7b473de Sep 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/10.8.0/linux-x64/webkit-experimental-7b473de595f050324f0e4f1f8f9990641da7d263/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 7b473de Sep 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux arm64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/10.8.0/linux-arm64/webkit-experimental-7b473de595f050324f0e4f1f8f9990641da7d263/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 7b473de Sep 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin arm64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/10.8.0/darwin-arm64/webkit-experimental-7b473de595f050324f0e4f1f8f9990641da7d263/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 7b473de Sep 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/10.8.0/darwin-x64/webkit-experimental-7b473de595f050324f0e4f1f8f9990641da7d263/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 7b473de Sep 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the win32 x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/10.8.0/win32-x64/webkit-experimental-7b473de595f050324f0e4f1f8f9990641da7d263/cypress.tgz

Please sign in to comment.