repo stringlengths 7 64 | file_url stringlengths 81 338 | file_path stringlengths 5 257 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:25:31 2026-01-05 01:50:38 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/reporter/src/header/stats.tsx | packages/reporter/src/header/stats.tsx | import cs from 'classnames'
import { observer } from 'mobx-react'
import React from 'react'
import type { StatsStore } from './stats-store'
import { IconStatusFailedSimple, IconStatusPassedSimple, IconStatusSkippedOutline } from '@cypress-design/react-icon'
const count = (num: number) => num > 0 ? num : '--'
interfa... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/reporter/src/header/stats.cy.tsx | packages/reporter/src/header/stats.cy.tsx | import { AppState } from '../lib/app-state'
import { StatsStore } from './stats-store'
import Header from './header'
import React from 'react'
describe('stats score header', () => {
it('Shows stats with more than 4 digit test count nicely', () => {
const appState = new AppState()
const statsStore = new Stats... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/reporter/src/header/stats-store.ts | packages/reporter/src/header/stats-store.ts | import _ from 'lodash'
import { action, computed, observable, makeObservable } from 'mobx'
import { TestState } from '../test/test-model'
import type { IntervalID } from '../lib/types'
import type { StatsStoreStartInfo } from '@packages/types'
const defaults = {
numPassed: 0,
numFailed: 0,
numPending: 0,
_st... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/reporter/src/header/header.tsx | packages/reporter/src/header/header.tsx | import { observer } from 'mobx-react'
import React from 'react'
// @ts-ignore
import Tooltip from '@cypress/react-tooltip'
import Button from '@cypress-design/react-button'
import defaultEvents, { Events } from '../lib/events'
import type { AppState } from '../lib/app-state'
import { action } from 'mobx'
import type { ... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/reporter/src/shared/SpecFileName.tsx | packages/reporter/src/shared/SpecFileName.tsx | import React from 'react'
import { getFilenameParts } from '../lib/util'
const displayFileName = (spec: Cypress.Cypress['spec']) => {
const specParts = getFilenameParts(spec.name)
return (
<>
<span className='spec-name'>{specParts[0]}</span><span className='spec-file-extension'>{specParts[1]}</span>
... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/reporter/cypress/support/e2e.ts | packages/reporter/cypress/support/e2e.ts | import 'cypress-real-events/support'
// @ts-ignore
import { installCustomPercyCommand } from '@packages/frontend-shared/cypress/support/customPercyCommand'
installCustomPercyCommand({
before () {
cy.get('.toggle-specs-button').should('be.visible')
},
elementOverrides: {
'.command-progress': true,
'.c... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/reporter/cypress/support/utils.ts | packages/reporter/cypress/support/utils.ts | import { EventEmitter } from 'events'
import CommandModel from './../../src/commands/command-model'
const { _ } = Cypress
interface File {
file: string
line: number
column: number
}
interface HandlesFileOpeningProps {
getRunner: Function
selector: string
file: File
stackTrace?: boolean
previousClickS... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/reporter/cypress/support/component.ts | packages/reporter/cypress/support/component.ts | // tslint:disable-next-line:no-implicit-dependencies - cypress
import { mount } from 'cypress/react'
import 'cypress-real-events/support'
import { installCustomPercyCommand } from '@packages/frontend-shared/cypress/support/customPercyCommand'
import '../../src/main.scss'
declare global {
namespace Cypress {
int... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/reporter/cypress/e2e/hooks.cy.ts | packages/reporter/cypress/e2e/hooks.cy.ts | import { EventEmitter } from 'events'
import { RootRunnable } from '../../src/runnables/runnables-store'
import { itHandlesFileOpening } from '../support/utils'
describe('hooks', () => {
let runner: EventEmitter
let runnables: RootRunnable
beforeEach(() => {
cy.fixture('runnables_hooks').then((_runnables) =... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/reporter/cypress/e2e/commands.cy.ts | packages/reporter/cypress/e2e/commands.cy.ts | import { EventEmitter } from 'events'
import { RootRunnable } from '../../src/runnables/runnables-store'
import { addCommand } from '../support/utils'
import { MAX_VISIBILITY_CHECK_ELEMENTS } from '@packages/types'
describe('commands', { viewportHeight: 1000 }, () => {
let runner: EventEmitter
let runnables: RootR... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | true |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/reporter/cypress/e2e/tests.cy.ts | packages/reporter/cypress/e2e/tests.cy.ts | import { EventEmitter } from 'events'
import { RootRunnable } from '../../src/runnables/runnables-store'
import { MobxRunnerStore } from '@packages/app/src/store/mobx-runner-store'
let runner: EventEmitter
let runnables: RootRunnable
function visitAndRenderReporter (studioEnabled: boolean = false, studioActive: boole... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/reporter/cypress/e2e/suites.cy.ts | packages/reporter/cypress/e2e/suites.cy.ts | import { MobxRunnerStore } from '@packages/app/src/store'
import { EventEmitter } from 'events'
import { RootRunnable } from '../../src/runnables/runnables-store'
const runnerStore = new MobxRunnerStore('e2e')
runnerStore.setSpec({
name: 'foo.js',
relative: 'relative/path/to/foo.js',
absolute: '/absolute/path/t... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/reporter/cypress/e2e/routes.cy.ts | packages/reporter/cypress/e2e/routes.cy.ts | import { EventEmitter } from 'events'
import { RootRunnable } from './../../src/runnables/runnables-store'
describe('routes', () => {
let runner: EventEmitter
let runnables: RootRunnable
let start: Function
beforeEach(() => {
cy.fixture('runnables_routes').then((_runnables) => {
runnables = _runnabl... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/reporter/cypress/e2e/memory.cy.ts | packages/reporter/cypress/e2e/memory.cy.ts | import { EventEmitter } from 'events'
import { RootRunnable } from '../../src/runnables/runnables-store'
import { MobxRunnerStore } from '@packages/app/src/store/mobx-runner-store'
let runner: EventEmitter
let runnables: RootRunnable
const { _ } = Cypress
function visitAndRenderReporter (studioEnabled: boolean = fals... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/reporter/cypress/e2e/test_errors.cy.ts | packages/reporter/cypress/e2e/test_errors.cy.ts | import { EventEmitter } from 'events'
import { itHandlesFileOpening } from '../support/utils'
import Err from '../../src/errors/err-model'
import { RootRunnable } from '../../src/runnables/runnables-store'
describe('test errors', () => {
let commandErr: Partial<Err>
let setError: Function
let runnablesWithErr: R... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/reporter/cypress/e2e/agents.cy.ts | packages/reporter/cypress/e2e/agents.cy.ts | import { EventEmitter } from 'events'
import { RootRunnable } from './../../src/runnables/runnables-store'
describe('agents', () => {
let runner: EventEmitter
let runnables: RootRunnable
let start: Function
beforeEach(() => {
cy.fixture('runnables_agents').then((_runnables) => {
runnables = _runnabl... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/reporter/cypress/e2e/shortcuts.cy.ts | packages/reporter/cypress/e2e/shortcuts.cy.ts | import sinon, { SinonStub, SinonSpy } from 'sinon'
import { EventEmitter } from 'events'
type EventEmitterStub = EventEmitter & Stub
interface Stub {
on: SinonStub
emit: SinonSpy
}
const runnerStub = () => {
return {
on: sinon.stub(),
emit: sinon.spy(),
} as EventEmitterStub
}
describe('shortcuts', ... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/reporter/cypress/e2e/header.cy.ts | packages/reporter/cypress/e2e/header.cy.ts | import { TestFilter } from '@packages/types'
import { EventEmitter } from 'events'
import { RootRunnable } from '../../src/runnables/runnables-store'
const { _ } = Cypress
describe('header', () => {
let runner: EventEmitter
let runnables: RootRunnable
function setupReporter (opts?: { testFilter: TestFilter, to... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | ERROR: type should be string, got "https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/reporter/cypress/e2e/meta_&%.cy.ts" | packages/reporter/cypress/e2e/meta_&%.cy.ts | // this ensures that special characters in the spec title are displayed
// properly. it tests the actual reporter instead of the AUT like other tests
describe('special characters', () => {
it('displays file name with decoded special characters', () => {
cy.wrap(Cypress.$(window.top.document.body))
.find('.rep... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/reporter/cypress/e2e/spec_title.cy.ts | packages/reporter/cypress/e2e/spec_title.cy.ts | import { EventEmitter } from 'events'
import { itHandlesFileOpening } from '../support/utils'
describe('spec title', () => {
let runner: EventEmitter
let start: Function
beforeEach(() => {
runner = new EventEmitter()
start = (spec: Cypress.Cypress['spec']) => {
cy.visit('/').then((win) => {
... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/reporter/cypress/e2e/runnables.cy.ts | packages/reporter/cypress/e2e/runnables.cy.ts | import { EventEmitter } from 'events'
import { RootRunnable } from '../../src/runnables/runnables-store'
import { itHandlesFileOpening } from '../support/utils'
import type { BaseReporterProps } from '../../src/main'
import type { RunnablesErrorModel } from '../../src/runnables/runnable-error'
import appState from '../... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/reporter/cypress/e2e/aliases.cy.ts | packages/reporter/cypress/e2e/aliases.cy.ts | import { EventEmitter } from 'events'
import { RootRunnable } from './../../src/runnables/runnables-store'
import { addCommand } from '../support/utils'
describe('aliases', () => {
let runner: EventEmitter
let runnables: RootRunnable
beforeEach(() => {
cy.fixture('runnables_aliases').then((_runnables) => {
... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/reporter/cypress/e2e/unit/scroller.cy.ts | packages/reporter/cypress/e2e/unit/scroller.cy.ts | import sinon, { SinonSpy, SinonFakeTimers } from 'sinon'
import scroller from '../../../src/lib/scroller'
const { _ } = Cypress
interface ContainerProps {
clientHeight?: number
scrollHeight?: number
scrollTop?: number
addEventListener?: SinonSpy
}
type TestContainer = Element & {
addEventListener?: SinonS... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/reporter/cypress/e2e/unit/events.cy.ts | packages/reporter/cypress/e2e/unit/events.cy.ts | import sinon, { SinonSpy, SinonStub } from 'sinon'
import events from '../../../src/lib/events'
import { AppState } from '../../../src/lib/app-state'
import { RunnablesStore } from '../../../src/runnables/runnables-store'
import { Scroller } from '../../../src/lib/scroller'
import { StatsStore } from '../../../src/hea... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/reporter/cypress/e2e/unit/suite_model.cy.ts | packages/reporter/cypress/e2e/unit/suite_model.cy.ts | import Suite from '../../../src/runnables/suite-model'
import TestModel from '../../../src/test/test-model'
const suiteWithChildren = (children: Array<Partial<TestModel | Suite>>) => {
const suite = new Suite({ id: '1', title: '', hooks: [], suites: [], tests: [] }, 0)
suite.children = children.map((child) => ({ ... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/reporter/cypress/e2e/unit/runnables_store.cy.ts | packages/reporter/cypress/e2e/unit/runnables_store.cy.ts | import sinon, { SinonSpy } from 'sinon'
import runnablesStore, { RunnablesStore, RootRunnable, LogProps } from '../../../src/runnables/runnables-store'
import SuiteModel, { SuiteProps } from '../../../src/runnables/suite-model'
import { AppState } from '../../../src/lib/app-state'
import { Scroller } from '../../../sr... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/reporter/cypress/e2e/unit/app_state.cy.ts | packages/reporter/cypress/e2e/unit/app_state.cy.ts | import appState, { AppState } from '../../../src/lib/app-state'
describe('app state', () => {
it('exports singleton by default', () => {
expect(appState).to.be.instanceof(AppState)
})
context('#startRunning', () => {
it('sets isRunning to true', () => {
const instance = new AppState()
insta... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/reporter/cypress/e2e/unit/hook_model.cy.ts | packages/reporter/cypress/e2e/unit/hook_model.cy.ts | import sinon from 'sinon'
import CommandModel from '../../../src/commands/command-model'
import ErrModel from '../../../src/errors/err-model'
import Hook from '../../../src/hooks/hook-model'
describe('Hook model', () => {
let hook: Hook
beforeEach(() => {
hook = new Hook({
hookId: 'h1',
hookName:... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/reporter/cypress/e2e/unit/util.cy.ts | packages/reporter/cypress/e2e/unit/util.cy.ts | import { formatDuration, getFilenameParts } from '../../../src/lib/util'
const compare = (filename, array) => {
expect(getFilenameParts(filename)).to.deep.equal(array)
}
describe('utils', () => {
context('formatDuration', () => {
it('formats no time', () => {
expect(formatDuration(0)).to.equal('--')
... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/reporter/cypress/e2e/unit/stats_store.cy.ts | packages/reporter/cypress/e2e/unit/stats_store.cy.ts | import sinon, { SinonFakeTimers } from 'sinon'
import statsStore, { StatsStore } from '../../../src/header/stats-store'
describe('stats store', () => {
it('exports singleton by default', () => {
expect(statsStore).to.be.instanceof(StatsStore)
})
context('#start', () => {
describe('when running', () => ... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/reporter/cypress/e2e/unit/test_model.cy.ts | packages/reporter/cypress/e2e/unit/test_model.cy.ts | import Err from '../../../src/errors/err-model'
import TestModel, { TestProps, UpdatableTestProps } from '../../../src/test/test-model'
import CommandModel, { CommandProps } from '../../../src/commands/command-model'
import { RouteProps } from '../../../src/routes/route-model'
import { RunnablesStore } from '../../../s... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/reporter/cypress/e2e/unit/formatted_message.cy.ts | packages/reporter/cypress/e2e/unit/formatted_message.cy.ts | import { formattedMessage } from '../../../src/commands/command'
describe('formattedMessage', () => {
it('returns empty string when message is falsy', () => {
const result = formattedMessage('')
expect(result).to.equal('')
})
describe('when assertion', () => {
it('does not display extraneous "*" fo... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/reporter/cypress/e2e/unit/command_model.cy.ts | packages/reporter/cypress/e2e/unit/command_model.cy.ts | import sinon, { SinonFakeTimers } from 'sinon'
import CommandModel, { CommandProps } from '../../../src/commands/command-model'
const LONG_RUNNING_THRESHOLD = 1000
const commandProps = (props?: Partial<CommandProps>) => {
return Object.assign({
renderProps: {},
err: {},
event: false,
number: 1,
... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/reporter/cypress/e2e/unit/err_model.cy.ts | packages/reporter/cypress/e2e/unit/err_model.cy.ts | import Err from '../../../src/errors/err-model'
describe('Err model', () => {
context('.displayMessage', () => {
it('returns combo of name and message', () => {
const err = new Err({ name: 'BadError', message: 'Something went wrong' })
expect(err.displayMessage).to.equal('BadError: Something went wr... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress.config-injectDocumentDomain.ts | packages/driver/cypress.config-injectDocumentDomain.ts | // tslint:disable-next-line: no-implicit-dependencies - cypress
import { defineConfig } from 'cypress'
import { baseConfig } from './cypress.config'
export default defineConfig({
...baseConfig,
e2e: {
...baseConfig.e2e,
specPattern: '{cypress/**/origin/**/*.cy.{js,ts},cypress/**/cookies.cy.js,cypress/**/ne... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/cypress.config.ts | packages/driver/cypress.config.ts | // tslint:disable-next-line: no-implicit-dependencies - cypress
import { defineConfig } from 'cypress'
import { devServer as cypressWebpackDevServer } from '@cypress/webpack-dev-server'
export const baseConfig: Cypress.ConfigOptions = {
projectId: 'ypt4pf',
experimentalMemoryManagement: true,
experimentalWebKitS... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/index.d.ts | packages/driver/index.d.ts | /// <reference path="../../cli/types/index.d.ts" />
/// <reference path="../../cli/types/jquery/index.d.ts" />
export const $Cypress: Cypress.Cypress
export const $: JQuery
export default $Cypress | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/index.ts | packages/driver/index.ts | /// <reference path="../../cli/types/chai-jquery/index.d.ts" />
/// <reference path="../../cli/types/sinon-chai/index.d.ts" />
/// <reference path="../../cli/types/cypress-expect.d.ts" />
/// <reference path="../ts/index.d.ts" />
declare global {
interface Window {
Cypress: Cypress.Cypress
}
}
import $Cypres... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cypress.ts | packages/driver/src/cypress.ts | import _ from 'lodash'
import $ from 'jquery'
import * as blobUtil from 'blob-util'
import minimatch from 'minimatch'
import Promise from 'bluebird'
import sinon from 'sinon'
import fakeTimers from '@sinonjs/fake-timers'
import debugFn from 'debug'
import browserInfo from './cypress/browser'
import $scriptUtils from '... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/main.ts | packages/driver/src/main.ts | import 'setimmediate'
import './config/bluebird'
import './config/jquery'
import './config/lodash'
import $Cypress from './cypress'
import { telemetry } from '@packages/telemetry/browser/client'
// Telemetry has already been initialized in the 'app' package
// but since this is a different package we have to link up ... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/util/config.ts | packages/driver/src/util/config.ts | import _ from 'lodash'
import { testOverrideLevels, validate as validateConfigValues, validateOverridableAtRunTime } from '@packages/config'
import { preprocessForSerialization } from './serialization'
import $errUtils from '../cypress/error_utils'
import type { StateFunc as State } from '../cypress/state'
import type... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/util/what-is-circular.ts | packages/driver/src/util/what-is-circular.ts | const lodash = require('lodash')
export function whatIsCircular (obj) {
if (!lodash.isObject(obj)) {
return
}
return _dfs(obj)
}
function _dfs (obj, parents: any[] = [], parentKeys: any[] = []) {
// recurse depth-first until we hit something we've seen before
for (const key in obj) {
const val = ob... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/util/queue.ts | packages/driver/src/util/queue.ts | import Bluebird from 'bluebird'
interface QueueRunProps {
onRun: () => Bluebird<any> | Promise<any>
onError: (err: Error) => void
onFinish: () => Bluebird<any> | Promise<any>
}
export class Queue<T> {
protected queueables: T[] = []
private _stopped = false
index: number = 0
constructor (queueables: T[]... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/util/escape.ts | packages/driver/src/util/escape.ts | const quotesRe = /('|")/g
const backslashRe = /\\/g
export function escapeQuotes (text) {
// convert to str and escape any single
// or double quotes
return (`${text}`).replace(quotesRe, '\\$1')
}
export function escapeBackslashes (text) {
// convert to str and escape any backslashes
return (`${text}`).repl... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/util/limited_map.ts | packages/driver/src/util/limited_map.ts | import _ from 'lodash'
// IE doesn't support Array.from or Map.prototype.keys
const getMapKeys = (map) => {
if (_.isFunction(Array.from) && _.isFunction(map.keys)) {
return Array.from(map.keys())
}
const keys: any[] = []
map.forEach((key) => {
keys.push(key)
})
return keys
}
class LimitedMap ex... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/util/privileged_channel.ts | packages/driver/src/util/privileged_channel.ts | import Bluebird from 'bluebird'
/**
* prevents further scripts outside of our own and the spec itself from being
* run in the spec frame
* @param specWindow: Window
*/
export function setSpecContentSecurityPolicy (specWindow) {
const metaEl = specWindow.document.createElement('meta')
metaEl.setAttribute('http... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/util/commandAUTCommunication.ts | packages/driver/src/util/commandAUTCommunication.ts | /**
* This function attempts to communicate with the AUT window. We cannot communicate with the AUT if:
* - win is undefined
* - win.location is cross origin except when chrome web security is off.
* @param autWindow - optional, window
* @returns bool
*/
export const isRunnerAbleToCommunicateWithAut = (autWindow?... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/util/trackTopUrl.ts | packages/driver/src/util/trackTopUrl.ts | // trackTopUrl sends messages to the extension about URL changes. The extension needs to
// keep track of these, so it can activate the main tab when the puppeteer plugin
// requests it.
export const trackTopUrl = () => {
// track the initial url
window.postMessage({
message: 'cypress:extension:url:changed',
... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/util/serialization/log.ts | packages/driver/src/util/serialization/log.ts | import _ from 'lodash'
import { isSerializableInCurrentBrowser, preprocessForSerialization } from './index'
import $dom from '../../dom'
interface PreprocessedHTMLElement {
tagName: string
attributes: { [key: string]: string }
innerHTML: string
serializationKey: 'dom'
}
interface PreprocessedFunction {
valu... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/util/serialization/index.ts | packages/driver/src/util/serialization/index.ts | import _ from 'lodash'
import structuredClonePonyfill from 'core-js-pure/actual/structured-clone'
import $stackUtils from '../../cypress/stack_utils'
import $errUtils from '../../cypress/error_utils'
export const UNSERIALIZABLE = '__cypress_unserializable_value'
// If a native structuredClone exists, use that to dete... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cross-origin/cypress.ts | packages/driver/src/cross-origin/cypress.ts | import 'setimmediate'
import '../config/bluebird'
import '../config/jquery'
import '../config/lodash'
import $Cypress from '../cypress'
import { $Cy } from '../cypress/cy'
import { $Location } from '../cypress/location'
import $Commands from '../cypress/commands'
import $errUtils from '../cypress/error_utils'
import ... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cross-origin/origin_fn.ts | packages/driver/src/cross-origin/origin_fn.ts | import type { $Cy } from '../cypress/cy'
import $errUtils from '../cypress/error_utils'
import $utils from '../cypress/utils'
import { $Location } from '../cypress/location'
import { syncConfigToCurrentOrigin, syncEnvToCurrentOrigin } from '../util/config'
import type { Runnable, Test } from 'mocha'
import { LogUtils }... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cross-origin/unsupported_apis.ts | packages/driver/src/cross-origin/unsupported_apis.ts | import type { $Cy } from '../cypress/cy'
import $errUtils from '../cypress/error_utils'
export const handleUnsupportedAPIs = (Cypress: Cypress.Cypress, cy: $Cy) => {
// Nested `origin` is not currently supported, but will be in the future
// @ts-ignore
cy.origin = () => $errUtils.throwErrByPath('origin.unsupport... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cross-origin/communicator.ts | packages/driver/src/cross-origin/communicator.ts | import debugFn from 'debug'
import { EventEmitter } from 'events'
import { preprocessConfig, preprocessEnv } from '../util/config'
import { preprocessForSerialization, reifySerializedError } from '../util/serialization'
import { $Location } from '../cypress/location'
import { preprocessLogForSerialization, reifyLogFrom... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cross-origin/events/test.ts | packages/driver/src/cross-origin/events/test.ts | export const handleTestEvents = (Cypress: Cypress.Cypress) => {
Cypress.specBridgeCommunicator.on('test:before:run', (...args) => {
Cypress.emit('test:before:run', ...args)
})
Cypress.specBridgeCommunicator.on('test:before:run:async', (...args) => {
Cypress.emit('test:before:run:async', ...args)
})
... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cross-origin/events/errors.ts | packages/driver/src/cross-origin/events/errors.ts | import type { $Cy } from '../../cypress/cy'
import $errUtils, { ErrorFromProjectRejectionEvent } from '../../cypress/error_utils'
import type { HandlerType } from '../../cypress/runner'
export const handleErrorEvent = (cy: $Cy, frameType: 'spec' | 'app') => {
return (handlerType: HandlerType) => {
return (event)... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cross-origin/events/cookies.ts | packages/driver/src/cross-origin/events/cookies.ts | import type { SerializableAutomationCookie } from '@packages/server/lib/util/cookies'
import type { ICypress } from '../../cypress'
// cross-origin cookies collected by the the proxy are sent down to the driver
// via this event, so that they can be set via automation once the page has
// loaded. it's necessary to wai... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cross-origin/events/spec_window.ts | packages/driver/src/cross-origin/events/spec_window.ts | import type { $Cy } from '../../cypress/cy'
import { handleErrorEvent } from './errors'
export const handleSpecWindowEvents = (cy: $Cy) => {
// While we must move to pagehide for Chromium, it does not work for our
// needs in Firefox. Until that is addressed, only Chromium uses the pagehide
// event as a proxy f... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cross-origin/events/logs.ts | packages/driver/src/cross-origin/events/logs.ts | export const handleLogs = (Cypress: Cypress.Cypress) => {
const onLogAdded = (attrs) => {
Cypress.specBridgeCommunicator.toPrimary('log:added', attrs)
}
const onLogChanged = (attrs) => {
Cypress.specBridgeCommunicator.toPrimary('log:changed', attrs)
}
Cypress.on('log:added', onLogAdded)
Cypress.on... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cross-origin/events/screenshots.ts | packages/driver/src/cross-origin/events/screenshots.ts | export const handleScreenshots = (Cypress: Cypress.Cypress) => {
Cypress.on('before:screenshot', (config, callbackFn) => {
Cypress.specBridgeCommunicator.once('before:screenshot:end', () => {
callbackFn()
})
Cypress.specBridgeCommunicator.toPrimary('before:screenshot', config)
})
Cypress.on('a... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cross-origin/events/misc.ts | packages/driver/src/cross-origin/events/misc.ts | import type { $Cy } from '../../cypress/cy'
import { $Location } from '../../cypress/location'
export const handleMiscEvents = (Cypress: Cypress.Cypress, cy: $Cy) => {
Cypress.on('viewport:changed', (viewport, callbackFn) => {
Cypress.specBridgeCommunicator.once('viewport:changed:end', () => {
callbackFn()... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cross-origin/events/socket.ts | packages/driver/src/cross-origin/events/socket.ts | const onRequest = async (event, args) => {
// The last argument is the callback, pop that off before messaging primary and call it with the response.
const callback = args.pop()
const response = await Cypress.specBridgeCommunicator.toPrimaryPromise<{ error?: string, response?: any }>({
event,
data: { args... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cross-origin/patches/submit.ts | packages/driver/src/cross-origin/patches/submit.ts | import { handleInvalidTarget } from '../../cy/top_attr_guards'
export const patchFormElementSubmit = (window: Window) => {
const originalSubmit = window.HTMLFormElement.prototype.submit
window.HTMLFormElement.prototype.submit = function () {
handleInvalidTarget(this)
originalSubmit.apply(this)
}
}
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cypress/network_utils.ts | packages/driver/src/cypress/network_utils.ts | import Promise from 'bluebird'
export default {
fetch: (resourceUrl, win = window) => {
return new Promise((resolve, reject) => {
const xhr = new win.XMLHttpRequest()
xhr.onload = function () {
resolve(this.responseText)
}
xhr.onerror = function () {
reject(new Error(`Fe... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cypress/cy.ts | packages/driver/src/cypress/cy.ts | /* eslint-disable prefer-rest-params */
import _ from 'lodash'
import Promise from 'bluebird'
import debugFn from 'debug'
import $utils from './utils'
import $errUtils, { ErrorFromProjectRejectionEvent } from './error_utils'
import $stackUtils from './stack_utils'
import { create as createChai, IChai } from '../cy/ch... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | true |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cypress/chai_jquery.ts | packages/driver/src/cypress/chai_jquery.ts | import _ from 'lodash'
import $dom from '../dom'
import $elements from '../dom/elements'
import type { Methods, PartialAssertionArgs } from './assertions/assert'
import { assert, assertDom, accessors, selectors, wrap } from './assertions/assert'
const maybeCastNumberToString = (num: number | string) => {
// if this ... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cypress/UsKeyboardLayout.ts | packages/driver/src/cypress/UsKeyboardLayout.ts | export const USKeyboard = {
'0': { keyCode: 48, key: '0', code: 'Digit0' },
'1': { keyCode: 49, key: '1', code: 'Digit1' },
'2': { keyCode: 50, key: '2', code: 'Digit2' },
'3': { keyCode: 51, key: '3', code: 'Digit3' },
'4': { keyCode: 52, key: '4', code: 'Digit4' },
'5': { keyCode: 53, key: '5', code: 'Dig... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cypress/mocha.ts | packages/driver/src/cypress/mocha.ts | /* eslint-disable prefer-rest-params */
import _ from 'lodash'
import $errUtils, { CypressError } from './error_utils'
import $utils from './utils'
import $stackUtils from './stack_utils'
import $sourceMapUtils from './source_map_utils'
// in the browser mocha is coming back
// as window
import * as mocha from 'mocha'... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cypress/browser.ts | packages/driver/src/cypress/browser.ts | import _ from 'lodash'
import $utils from './utils'
import $errUtils from './error_utils'
const _isBrowser = (browser, matcher, errPrefix) => {
let isMatch
let exclusive = false
const matchWithExclusion = (objValue, srcValue) => {
if (_.isString(srcValue) && srcValue.startsWith('!')) {
exclusive = tru... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cypress/commands.ts | packages/driver/src/cypress/commands.ts | import _ from 'lodash'
import { allCommands } from '../cy/commands'
import { addCommand as addNetstubbingCommand } from '../cy/net-stubbing'
import $errUtils from './error_utils'
import $stackUtils from './stack_utils'
import type { $Cy } from './cy'
import type { QueryFunction } from './state'
const PLACEHOLDER_COMMA... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cypress/script_utils.ts | packages/driver/src/cypress/script_utils.ts | import Bluebird from 'bluebird'
import $networkUtils from './network_utils'
import $sourceMapUtils from './source_map_utils'
const fetchScript = (scriptWindow, script) => {
return $networkUtils.fetch(script.relativeUrl, scriptWindow)
.then((contents) => {
return [script, contents]
})
}
const extractSourceM... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cypress/setter_getter.ts | packages/driver/src/cypress/setter_getter.ts | import { extend, isObject, isString } from 'lodash'
const reset = (state = {}) => {
// perf loop
for (let key in state) {
delete state[key]
}
return state
}
// a basic object setter / getter class
export default {
create: (state = {}, validate?) => {
const get = (key?) => {
if (key) {
... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cypress/cookies.ts | packages/driver/src/cypress/cookies.ts | import _ from 'lodash'
import Cookies from 'js-cookie'
import { CookieJar } from '@packages/server/lib/util/cookies'
import $errUtils from './error_utils'
let isDebugging = false
let isDebuggingVerbose = false
export const $Cookies = (namespace, domain) => {
const isNamespaced = (name) => {
return _.startsWith... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cypress/clock.ts | packages/driver/src/cypress/clock.ts | import _ from 'lodash'
import fakeTimers from '@sinonjs/fake-timers'
const install = (win, now, methods) => {
return fakeTimers.withGlobal(win).install({
now,
toFake: methods,
})
}
export const create = (win, now, methods) => {
let clock = install(win, now, methods)
const tick = (ms) => {
return ... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cypress/utils.ts | packages/driver/src/cypress/utils.ts | import _ from 'lodash'
import capitalize from 'underscore.string/capitalize'
import methods from 'methods'
import dayjs from 'dayjs'
import $ from 'jquery'
import $dom from '../dom'
import $jquery from '../dom/jquery'
import { $Location } from './location'
import $errUtils from './error_utils'
const customProtocolReg... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cypress/proxy-logging.ts | packages/driver/src/cypress/proxy-logging.ts | import _ from 'lodash'
import type { Interception, Route } from '@packages/net-stubbing/lib/types'
import type { BrowserPreRequest, BrowserResponseReceived, RequestError } from '@packages/proxy/lib/types'
import $errUtils from './error_utils'
import Debug from 'debug'
const debug = Debug('cypress:driver:proxy-logging'... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cypress/setter_getter.d.ts | packages/driver/src/cypress/setter_getter.d.ts | type SetterGetter<S> = {
<K extends keyof S, T extends S[K]>(key: K): T
<K extends keyof S, T extends S[K]>(key: K, value: T): T
}
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cypress/command_queue.ts | packages/driver/src/cypress/command_queue.ts | import _ from 'lodash'
import $ from 'jquery'
import Bluebird from 'bluebird'
import Debug from 'debug'
import { Queue } from '../util/queue'
import $dom from '../dom'
import $utils from './utils'
import $errUtils from './error_utils'
import type $Command from './command'
import type { StateFunc } from './state'
impor... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cypress/screenshot.ts | packages/driver/src/cypress/screenshot.ts | import _ from 'lodash'
import $utils from './utils'
import $errUtils from './error_utils'
const _reset = (): Pick<Cypress.ScreenshotDefaultsOptions, 'capture' | 'scale' | 'disableTimersAndAnimations' | 'screenshotOnRunFailure' | 'blackout' | 'overwrite' | 'onBeforeScreenshot' | 'onAfterScreenshot'> => {
return {
... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cypress/command.ts | packages/driver/src/cypress/command.ts | import _ from 'lodash'
import utils from './utils'
let idCounter = 1
export class $Command {
attributes!: Record<string, any>
state: 'queued' | 'pending' | 'passed' | 'recovered' | 'failed' | 'skipped'
constructor (attrs: any = {}) {
this.reset()
this.state = 'queued'
// if the command came from a... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cypress/stack_utils.ts | packages/driver/src/cypress/stack_utils.ts | // See: ./errorScenarios.md for details about error messages and stack traces
// NOTE: If you modify the logic relating to this file, ensure the
// UI for error code frames works as expected with the binary. This includes each
// browser, as well as e2e and CT testing types. Stack patterns differ in Chrome
// between ... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cypress/element_selector.ts | packages/driver/src/cypress/element_selector.ts | /// <reference types="cypress" />
import _ from 'lodash'
import uniqueSelector from '@cypress/unique-selector'
import $utils from './utils'
import $errUtils from './error_utils'
const VALID_SELECTOR_PRIORITY_REGEX = /^(data\-.+|id|class|tag|attributes|nth\-child|attribute:(.+)|name)$/
export const DEFAULT_SELECTOR_P... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cypress/location.ts | packages/driver/src/cypress/location.ts | // TODO:
// 1. test these method implementations using encoded characters
// look at the spec to figure out whether we SHOULD be decoding them
// or leaving them as encoded. also look at UrlParse to see what it does
//
// 2. there is a bug when handling about:blank which borks it and
// turns it into about://blank
im... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cypress/server.ts | packages/driver/src/cypress/server.ts | import $errUtils from './error_utils'
// override the defaults for all servers
export const defaults = (obj = {}) => {
return $errUtils.throwErrByPath('server.removed', { args: { cmd: 'Cypress.Server.defaults' } })
}
// Left behind for backwards compatibility
// When cy.server() is moved to a plugin, this might be ... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cypress/source_map_utils.ts | packages/driver/src/cypress/source_map_utils.ts | import _ from 'lodash'
import { SourceMapConsumer } from 'source-map'
import type { BasicSourceMapConsumer } from 'source-map'
// @ts-ignore
import mappingsWasm from 'source-map/lib/mappings.wasm'
import $utils from './utils'
import { toPosix } from './util/to_posix'
import path from 'path'
const sourceMapExtraction... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cypress/downloads.ts | packages/driver/src/cypress/downloads.ts | export default {
create: (Cypress) => {
const logs = {}
const start = (downloadItem) => {
// store a reference to the download's log so we can retrieve it
// and end the snapshot later when it's done
const log = logs[downloadItem.id] = Cypress.log({
message: downloadItem.filePath,
... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cypress/log.ts | packages/driver/src/cypress/log.ts | import _, { DebouncedFunc } from 'lodash'
import $ from 'jquery'
import clone from 'clone'
import { HIGHLIGHT_ATTR, type ISnapshots } from '../cy/snapshots'
import $dom from '../dom'
import $utils from './utils'
import $errUtils from './error_utils'
import { MAX_VISIBILITY_CHECK_ELEMENTS } from '@packages/types'
impo... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cypress/local_storage.ts | packages/driver/src/cypress/local_storage.ts | import _ from 'lodash'
const specialKeywords = /(debug)/
const $LocalStorage = {
localStorage: null,
remoteStorage: null,
clear (keys) {
// TODO: update this to $errUtils.throwErrByPath() if uncommented
// throw new Error("Cypress.LocalStorage is missing local and remote storage references!") if not @l... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cypress/shadow_dom_utils.ts | packages/driver/src/cypress/shadow_dom_utils.ts | /**
* Order of preference for including shadow dom:
* command-level > programmatic config > test-level > suite-level > cypress.config.{js,ts,mjs,cjs}
*/
export const resolveShadowDomInclusion = (Cypress: Cypress.Cypress, commandValue?: boolean): boolean => {
if (commandValue != null) return commandValue
return Cyp... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cypress/resolvers.ts | packages/driver/src/cypress/resolvers.ts | import _ from 'lodash'
/**
* Fix property reads and writes that could potentially help the AUT to break out of its iframe.
*
* @param currentWindow the value of `globalThis` from the scope of the window reference in question
* @param accessedObject a reference to the object being accessed
* @param accessedProp th... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cypress/chainer.ts | packages/driver/src/cypress/chainer.ts | import $stackUtils from './stack_utils'
let idCounter = 1
export class $Chainer {
specWindow: Window
chainerId: string
constructor (specWindow) {
this.specWindow = specWindow
// The id prefix needs to be unique per origin, so there are not
// collisions when chainers created in a secondary origin a... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cypress/aut_event_handlers.ts | packages/driver/src/cypress/aut_event_handlers.ts | import $errUtils from './error_utils'
import { $Location } from './location'
const setupAutEventHandlers = (Cypress) => {
// This message comes from the AUT, not the spec bridge.
// This error is forwarded from a cross origin AUT prior to attaching a spec bridge.
Cypress.primaryOriginCommunicator.on('aut:throw:e... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cypress/ensure.ts | packages/driver/src/cypress/ensure.ts | import _ from 'lodash'
import $dom from '../dom'
import $utils from './utils'
import $errUtils from './error_utils'
import type { $Cy } from './cy'
import { isRunnerAbleToCommunicateWithAut } from '../util/commandAUTCommunication'
// TODO: in 4.0 we should accept a new validation type called 'elements'
// which accept... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cypress/error_messages.ts | packages/driver/src/cypress/error_messages.ts | import _ from 'lodash'
import { stripIndent } from 'common-tags'
import capitalize from 'underscore.string/capitalize'
import $stackUtils from './stack_utils'
import $utils from './utils'
const divider = (num, char) => {
return Array(num).join(char)
}
const format = (data) => {
if (_.isString(data)) {
return ... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | true |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cypress/error_utils.ts | packages/driver/src/cypress/error_utils.ts | // See: ./errorScenarios.md for details about error messages and stack traces
// NOTE: If you modify the logic relating to this file, ensure the
// UI for error code frames works as expected with the binary. This includes each
// browser, as well as e2e and CT testing types. Stack patterns differ in Chrome
// between ... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cypress/runner.ts | packages/driver/src/cypress/runner.ts | import _ from 'lodash'
import dayjs from 'dayjs'
import Promise from 'bluebird'
import { LogUtils } from './log'
import $utils from './utils'
import $errUtils from './error_utils'
import $stackUtils from './stack_utils'
import { getResolvedTestConfigOverride } from '../cy/testConfigOverrides'
import debugFn from 'debu... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | true |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cypress/state.ts | packages/driver/src/cypress/state.ts | /// <reference path="../../types/cypress/log.d.ts" />
import type Bluebird from 'bluebird'
import type { RouteMap } from '../cy/net-stubbing/types'
import type { $Command } from './command'
import type { KeyboardModifiers } from '../cy/keyboard'
import type { MouseCoords } from '../cy/mouse'
import type { LocationObj... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cypress/events.ts | packages/driver/src/cypress/events.ts | import _ from 'lodash'
import { EventEmitter2 } from 'eventemitter2'
import { debug as Debug } from 'debug'
import Bluebird from 'bluebird'
const log = Debug('cypress:driver')
const proxyFunctions = ['emit', 'emitThen', 'emitThenSeries', 'emitMap']
const withoutFunctions = (arr) => {
return _.reject(arr, _.isFunct... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cypress/util/to_posix.ts | packages/driver/src/cypress/util/to_posix.ts | export const toPosix = (file: string) => {
return Cypress.config('platform') === 'win32'
? file.replaceAll('\\', '/')
: file
}
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/driver/src/cypress/assertions/assert.ts | packages/driver/src/cypress/assertions/assert.ts | import $dom from '../../dom'
import $ from 'jquery'
export const selectors = {
visible: 'visible',
hidden: 'hidden',
selected: 'selected',
checked: 'checked',
enabled: 'enabled',
disabled: 'disabled',
focus: 'focused',
focused: 'focused',
} as const
export const accessors = {
attr: 'attribute',
cs... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.