Skip to content

Commit 850c1f6

Browse files
committed
Merge branch 'develop' into issue-5941-plugins-file-options
2 parents aefdb36 + e2ea5bf commit 850c1f6

File tree

78 files changed

+5941
-5845
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+5941
-5845
lines changed

.eslintignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ packages/server/lib/scaffold/support/index.js
2727
packages/server/lib/scaffold/support/commands.js
2828
packages/server/test/support/fixtures/projects/e2e/cypress/integration/stdout_exit_early_failing_spec.js
2929

30-
packages/launcher/lib/**/*.js
31-
3230
**/package-lock.json
3331
**/tsconfig.json
3432
**/.vscode

.eslintrc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,10 @@
77
],
88
"rules": {
99
"prefer-spread": "off"
10+
},
11+
"settings": {
12+
"react": {
13+
"version": "16.8"
14+
}
1015
}
1116
}

.vscode/settings.json

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,6 @@
11
{
22
"eslint.alwaysShowStatus": true,
3-
"eslint.autoFixOnSave": true,
4-
"eslint.validate": [
5-
{
6-
"language": "javascript",
7-
"autoFix": true
8-
},
9-
{
10-
"language": "javascriptreact",
11-
"autoFix": true
12-
},
13-
{
14-
"language": "typescript",
15-
"autoFix": true
16-
},
17-
{
18-
"language": "typescriptreact",
19-
"autoFix": true
20-
},
21-
{
22-
"language": "json",
23-
"autoFix": true
24-
},
25-
{
26-
"language": "coffeescript",
27-
"autoFix": false
28-
},
29-
],
3+
"eslint.validate": ["json", "coffeescript"],
304
"eslint.enable": true,
315
// this project does not use Prettier
326
// thus set all settings to disable accidentally running Prettier

.vscode/terminals.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@
2424
"command": "yarn test-watch [file]"
2525
},
2626
{
27-
"name": "packages/server test-e2e",
27+
"name": "packages/server test",
2828
"focus": true,
2929
"onlySingle": true,
3030
"execute": false,
3131
"cwd": "[cwd]/packages/server",
32-
"command": "yarn test-e2e --spec [fileBasename]"
32+
"command": "yarn test [file]"
3333
},
3434
{
3535
"name": "packages/runner watch",

circle.yml

Lines changed: 47 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ executors:
5959
# https://circleci.com/docs/2.0/testing-ios/#supported-xcode-versions
6060
mac:
6161
macos:
62-
xcode: "10.1.0"
62+
## Node 12.10.0 (yarn 1.17.3)
63+
xcode: "11.0.0"
6364
environment:
6465
PLATFORM: mac
6566

@@ -97,7 +98,7 @@ commands:
9798
- attach_workspace:
9899
at: ~/
99100
- run:
100-
command: yarn lerna exec --scope @packages/server "yarn test-e2e --chunk << parameters.chunk >> --browser << parameters.browser >>"
101+
command: yarn lerna exec --scope @packages/server "yarn test ./test/e2e/<< parameters.chunk >>*spec* --browser << parameters.browser >>"
101102
- verify-mocha-results
102103
- store_test_results:
103104
path: /tmp/cypress
@@ -235,7 +236,7 @@ jobs:
235236
- run: ls $(yarn global bin)/../lib/node_modules
236237

237238
# try several times, because flaky NPM installs ...
238-
- run: yarn --ignore-engines || yarn --ignore-engines
239+
- run: yarn || yarn
239240
- run:
240241
name: Top level packages
241242
command: yarn list --depth=0 || true
@@ -297,7 +298,7 @@ jobs:
297298
# make sure our snapshots are compared correctly
298299
- run: yarn test-mocha-snapshot
299300
# make sure packages with TypeScript can be transpiled to JS
300-
- run: yarn lerna run build-js --stream
301+
- run: yarn lerna run build-prod --stream
301302
# run unit tests from each individual package
302303
- run: yarn test
303304
- verify-mocha-results:
@@ -585,7 +586,7 @@ jobs:
585586
- attach_workspace:
586587
at: ~/
587588
- run:
588-
command: yarn lerna run start --scope @packages/driver
589+
command: yarn workspace @packages/driver start
589590
background: true
590591
- run:
591592
command: $(yarn bin)/wait-on http://localhost:3500
@@ -606,7 +607,7 @@ jobs:
606607
- attach_workspace:
607608
at: ~/
608609
- run:
609-
command: yarn lerna exec --scope @packages/desktop-gui "yarn build-prod"
610+
command: yarn workspace @packages/desktop-gui build-prod
610611
- run:
611612
command: |
612613
CYPRESS_KONFIG_ENV=production \
@@ -624,7 +625,7 @@ jobs:
624625
- attach_workspace:
625626
at: ~/
626627
- run:
627-
command: yarn lerna exec --scope @packages/reporter "yarn build-prod"
628+
command: yarn workspace @packages/reporter build-for-tests
628629
- run:
629630
command: |
630631
CYPRESS_KONFIG_ENV=production \
@@ -642,7 +643,7 @@ jobs:
642643
- attach_workspace:
643644
at: ~/
644645
- run:
645-
command: yarn lerna run build --scope @packages/ui-components
646+
command: yarn workspace @packages/ui-components build-for-tests
646647
- run:
647648
command: |
648649
CYPRESS_KONFIG_ENV=production \
@@ -938,6 +939,40 @@ jobs:
938939
command: $(yarn bin)/cypress info
939940
- store-npm-logs
940941

942+
test-npm-module-on-minimum-node-version:
943+
<<: *defaults
944+
docker:
945+
- image: cypress/base:8.0.0
946+
steps:
947+
- attach_workspace:
948+
at: ~/
949+
# make sure we have cypress.zip received
950+
- run: ls -l
951+
- run: ls -l cypress.zip cypress.tgz
952+
- run: mkdir test-binary
953+
- run: node --version
954+
- run: npm --version
955+
- run:
956+
name: Create new NPM package
957+
working_directory: test-binary
958+
command: npm init -y
959+
- run:
960+
name: Install Cypress
961+
working_directory: test-binary
962+
command: CYPRESS_INSTALL_BINARY=/root/cypress/cypress.zip npm install /root/cypress/cypress.tgz
963+
- run:
964+
name: Verify Cypress binary
965+
working_directory: test-binary
966+
command: $(npm bin)/cypress verify
967+
- run:
968+
name: Print Cypress version
969+
working_directory: test-binary
970+
command: $(npm bin)/cypress version
971+
- run:
972+
name: Cypress info
973+
working_directory: test-binary
974+
command: $(npm bin)/cypress info
975+
941976
# install NPM + binary zip and run against staging API
942977
"test-binary-against-staging":
943978
<<: *defaults
@@ -1247,6 +1282,10 @@ linux-workflow: &linux-workflow
12471282
- develop
12481283
requires:
12491284
- build-binary
1285+
- test-npm-module-on-minimum-node-version:
1286+
requires:
1287+
- build-binary
1288+
- build-npm-package
12501289
- post-pre-release-install-comment:
12511290
context: test-runner:commit-status-checks
12521291
filters:

cli/package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"build": "node ./scripts/build.js",
99
"dtslint": "dtslint types",
1010
"postinstall": "node ./scripts/post-install.js",
11-
"lint": "eslint --fix *.js scripts/*.js bin/* lib/*.js lib/**/*.js test/*.js test/**/*.js",
1211
"prerelease": "yarn build",
1312
"release": "cd build && releaser --no-node --no-changelog",
1413
"size": "t=\"cypress-v0.0.0.tgz\"; yarn pack --filename \"${t}\"; wc -c \"${t}\"; tar tvf \"${t}\"; rm \"${t}\";",
@@ -27,13 +26,13 @@
2726
"arch": "2.1.1",
2827
"bluebird": "3.7.2",
2928
"cachedir": "2.3.0",
30-
"chalk": "3.0.0",
29+
"chalk": "2.4.2",
3130
"check-more-types": "2.24.0",
3231
"commander": "4.1.0",
3332
"common-tags": "1.8.0",
3433
"debug": "4.1.1",
3534
"eventemitter2": "4.1.2",
36-
"execa": "2.0.0",
35+
"execa": "1.0.0",
3736
"executable": "4.1.1",
3837
"extract-zip": "1.6.7",
3938
"fs-extra": "8.1.0",
@@ -78,7 +77,6 @@
7877
"cross-env": "6.0.3",
7978
"dependency-check": "3.4.1",
8079
"dtslint": "0.9.0",
81-
"eslint": "6.8.0",
8280
"execa-wrap": "1.4.0",
8381
"hasha": "5.0.0",
8482
"mocha": "6.2.2",

package.json

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"ensure-deps": "./scripts/ensure-dependencies.sh",
3939
"postinstall": "patch-package && yarn build",
4040
"jscodeshift": "jscodeshift -t ./node_modules/js-codemod/transforms/arrow-function-arguments.js",
41-
"lint": "eslint --ext .js,.jsx,.ts,.tsx,.json,.eslintrc .",
41+
"lint": "eslint --ext .js,.jsx,.ts,.tsx,.json .",
4242
"lint-all": "yarn lint-coffee && yarn lint",
4343
"lint-changed": "lint-changed",
4444
"lint-changed-fix": "yarn lint-changed --fix",
@@ -77,7 +77,7 @@
7777
},
7878
"devDependencies": {
7979
"@cypress/bumpercar": "2.0.12",
80-
"@cypress/commit-message-install": "3.1.0",
80+
"@cypress/commit-message-install": "3.1.1",
8181
"@cypress/env-or-json-file": "2.0.0",
8282
"@cypress/eslint-plugin-dev": "5.0.0",
8383
"@cypress/github-commit-status-check": "1.5.0",
@@ -122,10 +122,10 @@
122122
"del": "3.0.0",
123123
"electron-builder": "20.39.0",
124124
"eslint": "6.8.0",
125-
"eslint-plugin-cypress": "2.10.1",
125+
"eslint-plugin-cypress": "2.10.3",
126126
"eslint-plugin-json-format": "2.0.0",
127127
"eslint-plugin-mocha": "6.1.0",
128-
"eslint-plugin-react": "7.14.2",
128+
"eslint-plugin-react": "7.18.3",
129129
"execa": "1.0.0",
130130
"execa-wrap": "1.4.0",
131131
"filesize": "4.1.2",
@@ -218,9 +218,6 @@
218218
"packages": [
219219
"cli",
220220
"packages/*"
221-
],
222-
"nohoist": [
223-
"@packages/driver/*"
224221
]
225222
},
226223
"lint-staged": {

packages/desktop-gui/.eslintrc.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,5 @@
55
"extends": [
66
"plugin:@cypress/dev/tests",
77
"plugin:@cypress/dev/react"
8-
],
9-
"settings": {
10-
"react": {
11-
"version": "16.8"
12-
}
13-
}
8+
]
149
}

