Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: cypress-io/cypress
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v8.4.0
Choose a base ref
...
head repository: cypress-io/cypress
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v8.4.1
Choose a head ref
  • 20 commits
  • 38 files changed
  • 11 contributors

Commits on Sep 10, 2021

  1. Copy the full SHA
    c63b97a View commit details
  2. chore: release @cypress/react-v5.10.0

    [skip ci]
    semantic-release-bot committed Sep 10, 2021
    Copy the full SHA
    ea94e1b View commit details
  3. Copy the full SHA
    c0fece2 View commit details
  4. Copy the full SHA
    abd396d View commit details

Commits on Sep 13, 2021

  1. Merge branch 'develop'

    flotwig committed Sep 13, 2021
    4

    Verified

    This commit was signed with the committer’s verified signature.
    flotwig Zach Bloomquist
    Copy the full SHA
    0284b9d View commit details

Commits on Sep 14, 2021

  1. fix: configure proper pages directory for next application (#18009)

    * fix: find pages directory for next applications
    
    * convert new files to typescript and add transpile step
    
    * add tsconfig for plugins
    ZachJW34 authored Sep 14, 2021
    4

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    70c7c36 View commit details
  2. 4

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    7a78c1c View commit details

Commits on Sep 15, 2021

  1. Copy the full SHA
    da74782 View commit details
  2. chore: Update Chrome (stable) to 93.0.4577.82 and Chrome (beta) to 94…

    ….0.4606.41 (#18034)
    
    Co-authored-by: cypress-bot[bot] <2f0651858c6e38e0+cypress-bot[bot]@users.noreply.github.com>
    github-actions[bot] and cypress-bot[bot] authored Sep 15, 2021
    4

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    c9af7ea View commit details
  3. 4

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    3f39d7b View commit details
  4. 4

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f82c08e View commit details

Commits on Sep 16, 2021

  1. Merge pull request #18101 from cypress-io/chore/remove-legacy-javascr…

    …ipts-config
    
    chore: remove legacy javascripts config option and related code
    lmiller1990 authored Sep 16, 2021
    4

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    efb4062 View commit details
  2. remove unused code

    lmiller1990 committed Sep 16, 2021
    Copy the full SHA
    1346fa9 View commit details
  3. typescript

    lmiller1990 committed Sep 16, 2021
    Copy the full SHA
    390e1a2 View commit details
  4. Copy the full SHA
    ec4748c View commit details

Commits on Sep 17, 2021

  1. Merge pull request #18116 from cypress-io/16092021-wip-args

    chore(server): simplify util/specs, types
    lmiller1990 authored Sep 17, 2021
    4

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    3ba3b6f View commit details
  2. 6

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    41524a9 View commit details
  3. 4

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1b989c5 View commit details
  4. fix: GH env variable for test other projects (#18147)

    * use GH_TOKEN rather than creds var
    tgriesser authored Sep 17, 2021
    6

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    863e368 View commit details
  5. release 8.4.1 [skip ci]

    flotwig committed Sep 17, 2021

    Verified

    This commit was signed with the committer’s verified signature.
    flotwig Zach Bloomquist
    Copy the full SHA
    32b9f93 View commit details
Showing with 335 additions and 232 deletions.
  1. +2 −2 browser-versions.json
  2. +12 −11 circle.yml
  3. +1 −1 cli/types/cypress.d.ts
  4. +7 −0 npm/cypress-schematic/CHANGELOG.md
  5. +7 −0 npm/react/CHANGELOG.md
  6. +5 −2 npm/react/package.json
  7. +2 −1 npm/react/plugins/next/findNextWebpackConfig.js
  8. +33 −0 npm/react/plugins/next/findPagesDir.ts
  9. +11 −0 npm/react/plugins/tsconfig.json
  10. 0 npm/react/test/fixtures/next-plugin/next-project-one/pages/foo.js
  11. 0 npm/react/test/fixtures/next-plugin/next-project-two/src/pages/foo.js
  12. +19 −0 npm/react/test/unit/findPagesDir.spec.ts
  13. +7 −0 npm/vite-dev-server/CHANGELOG.md
  14. +7 −0 npm/webpack-dev-server/CHANGELOG.md
  15. +2 −2 npm/webpack-dev-server/src/startServer.ts
  16. +1 −1 package.json
  17. +0 −1 packages/desktop-gui/cypress/fixtures/config.json
  18. +1 −1 packages/driver/src/cypress.ts
  19. +0 −4 packages/server/lib/config_options.ts
  20. +10 −14 packages/server/lib/controllers/files.js
  21. +1 −1 packages/server/lib/controllers/runner.ts
  22. +9 −9 packages/server/lib/modes/run.js
  23. +19 −16 packages/server/lib/open_project.ts
  24. +11 −3 packages/server/lib/project-base.ts
  25. +11 −6 packages/server/lib/specs-store.ts
  26. +2 −1 packages/server/lib/util/ci_provider.js
  27. +88 −99 packages/server/lib/util/{specs.js → specs.ts}
  28. +10 −8 packages/server/test/integration/http_requests_spec.js
  29. +1 −1 packages/server/test/support/fixtures/server/expected_todos_filtered_tests_iframe.html
  30. +1 −1 packages/server/test/support/fixtures/server/expected_todos_iframe.html
  31. +1 −1 packages/server/test/unit/ci_provider_spec.js
  32. +0 −4 packages/server/test/unit/config_spec.js
  33. +4 −2 packages/server/test/unit/modes/run_spec.js
  34. +13 −22 packages/server/test/unit/specs_spec.js
  35. +11 −8 packages/socket/patches/socket.io-parser+4.0.4.patch
  36. +15 −0 packages/socket/test/socket_spec.js
  37. +3 −2 scripts/binary/bump.js
  38. +8 −8 yarn.lock
4 changes: 2 additions & 2 deletions browser-versions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"chrome:beta": "94.0.4606.31",
"chrome:stable": "93.0.4577.63"
"chrome:beta": "94.0.4606.41",
"chrome:stable": "93.0.4577.82"
}
23 changes: 12 additions & 11 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ macBuildFilters: &macBuildFilters
branches:
only:
- develop
- fix-test-other-projects
- tgriesser/chore/fix-release

defaults: &defaults
parallelism: 1
@@ -42,7 +42,7 @@ onlyMainBranches: &onlyMainBranches
branches:
only:
- develop
- fix-test-other-projects
- tgriesser/chore/fix-release
requires:
- create-build-artifacts

@@ -1481,7 +1481,7 @@ jobs:
- run:
name: Check current branch to persist artifacts
command: |
if [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "fix-test-other-projects" ]]; then
if [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "tgriesser/chore/fix-release" ]]; then
echo "Not uploading artifacts or posting install comment for this branch."
circleci-agent step halt
fi
@@ -2073,6 +2073,7 @@ linux-workflow: &linux-workflow
# Any attempts to automate this are welcome
# If CircleCI provided an "after all" hook, then this wouldn't be necessary
- npm-release:
context: test-runner:npm-release
requires:
- build
- npm-eslint-plugin-dev
@@ -2116,7 +2117,7 @@ linux-workflow: &linux-workflow
branches:
only:
- develop
- fix-test-other-projects
- tgriesser/chore/fix-release
requires:
- build
- test-kitchensink:
@@ -2128,7 +2129,7 @@ linux-workflow: &linux-workflow
branches:
only:
- develop
- fix-test-other-projects
- tgriesser/chore/fix-release
requires:
- build
- create-build-artifacts:
@@ -2178,15 +2179,15 @@ linux-workflow: &linux-workflow
branches:
only:
- develop
- fix-test-other-projects
- tgriesser/chore/fix-release
requires:
- create-build-artifacts
- test-npm-module-and-verify-binary:
filters:
branches:
only:
- develop
- fix-test-other-projects
- tgriesser/chore/fix-release
requires:
- create-build-artifacts
- test-binary-against-staging:
@@ -2195,7 +2196,7 @@ linux-workflow: &linux-workflow
branches:
only:
- develop
- fix-test-other-projects
- tgriesser/chore/fix-release
requires:
- create-build-artifacts

