text
stringlengths
3
1.39M
id
stringlengths
16
173
metadata
dict
__index_level_0__
int64
0
363
{ "recommendations": ["esbenp.prettier-vscode"] }
cypress-commands/.vscode/extentions.json/0
{ "file_path": "cypress-commands/.vscode/extentions.json", "repo_id": "cypress-commands", "token_count": 26 }
0
import whitespace from '../../../src/utils/whitespace'; const _ = Cypress._; describe('Whitespace options for commands yielding strings', function () { it('returns a function', function () { expect(_.isFunction(whitespace('mode'))).to.be.true; }); context('mode = `simplify`', function () { ...
cypress-commands/cypress/e2e/utils/whitespace.cy.js/0
{ "file_path": "cypress-commands/cypress/e2e/utils/whitespace.cy.js", "repo_id": "cypress-commands", "token_count": 1999 }
1
const _ = Cypress._; const $ = Cypress.$; import isJquery from './utils/isJquery'; import OptionValidator from './utils/optionValidator'; const validator = new OptionValidator('then'); /** * Enables you to work with the subject yielded from the previous command. * * @example * cy.then((subject) => { * // ... ...
cypress-commands/src/then.js/0
{ "file_path": "cypress-commands/src/then.js", "repo_id": "cypress-commands", "token_count": 1101 }
2
GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Pream...
cypress-drag-drop/LICENSE/0
{ "file_path": "cypress-drag-drop/LICENSE", "repo_id": "cypress-drag-drop", "token_count": 8075 }
3
describe('Drag drop', () => { it('should be able to drag and drop elements', () => { cy.visit('/') cy.setExample('Basic') cy.findByTestId('left').find('.item').assertList(['1', '2', '3', '4', '5', '6']) cy.findByTestId('item-1') .drag('[data-testid="right"]', { target: { position: 'left' } })...
cypress-drag-drop/tests/specs/basic.cy.js/0
{ "file_path": "cypress-drag-drop/tests/specs/basic.cy.js", "repo_id": "cypress-drag-drop", "token_count": 235 }
4
# Contributing ## Questions If you have questions about implementation details, help or support, then please use our dedicated community forum at [Github Discussions](https://github.com/msmps/cypress-layout-inspector/discussions) **PLEASE NOTE:** If you choose to instead open an issue for your question, your issue wi...
cypress-layout-inspector/CONTRIBUTING.md/0
{ "file_path": "cypress-layout-inspector/CONTRIBUTING.md", "repo_id": "cypress-layout-inspector", "token_count": 1955 }
5
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>cypress-layout-inspector test application</title> <style> *, *::before, *::aft...
cypress-layout-inspector/cypress/fixtures/vertical.html/0
{ "file_path": "cypress-layout-inspector/cypress/fixtures/vertical.html", "repo_id": "cypress-layout-inspector", "token_count": 877 }
6
import dimensionsOverwrites from "./dimensions"; chai.use(dimensionsOverwrites);
cypress-layout-inspector/src/overwrites/index.ts/0
{ "file_path": "cypress-layout-inspector/src/overwrites/index.ts", "repo_id": "cypress-layout-inspector", "token_count": 25 }
7
module.exports = { plugins: [ "@semantic-release/release-notes-generator", "@semantic-release/github", "@semantic-release/npm" ] };
cypress-wait-until/release.config.js/0
{ "file_path": "cypress-wait-until/release.config.js", "repo_id": "cypress-wait-until", "token_count": 59 }
8
{ "eslint.alwaysShowStatus": true, "eslint.validate": [ "javascript", "javascriptreact", "typescript", "typescriptreact", "json" ], "eslint.enable": true, // this project does not use Prettier // thus set all settings to disable accidentally running Prettier "prettier.requireConfig": t...
cypress/.vscode/settings.json/0
{ "file_path": "cypress/.vscode/settings.json", "repo_id": "cypress", "token_count": 444 }
9
exports['getJustVersion returns semver if passed 1'] = ` 0.20.1 ` exports['getJustVersion returns semver with tag if passed 1'] = ` 1.0.0-dev ` exports['getJustVersion returns name if starts with cypress 1'] = ` cypress@dev ` exports['getJustVersion returns name if starts with cypress 2'] = ` cypress@alpha ` export...
cypress/__snapshots__/utils-spec.js/0
{ "file_path": "cypress/__snapshots__/utils-spec.js", "repo_id": "cypress", "token_count": 334 }
10
# CLI The CLI is used to build the [cypress npm module](https://www.npmjs.com/package/cypress) to be run within a terminal. **The CLI has the following responsibilities:** - Allow users to print CLI commands - Allow users to install the Cypress executable - Allow users to print their current Cypress version - Allow ...
cypress/cli/README.md/0
{ "file_path": "cypress/cli/README.md", "repo_id": "cypress", "token_count": 1447 }
11
const minimist = require('minimist') const debug = require('debug')('cypress:cli') const args = minimist(process.argv.slice(2)) const util = require('./lib/util') // we're being used from the command line switch (args.exec) { case 'install': debug('installing Cypress from NPM') require('./lib/tasks/install'...
cypress/cli/index.js/0
{ "file_path": "cypress/cli/index.js", "repo_id": "cypress", "token_count": 258 }
12
const la = require('lazy-ass') const is = require('check-more-types') const os = require('os') const url = require('url') const path = require('path') const debug = require('debug')('cypress:cli') const request = require('@cypress/request') const Promise = require('bluebird') const requestProgress = require('request-pr...
cypress/cli/lib/tasks/download.js/0
{ "file_path": "cypress/cli/lib/tasks/download.js", "repo_id": "cypress", "token_count": 3883 }
13
#!/usr/bin/env node const { includeTypes } = require('./utils') const { join } = require('path') const shell = require('shelljs') shell.set('-v') // verbose shell.set('-e') // any error is fatal shell.rm('-rf', 'build') shell.mkdir('-p', 'build/bin') shell.mkdir('-p', 'build/types') shell.cp('bin/cypress', 'build/bi...
cypress/cli/scripts/start-build.js/0
{ "file_path": "cypress/cli/scripts/start-build.js", "repo_id": "cypress", "token_count": 342 }
14
require('../../spec_helper') const _ = require('lodash') const cp = require('child_process') const os = require('os') const tty = require('tty') const path = require('path') const EE = require('events') const mockedEnv = require('mocked-env') const debug = require('debug')('test') const state = require(`${lib}/tasks/...
cypress/cli/test/lib/exec/spawn_spec.js/0
{ "file_path": "cypress/cli/test/lib/exec/spawn_spec.js", "repo_id": "cypress", "token_count": 8597 }
15
const spawnMock = require('spawn-mock') module.exports = { mockSpawn (cb) { return spawnMock.mockSpawn((cp) => { // execa expects .cancel to exist cp.cancel = sinon.stub() return cb(cp) }) }, }
cypress/cli/test/support/spawn-mock.js/0
{ "file_path": "cypress/cli/test/support/spawn-mock.js", "repo_id": "cypress", "token_count": 100 }
16
namespace CypressLodashTests { Cypress._ // $ExpectType LoDashStatic Cypress._.each([1], item => { item // $ExpectType number }) } namespace CypressSinonTests { Cypress.sinon // $ExpectType SinonStatic const stub = cy.stub() stub(2, 'foo') expect(stub).to.have.been.calledWith(Cypress.sinon.match.num...
cypress/cli/types/tests/cypress-tests.ts/0
{ "file_path": "cypress/cli/types/tests/cypress-tests.ts", "repo_id": "cypress", "token_count": 14973 }
17
# npm This directory contains packages that are both used internally inside the Cypress monorepo [`packages`](../packages) and also published independently on npm under the Cypress organization using the `@cypress` prefix. For example, `vite-dev-server` is published as `@cypress/vite-dev-server`. These are automatica...
cypress/npm/README.md/0
{ "file_path": "cypress/npm/README.md", "repo_id": "cypress", "token_count": 154 }
18
module.exports = { ...require('../../.releaserc'), }
cypress/npm/cypress-schematic/.releaserc.js/0
{ "file_path": "cypress/npm/cypress-schematic/.releaserc.js", "repo_id": "cypress", "token_count": 22 }
19
{ "$schema": "http://json-schema.org/draft-07/schema", "$id": "cypress-schematics-generate-spec", "title": "Cypress Generate Spec Options Schema", "type": "object", "properties": { "filename": { "type": "string", "description": "Allows users to specify a custom filename.", "visible": fal...
cypress/npm/cypress-schematic/src/schematics/ng-generate/cypress-test/schema.json/0
{ "file_path": "cypress/npm/cypress-schematic/src/schematics/ng-generate/cypress-test/schema.json", "repo_id": "cypress", "token_count": 490 }
20
const fs = require('fs') const path = require('path') module.exports = // eslint-disable-next-line no-restricted-syntax Object.assign({}, ...fs.readdirSync(__dirname) .filter((filename) => filename.endsWith('.js') && filename !== 'index.js') .map((filename) => ({ [filename.replace(/\.js$/u, '')]: require(path....
cypress/npm/eslint-plugin-dev/lib/custom-rules/index.js/0
{ "file_path": "cypress/npm/eslint-plugin-dev/lib/custom-rules/index.js", "repo_id": "cypress", "token_count": 124 }
21
describe('outer', ()=>{ describe('some test', ()=>{ context('some test', ()=>{ it('some test', ()=>{ expect('foo').to.eq('bar') }) return someFn() }) }) })
cypress/npm/eslint-plugin-dev/test/fixtures/no-return-before-pass.js/0
{ "file_path": "cypress/npm/eslint-plugin-dev/test/fixtures/no-return-before-pass.js", "repo_id": "cypress", "token_count": 91 }
22
// @ts-check /// <reference types="cypress" /> describe('tests that use config object', () => { it('still works @config', { baseUrl: 'http://localhost:8000' }, () => { expect(Cypress.config('baseUrl')).to.equal('http://localhost:8000') }) })
cypress/npm/grep/cypress/e2e/config-spec.js/0
{ "file_path": "cypress/npm/grep/cypress/e2e/config-spec.js", "repo_id": "cypress", "token_count": 84 }
23
/// <reference types="cypress" /> import { parseGrep, parseTitleGrep, parseFullTitleGrep, parseTagsGrep, shouldTestRun, shouldTestRunTags, shouldTestRunTitle, } from '../../src/utils' describe('utils', () => { context('parseTitleGrep', () => { it('grabs the positive title', () => { const par...
cypress/npm/grep/cypress/e2e/unit.js/0
{ "file_path": "cypress/npm/grep/cypress/e2e/unit.js", "repo_id": "cypress", "token_count": 6160 }
24
{ "hello world: burning 1 of 3": "passed", "hello world: burning 2 of 3": "passed", "hello world: burning 3 of 3": "passed", "works": "pending", "works 2 @tag1": "pending", "works 2 @tag1 @tag2": "pending", "works @tag2": "pending" }
cypress/npm/grep/expects/hello-burn.json/0
{ "file_path": "cypress/npm/grep/expects/hello-burn.json", "repo_id": "cypress", "token_count": 99 }
25
{ "hello world": "pending", "works": "pending", "works 2 @tag1": "pending", "works 2 @tag1 @tag2": "passed", "works @tag2": "pending" }
cypress/npm/grep/expects/tag1-and-tag2.json/0
{ "file_path": "cypress/npm/grep/expects/tag1-and-tag2.json", "repo_id": "cypress", "token_count": 64 }
26
# @cypress/puppeteer [beta] Utilize [Puppeteer's browser API](https://pptr.dev/api) within Cypress with a single command. > This plugin is in public beta, so we'd love to get your feedback to improve it. Please leave any feedback you have in [this discussion](https://github.com/cypress-io/cypress/discussions/28410). ...
cypress/npm/puppeteer/README.md/0
{ "file_path": "cypress/npm/puppeteer/README.md", "repo_id": "cypress", "token_count": 3846 }
27
Cypress.Commands.add('puppeteer', (name, ...args) => { Cypress.log({ name: 'puppeteer', message: name, }) cy.task('__cypressPuppeteer__', { name, args }, { log: false }).then((result: any) => { if (result && result.__error__) { throw new Error(`cy.puppeteer() failed with the following error:\n>...
cypress/npm/puppeteer/src/support/index.ts/0
{ "file_path": "cypress/npm/puppeteer/src/support/index.ts", "repo_id": "cypress", "token_count": 161 }
28
/// <reference types="cypress" /> import React from 'react' import { mount } from '@cypress/react' import { Counter } from './counter.jsx' /* eslint-env mocha */ describe('Counter with access', () => { it('works', () => { mount(<Counter />) cy.contains('count: 0') .click() .contains('count: 1') ....
cypress/npm/react/cypress/component/advanced/app-action-example/counter.cy.jsx/0
{ "file_path": "cypress/npm/react/cypress/component/advanced/app-action-example/counter.cy.jsx", "repo_id": "cypress", "token_count": 318 }
29
// example from https://reactjs.org/docs/hooks-overview.html import React, { useState, useEffect } from 'react' export default function Counter2WithHooks () { const [count, setCount] = useState(0) useEffect(() => { document.title = `You clicked ${count} times` }) return ( <div> <p>You clicked {...
cypress/npm/react/cypress/component/advanced/hooks/counter2-with-hooks.jsx/0
{ "file_path": "cypress/npm/react/cypress/component/advanced/hooks/counter2-with-hooks.jsx", "repo_id": "cypress", "token_count": 175 }
30
import React from 'react' // use named import "get" from the module import { get } from 'axios' export class Users extends React.Component { constructor (props) { super(props) this.state = { users: [], } } componentDidMount () { get('https://jsonplaceholder.cypress.io/users?_limit=3').then...
cypress/npm/react/cypress/component/advanced/mocking-axios/2-users-named.jsx/0
{ "file_path": "cypress/npm/react/cypress/component/advanced/mocking-axios/2-users-named.jsx", "repo_id": "cypress", "token_count": 303 }
31
# React Router v6 We are testing the navigation in the [app.jsx](app.jsx) when it is surrounded by a React Router from [react-router-dom](https://github.com/ReactTraining/react-router#readme) - [spec.cy.jsx](spec.cy.jsx) uses `BrowserRouter` - [in-memory.cy.jsx](in-memory.cy.jsx) uses `MemoryRouter` ![In memory rout...
cypress/npm/react/cypress/component/advanced/react-router-v6/README.md/0
{ "file_path": "cypress/npm/react/cypress/component/advanced/react-router-v6/README.md", "repo_id": "cypress", "token_count": 129 }
32
import React from 'react' import { mount } from '@cypress/react' // test retries from // https://github.com/cypress-io/cypress/pull/3968 // you can skip the tests if there is no retries feature const describeOrSkip = Cypress.getTestRetries ? describe : describe.skip describeOrSkip('Test', () => { const Hello = () =...
cypress/npm/react/cypress/component/advanced/test-retries/spec.cy.jsx/0
{ "file_path": "cypress/npm/react/cypress/component/advanced/test-retries/spec.cy.jsx", "repo_id": "cypress", "token_count": 383 }
33
body { font: 14px 'Century Gothic', Futura, sans-serif; margin: 20px; } ol, ul { padding-left: 30px; } .board-row:after { clear: both; content: ''; display: table; } .status { margin-bottom: 10px; } .square { background: #fff; border: 1px solid #999; float: left; font-size: 24px; font-weight...
cypress/npm/react/cypress/component/advanced/tutorial/tic-tac-toe.css/0
{ "file_path": "cypress/npm/react/cypress/component/advanced/tutorial/tic-tac-toe.css", "repo_id": "cypress", "token_count": 275 }
34
/// <reference types="cypress" /> import React from 'react' import { mount } from '@cypress/react' import styles from './Button.module.css' import { Button } from './Button.jsx' describe('Button', () => { it('renders orange styles', () => { mount(<Button name="Orange" orange />) cy.get('div > button') ....
cypress/npm/react/cypress/component/basic/css-modules/css-modules-orange-button.cy.jsx/0
{ "file_path": "cypress/npm/react/cypress/component/basic/css-modules/css-modules-orange-button.cy.jsx", "repo_id": "cypress", "token_count": 167 }
35
import React from 'react' import { mount } from '@cypress/react' const Login = () => { return ( <div> <div>Login by clicking below</div> <a href="/foo">click me</a> </div> ) } describe('full navigation', () => { it('should not happen', () => { mount(<Login />) const clicked = cy.stu...
cypress/npm/react/cypress/component/basic/full-navigation.cy.jsx/0
{ "file_path": "cypress/npm/react/cypress/component/basic/full-navigation.cy.jsx", "repo_id": "cypress", "token_count": 195 }
36
/// <reference types="cypress" /> import Game, { Board, calculateWinner } from './game.jsx' import React from 'react' import { mount } from '@cypress/react' import './tic-tac-toe.css' // for now need a constructor, otherwise getting "Weak map" key const BoardWrap = ({ squares, onClick }) => { return ( <div class...
cypress/npm/react/cypress/component/basic/react-tutorial/game.cy.jsx/0
{ "file_path": "cypress/npm/react/cypress/component/basic/react-tutorial/game.cy.jsx", "repo_id": "cypress", "token_count": 1332 }
37
/// <reference types="cypress" /> import React, { useLayoutEffect, useEffect } from 'react' import ReactDom from 'react-dom' import { mount, getContainerEl } from '@cypress/react' it('should not run unmount effect cleanup when rerendering', () => { const layoutEffectCleanup = cy.stub() const effectCleanup = cy.stu...
cypress/npm/react/cypress/component/basic/rerender/effects.cy.jsx/0
{ "file_path": "cypress/npm/react/cypress/component/basic/rerender/effects.cy.jsx", "repo_id": "cypress", "token_count": 749 }
38
/// <reference types="cypress" /> import Comp from './comp.jsx' import React from 'react' import { mount, unmount } from '@cypress/react' it('calls callbacks on mount and unmount', () => { const onMount = cy.stub() const onUnmount = cy.stub() // mount is an async call mount(<Comp onMount={onMount} onUnmount={...
cypress/npm/react/cypress/component/basic/unmount/comp.cy.jsx/0
{ "file_path": "cypress/npm/react/cypress/component/basic/unmount/comp.cy.jsx", "repo_id": "cypress", "token_count": 257 }
39
{ "name": "@cypress/react", "version": "0.0.0-development", "description": "Test React components using Cypress", "main": "dist/cypress-react.cjs.js", "scripts": { "build": "rimraf dist && rollup -c rollup.config.mjs", "postbuild": "node ../../scripts/sync-exported-npm-with-cli.js", "check-ts": "t...
cypress/npm/react/package.json/0
{ "file_path": "cypress/npm/react/package.json", "repo_id": "cypress", "token_count": 1422 }
40
import React from 'react' // @ts-expect-error import ReactDOM from 'react-dom/client' import { getContainerEl } from '@cypress/mount-utils' import { makeMountFn, makeUnmountFn, } from '@cypress/react' import type { MountOptions, MountReturn, InternalMountOptions, UnmountArgs, } from '@cypress/react' let ro...
cypress/npm/react18/src/index.ts/0
{ "file_path": "cypress/npm/react18/src/index.ts", "repo_id": "cypress", "token_count": 800 }
41
version: 2 snapshot: widths: - 1280 min-height: 1024 discovery: network-idle-timeout: 750
cypress/npm/vite-dev-server/.percy.yml/0
{ "file_path": "cypress/npm/vite-dev-server/.percy.yml", "repo_id": "cypress", "token_count": 40 }
42
import { devServer } from './devServer' export { devServer } export default devServer
cypress/npm/vite-dev-server/src/index.ts/0
{ "file_path": "cypress/npm/vite-dev-server/src/index.ts", "repo_id": "cypress", "token_count": 25 }
43
const __cypressModuleCache = new Map() const NO_REDEFINE_LIST = new Set(['prototype']) let debug = false function createProxyModule (module) { // What we build our module proxy off of depends on whether the module has a default export // We need to be able to support `import DefaultValue from 'module'` => `const...
cypress/npm/vite-plugin-cypress-esm/client/moduleCache.js/0
{ "file_path": "cypress/npm/vite-plugin-cypress-esm/client/moduleCache.js", "repo_id": "cypress", "token_count": 2378 }
44
export const Mod = { async fetcher () { import('./mod_2').then((mod) => { document.querySelector(`[data-cy-root]`)!.innerHTML = `<h1>${mod.greeting}</h1>` }) }, run () { window.setTimeout(() => { this.fetcher() }, 2000) }, }
cypress/npm/vite-plugin-cypress-esm/cypress/component/fixtures/mod_1.ts/0
{ "file_path": "cypress/npm/vite-plugin-cypress-esm/cypress/component/fixtures/mod_1.ts", "repo_id": "cypress", "token_count": 122 }
45
# i18n example * For JSON-only, see [TranslatedJSONMessage.vue](TranslatedJSONMessage.vue) and its test in [spec.js](spec.js) * From i18n support loading, see [TranslatedI18nMessage.vue](TranslatedI18nMessage.vue) and its test in [spec.js](spec.js) ![i18n test in action](./images/i18n.gif) **Note:** the `vue-i18n-lo...
cypress/npm/vue/cypress/component/advanced/i18n/README.md/0
{ "file_path": "cypress/npm/vue/cypress/component/advanced/i18n/README.md", "repo_id": "cypress", "token_count": 141 }
46
# Hello example From [Vue2 cookbook](https://vuejs.org/v2/cookbook/unit-testing-vue-components.html) Find the component in [Hello.vue](Hello.vue) and its test in [Hello-spec.js](Hello-spec.js) ![Hello test](images/hello.png)
cypress/npm/vue/cypress/component/basic/hello/README.md/0
{ "file_path": "cypress/npm/vue/cypress/component/basic/hello/README.md", "repo_id": "cypress", "token_count": 87 }
47
<template> <button @click="incrementCounter"> {{ counter }} </button> </template> <script> export default { emits: ['increment'], data () { return { counter: 0, } }, methods: { incrementCounter () { this.counter += 1 this.$emit('increment') }, }, } </script> <style ...
cypress/npm/vue/cypress/component/button/ButtonCounter.vue/0
{ "file_path": "cypress/npm/vue/cypress/component/button/ButtonCounter.vue", "repo_id": "cypress", "token_count": 173 }
48
import { mount } from '@cypress/vue' import { h, defineComponent } from 'vue' describe('smoke test', () => { it('mounts with no options', () => { const comp = defineComponent({ setup () { return () => h('div', 'hello world') }, }) mount(comp) cy.get('div').contains('hello world'...
cypress/npm/vue/cypress/component/smoke.cy.js/0
{ "file_path": "cypress/npm/vue/cypress/component/smoke.cy.js", "repo_id": "cypress", "token_count": 131 }
49
{ "name": "@cypress/vue", "version": "0.0.0-development", "description": "Browser-based Component Testing for Vue.js with Cypress.io ✌️🌲", "main": "dist/cypress-vue.cjs.js", "scripts": { "build": "rimraf dist && rollup -c rollup.config.mjs", "postbuild": "node ../../scripts/sync-exported-npm-with-cli...
cypress/npm/vue/package.json/0
{ "file_path": "cypress/npm/vue/package.json", "repo_id": "cypress", "token_count": 1292 }
50
# [@cypress/vue2-v2.1.1](https://github.com/cypress-io/cypress/compare/@cypress/vue2-v2.1.0...@cypress/vue2-v2.1.1) (2024-06-07) ### Bug Fixes * update cypress to Typescript 5 ([#29568](https://github.com/cypress-io/cypress/issues/29568)) ([f3b6766](https://github.com/cypress-io/cypress/commit/f3b67666a5db0438594339...
cypress/npm/vue2/CHANGELOG.md/0
{ "file_path": "cypress/npm/vue2/CHANGELOG.md", "repo_id": "cypress", "token_count": 2344 }
51
const EventEmitter = require('events').EventEmitter const { expect } = require('chai') const fs = require('fs-extra') const path = require('path') const preprocessor = require('../../index') const fixturesDir = path.join(__dirname, '..', 'fixtures') const outputDir = path.join(__dirname, '..', '_test-output') const ...
cypress/npm/webpack-batteries-included-preprocessor/test/e2e/features.spec.js/0
{ "file_path": "cypress/npm/webpack-batteries-included-preprocessor/test/e2e/features.spec.js", "repo_id": "cypress", "token_count": 1501 }
52
{ "json": "contents" }
cypress/npm/webpack-batteries-included-preprocessor/test/fixtures/json_file.json/0
{ "file_path": "cypress/npm/webpack-batteries-included-preprocessor/test/fixtures/json_file.json", "repo_id": "cypress", "token_count": 13 }
53
# @cypress/webpack-dev-server Implements the APIs for the object-syntax of the Cypress Component-testing "webpack dev server". > **Note:** This package is bundled with the Cypress binary and should not need to be installed separately. See the [Component Framework Configuration Docs](https://docs.cypress.io/guides/com...
cypress/npm/webpack-dev-server/README.md/0
{ "file_path": "cypress/npm/webpack-dev-server/README.md", "repo_id": "cypress", "token_count": 918 }
54
export const configFiles = [ 'webpack.config.ts', 'webpack.config.js', 'webpack.config.mjs', 'webpack.config.cjs', ]
cypress/npm/webpack-dev-server/src/constants.ts/0
{ "file_path": "cypress/npm/webpack-dev-server/src/constants.ts", "repo_id": "cypress", "token_count": 51 }
55
import path from 'path' import { expect } from 'chai' import { once, EventEmitter } from 'events' import http from 'http' import fs from 'fs-extra' import { devServer } from '..' import { restoreLoadHook } from '../src/helpers/sourceRelativeWebpackModules' import './support' import type { ConfigHandler } from '../src/...
cypress/npm/webpack-dev-server/test/devServer-e2e.spec.ts/0
{ "file_path": "cypress/npm/webpack-dev-server/test/devServer-e2e.spec.ts", "repo_id": "cypress", "token_count": 2994 }
56
import Chai, { expect } from 'chai' import EventEmitter from 'events' import snapshot from 'snap-shot-it' import { IgnorePlugin } from 'webpack' import { WebpackDevServerConfig } from '../src/devServer' import { CYPRESS_WEBPACK_ENTRYPOINT, makeWebpackConfig } from '../src/makeWebpackConfig' import { createModuleMatrixR...
cypress/npm/webpack-dev-server/test/makeWebpackConfig.spec.ts/0
{ "file_path": "cypress/npm/webpack-dev-server/test/makeWebpackConfig.spec.ts", "repo_id": "cypress", "token_count": 6353 }
57
const { expect } = require('chai') const preprocessor = require('../../dist/index') describe('typescript ./dist output', () => { it('builds dist correctly', () => { expect(preprocessor).to.be.a('function') expect(preprocessor).to.have.property('defaultOptions') }) })
cypress/npm/webpack-preprocessor/test/unit/dist.spec.ts/0
{ "file_path": "cypress/npm/webpack-preprocessor/test/unit/dist.spec.ts", "repo_id": "cypress", "token_count": 91 }
58
import defaultMessages from '@packages/frontend-shared/src/locales/en-US.json' import { getPathForPlatform } from '../../src/paths' function validateCreateFromVueComponentCard (beforeEachFn: () => void, expectedSpecPath: string) { beforeEach(beforeEachFn) it('Shows create from component card for Vue projects', ()...
cypress/packages/app/cypress/e2e/create-from-component.cy.ts/0
{ "file_path": "cypress/packages/app/cypress/e2e/create-from-component.cy.ts", "repo_id": "cypress", "token_count": 3337 }
59
import type { fixtureDirs } from '@tooling/system-tests' type ProjectDirs = typeof fixtureDirs const PROJECTS: {projectName: ProjectDirs[number], test: string}[] = [ // TODO: Flaky { projectName: 'angular-14', test: 'app.component' }, // TODO: Flaky. { projectName: 'vueclivue2-configured', test: 'HelloWorld.cy' }...
cypress/packages/app/cypress/e2e/runner/reporter-ct-mount-hover.cy.ts/0
{ "file_path": "cypress/packages/app/cypress/e2e/runner/reporter-ct-mount-hover.cy.ts", "repo_id": "cypress", "token_count": 1013 }
60
{ "\"detect-flake-and-pass-on-threshold\": retries mochaEvents simple retry #1": [ [ "mocha", "start", { "start": "match.date" } ], [ "mocha", "suite", { "id": "r1", "title": "", "root": true, "pending": false, "type...
cypress/packages/app/cypress/e2e/runner/snapshots/retries.experimentalRetries.mochaEvents.cy.ts.json/0
{ "file_path": "cypress/packages/app/cypress/e2e/runner/snapshots/retries.experimentalRetries.mochaEvents.cy.ts.json", "repo_id": "cypress", "token_count": 774827 }
61
describe('App: Spec List - Flaky Indicator', () => { beforeEach(() => { cy.scaffoldProject('cypress-in-cypress') cy.openProject('cypress-in-cypress') cy.startAppServer('e2e') cy.loginUser() cy.withCtx((ctx, o) => { // Must have a cloud project ID in order to fetch flaky data o.sinon.s...
cypress/packages/app/cypress/e2e/specs_list_flaky.cy.ts/0
{ "file_path": "cypress/packages/app/cypress/e2e/specs_list_flaky.cy.ts", "repo_id": "cypress", "token_count": 2609 }
62
import type { SinonStub } from 'sinon' import defaultMessages from '@packages/frontend-shared/src/locales/en-US.json' import { CYPRESS_REMOTE_MANIFEST_URL, NPM_CYPRESS_REGISTRY_URL } from '@packages/types' import type Sinon from 'sinon' import { dayjs } from '../../src/runs/utils/day' const pkg = require('@packages/ro...
cypress/packages/app/cypress/e2e/top-nav.cy.ts/0
{ "file_path": "cypress/packages/app/cypress/e2e/top-nav.cy.ts", "repo_id": "cypress", "token_count": 14310 }
63
<template> <router-view v-slot="{ Component }"> <component :is="Component" /> </router-view> <template v-if="!isRunMode"> <!-- avoiding graphql in run mode --> <CloudViewerAndProject /> <LoginConnectModals /> </template> </template> <script setup lang="ts"> import { isRunMo...
cypress/packages/app/src/App.vue/0
{ "file_path": "cypress/packages/app/src/App.vue", "repo_id": "cypress", "token_count": 211 }
64
import FileMatchInput from './FileMatchInput.vue' import { ref } from 'vue' describe('<FileMatchInput />', () => { it('renders a reasonable length text and can be typed into', () => { const initialText = 'Initial Text Value' const newText = 'Hello' const inputText = ref(initialText) const onUpdateTex...
cypress/packages/app/src/components/FileMatchInput.cy.tsx/0
{ "file_path": "cypress/packages/app/src/components/FileMatchInput.cy.tsx", "repo_id": "cypress", "token_count": 416 }
65
import { computed, Ref, unref } from 'vue' import { dayjs } from '../runs/utils/day.js' /* Format duration to in HH:mm:ss format. The `totalDuration` field is milliseconds. Remove the leading "00:" if the value is less than an hour. Currently, there is no expectation that a run duration will be greater 24 hours or...
cypress/packages/app/src/composables/useDurationFormat.ts/0
{ "file_path": "cypress/packages/app/src/composables/useDurationFormat.ts", "repo_id": "cypress", "token_count": 248 }
66
import DebugFailedTest from './DebugFailedTest.vue' import type { TestResults } from './DebugSpec.vue' const group1 = { os: { id: '123', name: 'Linux', nameWithVersion: 'Linux Debian', }, browser: { id: '123', formattedName: 'Chrome', formattedNameWithVersion: 'Chrome 106', }, groupNa...
cypress/packages/app/src/debug/DebugFailedTest.cy.tsx/0
{ "file_path": "cypress/packages/app/src/debug/DebugFailedTest.cy.tsx", "repo_id": "cypress", "token_count": 3328 }
67
<template> <li class="mr-[12px] ml-[6px] " :data-cy="isCurrentRun ? 'current-run' : 'run'" > <component :is="isCurrentRun ? 'div': 'button'" :aria-label="t('debugPage.switchToRun', {runNumber: gql.runNumber})" class="rounded flex w-full p-[10px] pl-[35px] relative hocus:bg-indigo-50 fo...
cypress/packages/app/src/debug/DebugRunNavigationRow.vue/0
{ "file_path": "cypress/packages/app/src/debug/DebugRunNavigationRow.vue", "repo_id": "cypress", "token_count": 1247 }
68
<template> <ul data-cy="stats-metadata" class="flex flex-wrap font-normal text-sm w-full text-gray-700 gap-x-2 items-center whitespace-nowrap stats-metadata-class children:flex children:items-center" > <li v-if="$slots.prefix" > <slot name="prefix" /> </li> <li v-for="(resu...
cypress/packages/app/src/debug/StatsMetadata.vue/0
{ "file_path": "cypress/packages/app/src/debug/StatsMetadata.vue", "repo_id": "cypress", "token_count": 2237 }
69
<template> <PromoCard :title="t('debugPage.emptyStates.slideshow.step1.title')" :body="t('debugPage.emptyStates.slideshow.step1.description')" > <template #image> <Illustration /> </template> <template #action> <PromoAction :action="action" :left-label="t('debugPage.e...
cypress/packages/app/src/debug/guide/GuideCard1.vue/0
{ "file_path": "cypress/packages/app/src/debug/guide/GuideCard1.vue", "repo_id": "cypress", "token_count": 382 }
70
<template> <StandardModal class="transition transition-all duration-200" variant="bare" :title="t('sidebar.keyboardShortcuts.title')" :model-value="show" data-cy="keyboard-modal" :no-help="true" @update:model-value="emits('close')" > <ul class="m-[24px] w-[384px]"> <li ...
cypress/packages/app/src/navigation/KeyboardBindingsModal.vue/0
{ "file_path": "cypress/packages/app/src/navigation/KeyboardBindingsModal.vue", "repo_id": "cypress", "token_count": 648 }
71
<template> <div class="rounded-md mx-auto border mt-20 text-center p-[20px] w-[400px]"> <h1 class="text-2xl"> You seem to have gotten lost... </h1> <p class="text-gray-600"> Try one of these links instead </p> <nav class="space-y-2 mt-[40px]"> <li v-for="route in routes" ...
cypress/packages/app/src/pages/[...all].vue/0
{ "file_path": "cypress/packages/app/src/pages/[...all].vue", "repo_id": "cypress", "token_count": 456 }
72
<template> <div id="spec-runner-header" ref="autHeaderEl" class="min-h-[64px] text-[14px]" > <div class="flex flex-wrap grow p-[16px] gap-[12px] justify-end"> <div v-if="props.gql.currentTestingType === 'e2e'" data-cy="aut-url" class="border rounded flex grow border-gra...
cypress/packages/app/src/runner/SpecRunnerHeaderOpenMode.vue/0
{ "file_path": "cypress/packages/app/src/runner/SpecRunnerHeaderOpenMode.vue", "repo_id": "cypress", "token_count": 4016 }
73
type ProtocolInfo = { type: 'cy:protocol-snapshot' | 'log:added' | 'log:changed' | 'page:loading'| 'test:before:run:async' | 'test:before:after:run:async' | 'test:after:run:async' | 'url:changed' | 'viewport:changed' timestamp: DOMHighResTimeStamp } const attachCypressProtocolInfo = (info: ProtocolInfo) => { let...
cypress/packages/app/src/runner/events/capture-protocol.ts/0
{ "file_path": "cypress/packages/app/src/runner/events/capture-protocol.ts", "repo_id": "cypress", "token_count": 1451 }
74
import { defineStore } from 'pinia' import type { AutSnapshot } from './iframe-model' import type { AutIframe } from './aut-iframe' import { defaultMessages } from '@cy/i18n' interface SnapshotStoreState { messageTitle?: string snapshotProps?: AutSnapshot isSnapshotPinned: boolean snapshot?: { showingHighl...
cypress/packages/app/src/runner/snapshot-store.ts/0
{ "file_path": "cypress/packages/app/src/runner/snapshot-store.ts", "repo_id": "cypress", "token_count": 1042 }
75
import { useElementSize } from '@vueuse/core' import { ref, watch } from 'vue' import { useAutStore } from '../store' export function useAutHeader () { const autStore = useAutStore() const autHeaderEl = ref<HTMLDivElement>() const { height } = useElementSize(autHeaderEl) watch(height, (newVal) => { if (ne...
cypress/packages/app/src/runner/useAutHeader.ts/0
{ "file_path": "cypress/packages/app/src/runner/useAutHeader.ts", "repo_id": "cypress", "token_count": 177 }
76
import type { Ref } from 'vue' import type { RunCardFragment } from '../generated/graphql' export type RunsComposable = { runs: Ref<RunCardFragment[] | undefined> reExecuteRunsQuery: () => void query: any allRunIds?: Ref<string[] | undefined> currentCommitInfo?: Ref<{ sha: string, message: string } | null | ...
cypress/packages/app/src/runs/RunsComposable.ts/0
{ "file_path": "cypress/packages/app/src/runs/RunsComposable.ts", "repo_id": "cypress", "token_count": 109 }
77
<template> <ul v-if="isUsingGit" data-cy="runsSkeleton-git" class="flex flex-col mb-[24px] gap-[16px] relative before:content-[''] before:absolute before:top-[20px] before:bottom-[10px] before:w-[2px] before:border-2 before:border-dashed before:border-l-0 before:border-y-0 before:border-r-gray-100 before:...
cypress/packages/app/src/runs/RunsSkeleton.vue/0
{ "file_path": "cypress/packages/app/src/runs/RunsSkeleton.vue", "repo_id": "cypress", "token_count": 892 }
78
<template> <div class="space-y-[32px] h-[calc(100vh-[64px])] p-[32px] overflow-auto" data-cy="settings" > <div class="space-y-[24px]"> <SettingsCard :title="t('settingsPage.project.title')" name="project" :description="t('settingsPage.project.description')" :icon="I...
cypress/packages/app/src/settings/SettingsContainer.vue/0
{ "file_path": "cypress/packages/app/src/settings/SettingsContainer.vue", "repo_id": "cypress", "token_count": 1381 }
79
<template> <SettingsSection data-cy="settings-config" > <template #title> {{ t('settingsPage.config.title') }} </template> <template #description> <i18n-t scope="global" keypath="settingsPage.config.description" > <OpenConfigFileInIDE :gql="props.gql" /> ...
cypress/packages/app/src/settings/project/Config.vue/0
{ "file_path": "cypress/packages/app/src/settings/project/Config.vue", "repo_id": "cypress", "token_count": 539 }
80
import { RecordKeyFragmentDoc } from '../../generated/graphql-test' import RecordKey from './RecordKey.vue' import { defaultMessages } from '@cy/i18n' describe('<RecordKey />', () => { const key = '1234-bbbb-5678-dddd' beforeEach(() => { cy.viewport(800, 600) cy.mountFragment(RecordKeyFragmentDoc, { ...
cypress/packages/app/src/settings/project/RecordKey.cy.tsx/0
{ "file_path": "cypress/packages/app/src/settings/project/RecordKey.cy.tsx", "repo_id": "cypress", "token_count": 571 }
81
<template> <SpecPatternModal v-if="props.gql.currentProject" :show="showSpecPatternModal" :gql="props.gql.currentProject" @close="showSpecPatternModal = false" /> <CreateSpecCards data-cy="create-spec-page-cards" :gql="props.gql" :generators="filteredGenerators" @select="selectSpec...
cypress/packages/app/src/specs/DefaultSpecPatternNoContent.vue/0
{ "file_path": "cypress/packages/app/src/specs/DefaultSpecPatternNoContent.vue", "repo_id": "cypress", "token_count": 770 }
82
<template> <Button v-if="projectConnectionStatus === 'UNAUTHORIZED'" :prefix-icon="SendIcon" prefix-icon-class="icon-dark-white icon-light-transparent" data-cy="request-access-button" @click="requestAccess" > {{ t("specPage.requestAccessButton") }} </Button> <Button v-else-if="projec...
cypress/packages/app/src/specs/RequestAccessButton.vue/0
{ "file_path": "cypress/packages/app/src/specs/RequestAccessButton.vue", "repo_id": "cypress", "token_count": 843 }
83
import SpecsList from './SpecsList.vue' import { Specs_SpecsListFragmentDoc, SpecsListFragment, TestingTypeEnum, SpecFilter_SetPreferencesDocument } from '../generated/graphql-test' import { defaultMessages } from '@cy/i18n' describe('<SpecsList />', { keystrokeDelay: 0 }, () => { let specs: Array<SpecsListFragment>...
cypress/packages/app/src/specs/SpecsList.cy.tsx/0
{ "file_path": "cypress/packages/app/src/specs/SpecsList.cy.tsx", "repo_id": "cypress", "token_count": 5051 }
84
<template> <TrackedBanner v-if="cohortOption" :banner-id="bannerId" data-cy="connect-project-banner" status="info" :title="t('specPage.banners.connectProject.title')" class="mb-[16px]" :icon="ConnectIcon" dismissible :has-banner-been-shown="hasBannerBeenShown" :event-data="{ ...
cypress/packages/app/src/specs/banners/ConnectProjectBanner.vue/0
{ "file_path": "cypress/packages/app/src/specs/banners/ConnectProjectBanner.vue", "repo_id": "cypress", "token_count": 590 }
85
import FlakySpecSummary from './FlakySpecSummary.vue' describe('<FlakySpecSummary />', () => { it('severities', () => { cy.mount(() => <div> <FlakySpecSummary specName="test" specExtension=".cy.tsx" severity="low" totalFlakyRuns={4} totalRuns={50} ...
cypress/packages/app/src/specs/flaky-badge/FlakySpecSummary.cy.tsx/0
{ "file_path": "cypress/packages/app/src/specs/flaky-badge/FlakySpecSummary.cy.tsx", "repo_id": "cypress", "token_count": 1780 }
86
import { filters } from '../GeneratorsCommon' import ReactComponentGeneratorStepOne from './ReactComponentGeneratorStepOne.vue' import type { SpecGenerator } from '../types' import ComponentGeneratorCard from './ComponentGeneratorCard.vue' export const ReactComponentGenerator: SpecGenerator = { card: ComponentGenera...
cypress/packages/app/src/specs/generators/component/ReactComponentGenerator.tsx/0
{ "file_path": "cypress/packages/app/src/specs/generators/component/ReactComponentGenerator.tsx", "repo_id": "cypress", "token_count": 139 }
87
import fuzzySort from 'fuzzysort' import type { FoundSpec } from '@packages/types' import { ComputedRef, Ref, ref, watch } from 'vue' import _ from 'lodash' import { FuzzyFoundSpec, getPlatform } from './tree/useCollapsibleTree' export function fuzzySortSpecs <T extends FuzzyFoundSpec> (specs: T[], searchValue: string...
cypress/packages/app/src/specs/spec-utils.ts/0
{ "file_path": "cypress/packages/app/src/specs/spec-utils.ts", "repo_id": "cypress", "token_count": 921 }
88
{ "extends": "../frontend-shared/tsconfig.json", "include": [ "src/**/*.vue", "src/**/*.tsx", "src/**/*.ts", "cypress/**/*.ts", "cypress/**/*.tsx", "*.d.ts", "../frontend-shared/src/**/*.vue", "../frontend-shared/src/**/*.tsx", "../frontend-shared/cypress/**/*.ts" ], "co...
cypress/packages/app/tsconfig.json/0
{ "file_path": "cypress/packages/app/tsconfig.json", "repo_id": "cypress", "token_count": 409 }
89
import os from 'os' import path from 'path' // @ts-ignore import pkg from '@packages/root' import type { AllCypressErrorNames } from '@packages/errors' import type { TestingType } from '@packages/types' import * as validate from './validation' const BREAKING_OPTION_ERROR_KEY: Readonly<AllCypressErrorNames[]> = [ '...
cypress/packages/config/src/options.ts/0
{ "file_path": "cypress/packages/config/src/options.ts", "repo_id": "cypress", "token_count": 8348 }
90
module.exports = { e2e: {}, }
cypress/packages/config/test/__babel_fixtures__/adding-component/module-exports-ts/code.ts/0
{ "file_path": "cypress/packages/config/test/__babel_fixtures__/adding-component/module-exports-ts/code.ts", "repo_id": "cypress", "token_count": 17 }
91
import { expect } from 'chai' import { hideKeys, setUrls, coerce, isResolvedConfigPropDefault, } from '../src/utils' import { utils as projectUtils, } from '../src/project/utils' describe('config/src/utils', () => { beforeEach(function () { delete process.env.CYPRESS_COMMERCIAL_RECOMMENDATIONS }) ...
cypress/packages/config/test/utils.spec.ts/0
{ "file_path": "cypress/packages/config/test/utils.spec.ts", "repo_id": "cypress", "token_count": 2127 }
92
import type { NexusGenObjects, NexusGenUnions } from '@packages/graphql/src/gen/nxs.gen' import assert from 'assert' import path from 'path' import type { DataContext } from '..' import { SpecOptions, codeGenerator } from '../codegen' import templates from '../codegen/templates' import type { CodeGenType } from '../gen...
cypress/packages/data-context/src/actions/CodegenActions.ts/0
{ "file_path": "cypress/packages/data-context/src/actions/CodegenActions.ts", "repo_id": "cypress", "token_count": 3361 }
93
import * as fs from 'fs-extra' import { isBinaryFile } from 'isbinaryfile' import * as path from 'path' import * as ejs from 'ejs' import fm from 'front-matter' import _ from 'lodash' import Debug from 'debug' const debug = Debug('cypress:data-context:codegen:code-generator') export interface Action { templateDir: ...
cypress/packages/data-context/src/codegen/code-generator.ts/0
{ "file_path": "cypress/packages/data-context/src/codegen/code-generator.ts", "repo_id": "cypress", "token_count": 1973 }
94
/** * The "Project Lifecycle" is the centralized manager for the project, * config, browser, and the number of possible states that can occur based * on inputs that change these behaviors. * * See `guides/app-lifecycle.md` for documentation on the project & possible * states that exist, and how they are managed. ...
cypress/packages/data-context/src/data/ProjectLifecycleManager.ts/0
{ "file_path": "cypress/packages/data-context/src/data/ProjectLifecycleManager.ts", "repo_id": "cypress", "token_count": 10374 }
95
import type { TestingType } from '@packages/types' import type chokidar from 'chokidar' import type { DataContext } from '..' import { createConfigString, initComponentTestingMigration, ComponentTestingMigrationStatus, supportFilesForMigration, getSpecs, applyMigrationTransform, shouldShowRenameSupport, ...
cypress/packages/data-context/src/sources/MigrationDataSource.ts/0
{ "file_path": "cypress/packages/data-context/src/sources/MigrationDataSource.ts", "repo_id": "cypress", "token_count": 3725 }
96
import globby from 'globby' import path from 'path' import { MIGRATION_STEPS } from '@packages/types' import { applyMigrationTransform, getSpecs, isDefaultSupportFile, legacyIntegrationFolder, tryGetDefaultLegacySupportFile } from '.' import type { LegacyCypressConfigJson } from '..' export const defaultTestFilesGlob ...
cypress/packages/data-context/src/sources/migration/shouldShowSteps.ts/0
{ "file_path": "cypress/packages/data-context/src/sources/migration/shouldShowSteps.ts", "repo_id": "cypress", "token_count": 2017 }
97
import type { DataContext } from '../../../src' import { CodegenActions } from '../../../src/actions/CodegenActions' import { createTestDataContext } from '../helper' import { expect } from 'chai' import sinon from 'sinon' import path from 'path' describe('CodegenActions', () => { let ctx: DataContext let actions:...
cypress/packages/data-context/test/unit/actions/CodegenActions.spec.ts/0
{ "file_path": "cypress/packages/data-context/test/unit/actions/CodegenActions.spec.ts", "repo_id": "cypress", "token_count": 2205 }
98
import React from 'react' function CounterContainer () { const [count, setCount] = React.useState(0) return <CounterView count={count} setCount={setCount} /> } function CounterView ({ count, setCount }) { return <p onClick={() => setCount(count + 1)}>count: {count}</p> } export { CounterView, } export defa...
cypress/packages/data-context/test/unit/actions/project/counter-separate-exports.jsx/0
{ "file_path": "cypress/packages/data-context/test/unit/actions/project/counter-separate-exports.jsx", "repo_id": "cypress", "token_count": 107 }
99