packages/desktop-gui/cypress/integration/project_spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ describe('Project', function () {
1414
cy.stub(this.ipc, 'getSpecs').yields(null, this.specs)
1515
cy.stub(this.ipc, 'closeProject').resolves()
1616
cy.stub(this.ipc, 'onConfigChanged')
17+
cy.stub(this.ipc, 'onProjectWarning')
1718

1819
this.getProjectStatus = this.util.deferred()
1920
cy.stub(this.ipc, 'getProjectStatus').returns(this.getProjectStatus.promise)
2021

2122
this.updaterCheck = this.util.deferred()
22-
2323
cy.stub(this.ipc, 'updaterCheck').resolves(this.updaterCheck.promise)
2424
})
2525
})

packages/desktop-gui/cypress/integration/specs_list_spec.js

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,87 @@ describe('Specs List', function () {
279279
})
280280
})
281281

282+
context('expand/collapse root specs', function () {
283+
describe('with folders', function () {
284+
beforeEach(function () {
285+
this.ipc.getSpecs.yields(null, this.specs)
286+
287+
this.openProject.resolve(this.config)
288+
})
289+
290+
it('collapsing root spec will keep root itself expanded', function () {
291+
cy.get('.level-0 .folder-name').find('a:first').click({ multiple: true })
292+
cy.get('.folder.folder-collapsed').should('have.length', 3)
293+
cy.get('.folder.folder-expanded').should('have.length', 2)
294+
})
295+
296+
it('collapses all children folders', function () {
297+
cy.get('.level-0 .folder-name').find('a:first').click({ multiple: true })
298+
299+
const lastCollapsedFolderSelector = '.folder-collapsed:last .folder-name'
300+
const rootSpecCollapsedFoldersSelector = '.folder-collapsed'
301+
302+
cy.get(lastCollapsedFolderSelector).click()
303+
cy.get(rootSpecCollapsedFoldersSelector).should('have.length', 3)
304+
305+
cy.get(lastCollapsedFolderSelector).click()
306+
cy.get(rootSpecCollapsedFoldersSelector).should('have.length', 3)
307+
308+
cy.get(lastCollapsedFolderSelector).click()
309+
cy.get(rootSpecCollapsedFoldersSelector).should('have.length', 3)
310+
311+
cy.get(lastCollapsedFolderSelector).click()
312+
cy.get(rootSpecCollapsedFoldersSelector).should('have.length', 3)
313+
314+
cy.get(lastCollapsedFolderSelector).click()
315+
cy.get(rootSpecCollapsedFoldersSelector).should('have.length', 2)
316+
317+
cy.get(lastCollapsedFolderSelector).click()
318+
cy.get(rootSpecCollapsedFoldersSelector).should('have.length', 2)
319+
320+
cy.get(lastCollapsedFolderSelector).click()
321+
cy.get(rootSpecCollapsedFoldersSelector).should('have.length', 1)
322+
323+
cy.get(lastCollapsedFolderSelector).click()
324+
cy.get(rootSpecCollapsedFoldersSelector).should('have.length', 0)
325+
})
326+
327+
it('expand all expands all sub folders', function () {
328+
cy.get('.level-0 .folder-name').find('a:first').click({ multiple: true })
329+
cy.get('.folder-expanded').should('have.length', 2)
330+
cy.get('.folder-collapsed').should('have.length', 3)
331+
332+
cy.get('.level-0 .folder-name').find('a:last').click({ multiple: true })
333+
cy.get('.folder-expanded').should('have.length', 10)
334+
cy.get('.folder-collapsed').should('have.length', 0)
335+
})
336+
})
337+
338+
describe('without folders', function () {
339+
beforeEach(function () {
340+
this.ipc.getSpecs.yields(null, {
341+
integration: [
342+
{
343+
name: 'app_spec.coffee',
344+
relative: 'app_spec.coffee',
345+
},
346+
{
347+
name: 'account_new_spec.coffee',
348+
relative: 'account_new_spec.coffee',
349+
},
350+
],
351+
unit: [],
352+
})
353+
354+
this.openProject.resolve(this.config)
355+
})
356+
357+
it('hides expand/collapse buttons when there are no folders', function () {
358+
cy.get('.level-0 .folder-name a').should('not.exist')
359+
})
360+
})
361+
})
362+
282363
context('filtering specs', function () {
283364
it('scrolls the specs and not the filter', function () {
284365
this.ipc.getSpecs.yields(null, this.specs)

0 commit comments

Comments
 (0)