@@ -2220,7 +2221,7 @@ linux-workflow: &linux-workflow
branches:
only:
- develop
- fix-test-other-projects
- tgriesser/chore/fix-release
requires:
- create-build-artifacts

@@ -2292,7 +2293,7 @@ mac-workflow: &mac-workflow
branches:
only:
- develop
- fix-test-other-projects
- tgriesser/chore/fix-release
requires:
- darwin-create-build-artifacts

@@ -2304,7 +2305,7 @@ mac-workflow: &mac-workflow
branches:
only:
- develop
- fix-test-other-projects
- tgriesser/chore/fix-release
requires:
- darwin-create-build-artifacts

2 changes: 1 addition & 1 deletion cli/types/cypress.d.ts
Original file line number Diff line number Diff line change
@@ -2876,7 +2876,7 @@ declare namespace Cypress {
socketId: null | string
socketIoCookie: string
socketIoRoute: string
spec: Cypress['spec']
spec: Cypress['spec'] | null
specs: Array<Cypress['spec']>
xhrRoute: string
xhrUrl: string
7 changes: 7 additions & 0 deletions npm/cypress-schematic/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# [@cypress/schematic-v1.5.1](https://github.com/cypress-io/cypress/compare/@cypress/schematic-v1.5.0...@cypress/schematic-v1.5.1) (2021-09-10)


### Bug Fixes

* **cypress/schematic:** add edge to list of allowed browsers ([#17637](https://github.com/cypress-io/cypress/issues/17637)) ([49de24f](https://github.com/cypress-io/cypress/commit/49de24f6178e0ef7bfd654c3efc0bfa8008e962e))

# [@cypress/schematic-v1.5.0](https://github.com/cypress-io/cypress/compare/@cypress/schematic-v1.4.2...@cypress/schematic-v1.5.0) (2021-07-20)


7 changes: 7 additions & 0 deletions npm/react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# [@cypress/react-v5.10.0](https://github.com/cypress-io/cypress/compare/@cypress/react-v5.9.4...@cypress/react-v5.10.0) (2021-09-10)


### Features

* allow usage of @react/plugins with cypress.config.js ([#17738](https://github.com/cypress-io/cypress/issues/17738)) ([da4b1e0](https://github.com/cypress-io/cypress/commit/da4b1e06ce33945aabddda0e6e175dc0e1b488a5))

# [@cypress/react-v5.9.4](https://github.com/cypress-io/cypress/compare/@cypress/react-v5.9.3...@cypress/react-v5.9.4) (2021-08-10)


7 changes: 5 additions & 2 deletions npm/react/package.json
Original file line number Diff line number Diff line change
@@ -4,16 +4,19 @@
"description": "Test React components using Cypress",
"main": "dist/cypress-react.cjs.js",
"scripts": {
"build": "rimraf dist && yarn rollup -c rollup.config.js",
"build": "rimraf dist && yarn transpile-plugins && yarn rollup -c rollup.config.js",
"build-prod": "yarn build",
"cy:open": "node ../../scripts/cypress.js open-ct",
"cy:open:debug": "node --inspect-brk ../../scripts/start.js --component-testing --run-project ${PWD}",
"cy:run": "node ../../scripts/cypress.js run-ct",
"cy:run:debug": "node --inspect-brk ../../scripts/start.js --component-testing --run-project ${PWD}",
"pretest": "yarn transpile",
"test": "yarn cy:run",
"test": "yarn test-unit && yarn test-component",
"test-unit": "mocha -r @packages/ts/register test/**/*.spec.*",
"test-component": "yarn cy:run",
"test-ci": "node ../../scripts/run-ct-examples.js --examplesList=./examples.env",
"transpile": "tsc",
"transpile-plugins": "yarn transpile --project ./plugins",
"watch": "yarn build --watch --watch.exclude ./dist/**/*"
},
"dependencies": {
3 changes: 2 additions & 1 deletion npm/react/plugins/next/findNextWebpackConfig.js
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@
/// <reference types="next" />
const debug = require('debug')('@cypress/react')
const getNextJsBaseWebpackConfig = require('next/dist/build/webpack-config').default
const { findPagesDir } = require('../../dist/next/findPagesDir')

async function getNextWebpackConfig (config) {
let loadConfig
@@ -26,7 +27,7 @@ async function getNextWebpackConfig (config) {
config: nextConfig,
dev: true,
isServer: false,
pagesDir: config.projectRoot,
pagesDir: findPagesDir(config.projectRoot),
entrypoints: {},
rewrites: { fallback: [], afterFiles: [], beforeFiles: [] },
},
33 changes: 33 additions & 0 deletions npm/react/plugins/next/findPagesDir.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import * as fs from 'fs'
import * as path from 'path'

const existsSync = (file: string) => {
try {
fs.accessSync(file, fs.constants.F_OK)

return true
} catch (_) {
return false
}
}

/**
* Next allows the `pages` directory to be located at either
* `${projectRoot}/pages` or `${projectRoot}/src/pages`.
* If neither is found, return projectRoot
*/
export function findPagesDir (projectRoot: string) {
// prioritize ./pages over ./src/pages
let pagesDir = path.join(projectRoot, 'pages')

if (existsSync(pagesDir)) {
return pagesDir
}

pagesDir = path.join(projectRoot, 'src/pages')
if (existsSync(pagesDir)) {
return pagesDir
}

return projectRoot
}
11 changes: 11 additions & 0 deletions npm/react/plugins/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"rootDir": "./",
"types": [
"cypress",
"node"
]
},
"include": ["./**/*.ts"]
}
Empty file.
Empty file.
19 changes: 19 additions & 0 deletions npm/react/test/unit/findPagesDir.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { expect } from 'chai'
import * as path from 'path'
import { findPagesDir } from '../../plugins/next/findPagesDir'

describe('Next.js findPagesDir', () => {
it('should find the correct pagesDir', () => {
const nextPluginFixturePath = path.join(__dirname, '../fixtures/next-plugin')

let projectRoot = nextPluginFixturePath

expect(findPagesDir(projectRoot)).to.equal(projectRoot)

projectRoot = path.join(nextPluginFixturePath, 'next-project-one')
expect(findPagesDir(projectRoot)).to.equal(path.join(projectRoot, 'pages'))

projectRoot = path.join(nextPluginFixturePath, 'next-project-two')
expect(findPagesDir(projectRoot)).to.equal(path.join(projectRoot, 'src/pages'))
})
})
7 changes: 7 additions & 0 deletions npm/vite-dev-server/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# [@cypress/vite-dev-server-v2.1.0](https://github.com/cypress-io/cypress/compare/@cypress/vite-dev-server-v2.0.8...@cypress/vite-dev-server-v2.1.0) (2021-09-10)


### Features

* allow usage of @react/plugins with cypress.config.js ([#17738](https://github.com/cypress-io/cypress/issues/17738)) ([da4b1e0](https://github.com/cypress-io/cypress/commit/da4b1e06ce33945aabddda0e6e175dc0e1b488a5))

# [@cypress/vite-dev-server-v2.0.8](https://github.com/cypress-io/cypress/compare/@cypress/vite-dev-server-v2.0.7...@cypress/vite-dev-server-v2.0.8) (2021-08-30)


7 changes: 7 additions & 0 deletions npm/webpack-dev-server/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# [@cypress/webpack-dev-server-v1.6.0](https://github.com/cypress-io/cypress/compare/@cypress/webpack-dev-server-v1.5.0...@cypress/webpack-dev-server-v1.6.0) (2021-09-10)


### Features

* allow usage of @react/plugins with cypress.config.js ([#17738](https://github.com/cypress-io/cypress/issues/17738)) ([da4b1e0](https://github.com/cypress-io/cypress/commit/da4b1e06ce33945aabddda0e6e175dc0e1b488a5))

# [@cypress/webpack-dev-server-v1.5.0](https://github.com/cypress-io/cypress/compare/@cypress/webpack-dev-server-v1.4.0...@cypress/webpack-dev-server-v1.5.0) (2021-08-30)


4 changes: 2 additions & 2 deletions npm/webpack-dev-server/src/startServer.ts
Original file line number Diff line number Diff line change
@@ -57,13 +57,13 @@ export async function start ({ webpackConfig: userWebpackConfig, template, optio
debug('using webpack-dev-server v3')
webpackDevServerConfig = {
...webpackDevServerConfig,
// @ts-expect-error ignore webpack-dev-server v3 type errors
// @ts-ignore ignore webpack-dev-server v3 type errors
inline: false,
publicPath: devServerPublicPathRoute,
noInfo: false,
}

// @ts-expect-error ignore webpack-dev-server v3 type errors
// @ts-ignore ignore webpack-dev-server v3 type errors
return new WebpackDevServer(compiler, webpackDevServerConfig)
}

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cypress",
"version": "8.4.0",
"version": "8.4.1",
"description": "Cypress.io end to end testing tool",
"private": true,
"scripts": {
1 change: 0 additions & 1 deletion packages/desktop-gui/cypress/fixtures/config.json
Original file line number Diff line number Diff line change
@@ -132,7 +132,6 @@
"integrationFolder": "/Users/jennifer/Dev/Projects/cypress-example-kitchensink/cypress/integration",
"isHeadless": false,
"isNewProject": false,
"javascripts": [],
"morgan": true,
"namespace": "__cypress",
"numTestsKeptInMemory": 50,
2 changes: 1 addition & 1 deletion packages/driver/src/cypress.ts
Original file line number Diff line number Diff line change
@@ -136,7 +136,7 @@ class $Cypress {
// change this in the NEXT_BREAKING
const { env } = config

config = _.omit(config, 'env', 'remote', 'resolved', 'scaffoldedFiles', 'javascripts', 'state', 'testingType')
config = _.omit(config, 'env', 'remote', 'resolved', 'scaffoldedFiles', 'state', 'testingType')

_.extend(this, browserInfo(config))

4 changes: 0 additions & 4 deletions packages/server/lib/config_options.ts
Original file line number Diff line number Diff line change
@@ -137,10 +137,6 @@ export const options = [
name: 'isTextTerminal',
defaultValue: false,
isInternal: true,
}, {
name: 'javascripts',
defaultValue: [],
isInternal: true,
}, {
name: 'morgan',
defaultValue: true,
24 changes: 10 additions & 14 deletions packages/server/lib/controllers/files.js
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ module.exports = {
handleFiles (req, res, config) {
debug('handle files')

return specsUtil.find(config)
return specsUtil.default.findSpecs(config)
.then((files) => {
return res.json({
integration: files,
@@ -32,7 +32,7 @@ module.exports = {

return this.getSpecs(test, config, extraOptions)
.then((specs) => {
return this.getJavascripts(config)
return this.getSupportFile(config)
.then((js) => {
const allFilesToSend = js.concat(specs)

@@ -67,7 +67,6 @@ module.exports = {
}

const specFilter = _.get(extraOptions, 'specFilter')
const specTypeFilter = _.get(extraOptions, 'specType', 'integration')

debug('specFilter %o', { specFilter })
const specFilterContains = (spec) => {
@@ -85,17 +84,15 @@ module.exports = {
if (spec === '__all') {
debug('returning all specs')

return specsUtil.find(config)
return specsUtil.default.findSpecs(config)
.then(R.tap((specs) => {
return debug('found __all specs %o', specs)
}))
.filter(specFilterFn)
.filter((foundSpec) => {
if (componentTestingEnabled) {
return foundSpec.specType === specTypeFilter
}

return true
return componentTestingEnabled
? foundSpec.specType === 'component'
: foundSpec.specType === 'integration'
}).then(R.tap((specs) => {
return debug('filtered __all specs %o', specs)
})).map((spec) => {
@@ -142,14 +139,13 @@ module.exports = {
return test
},

getJavascripts (config) {
const { projectRoot, supportFile, javascripts } = config
getSupportFile (config) {
const { projectRoot, supportFile } = config

// automatically add in support scripts and any javascripts
let files = [].concat(javascripts)
let files = []

if (supportFile !== false) {
files = [supportFile].concat(files)
files = [supportFile]
}

// TODO: there shouldn't be any reason
Loading