Skip to content

Commit 96e4e80

Browse files
change from system tests to e2e tests
1 parent a437337 commit 96e4e80

File tree

6 files changed

+29
-163
lines changed

6 files changed

+29
-163
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"npm-release": "node scripts/npm-release.js",
4444
"prestart": "yarn ensure-deps",
4545
"start": "cypress open --dev --global",
46-
"stop-only": "npx stop-only --skip .cy,.publish,.projects,node_modules,dist,dist-test,fixtures,lib,bower_components,src,__snapshots__ --exclude e2e.ts,cypress-tests.ts",
46+
"stop-only": "npx stop-only --skip .cy,.publish,.projects,node_modules,dist,dist-test,fixtures,lib,bower_components,src,__snapshots__ --exclude e2e.ts,cypress-tests.ts,*only_spec.js",
4747
"stop-only-all": "yarn stop-only --folder packages",
4848
"pretest": "yarn ensure-deps",
4949
"test": "yarn lerna exec yarn test --scope cypress --scope \"'@packages/{config,electron,extension,https-proxy,launcher,net-stubbing,network,proxy,rewriter,runner,runner-shared,socket}'\"",
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ describe('second should not run', () => {
1212
})
1313
})
1414

15-
describe('nested contexts ', { retries: 1 }, () => {
15+
describe('correctly applies overrides ', { retries: 1 }, () => {
1616
// eslint-disable-next-line mocha/no-exclusive-tests
17-
describe.only('test override', () => {
18-
it('updates as expected', { baseUrl: null }, () => {
17+
describe.only('when valid configuration', () => {
18+
it('for describe.only', { baseUrl: null }, () => {
1919
const config = Cypress.config()
2020

2121
expect(config.testConfigList).to.be.undefined
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
const shouldNotExecute = () => {
2+
throw new Error('Test Override validation should have failed & it block should not have executed.')
3+
}
4+
5+
it('first should not run', () => {
6+
shouldNotExecute()
7+
})
8+
9+
describe('second should not run', () => {
10+
it('test', () => {
11+
shouldNotExecute()
12+
})
13+
})
14+
15+
describe('correctly applies overrides when valid configuration', { retries: 1 }, () => {
16+
// eslint-disable-next-line mocha/no-exclusive-tests
17+
it.only('for it.only', { baseUrl: null }, () => {
18+
const config = Cypress.config()
19+
20+
expect(config.testConfigList).to.be.undefined
21+
expect(config.unverifiedTestConfig).to.be.undefined
22+
expect(config.baseUrl).to.be.null
23+
expect(config.retries).to.eq(1)
24+
})
25+
})

system-tests/__snapshots__/testConfigOverrides_spec.ts.js

Lines changed: 0 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -892,117 +892,3 @@ https://on.cypress.io/config
892892
893893
894894
`
895-
896-
exports['testConfigOverrides / correctly applies overrides when valid configuration for it.only'] = `
897-
898-
====================================================================================================
899-
900-
(Run Starting)
901-
902-
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
903-
│ Cypress: 1.2.3 │
904-
│ Browser: FooBrowser 88 │
905-
│ Specs: 1 found (testConfigOverrides-it-only-valid.js) │
906-
│ Searched: cypress/integration/testConfigOverrides-it-only-valid.js │
907-
└────────────────────────────────────────────────────────────────────────────────────────────────┘
908-
909-
910-
────────────────────────────────────────────────────────────────────────────────────────────────────
911-
912-
Running: testConfigOverrides-it-only-valid.js (1 of 1)
913-
914-
915-
nested contexts
916-
test override
917-
✓ updates as expected
918-
919-
920-
1 passing
921-
922-
923-
(Results)
924-
925-
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
926-
│ Tests: 1 │
927-
│ Passing: 1 │
928-
│ Failing: 0 │
929-
│ Pending: 0 │
930-
│ Skipped: 0 │
931-
│ Screenshots: 0 │
932-
│ Video: false │
933-
│ Duration: X seconds │
934-
│ Spec Ran: testConfigOverrides-it-only-valid.js │
935-
└────────────────────────────────────────────────────────────────────────────────────────────────┘
936-
937-
938-
====================================================================================================
939-
940-
(Run Finished)
941-
942-
943-
Spec Tests Passing Failing Pending Skipped
944-
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
945-
│ ✔ testConfigOverrides-it-only-valid.j XX:XX 1 1 - - - │
946-
│ s │
947-
└────────────────────────────────────────────────────────────────────────────────────────────────┘
948-
✔ All specs passed! XX:XX 1 1 - - -
949-
950-
951-
`
952-
953-
exports['testConfigOverrides / correctly applies overrides when valid configuration for describe.only'] = `
954-
955-
====================================================================================================
956-
957-
(Run Starting)
958-
959-
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
960-
│ Cypress: 1.2.3 │
961-
│ Browser: FooBrowser 88 │
962-
│ Specs: 1 found (testConfigOverrides-describe-only-valid.js) │
963-
│ Searched: cypress/integration/testConfigOverrides-describe-only-valid.js │
964-
└────────────────────────────────────────────────────────────────────────────────────────────────┘
965-
966-
967-
────────────────────────────────────────────────────────────────────────────────────────────────────
968-
969-
Running: testConfigOverrides-describe-only-valid.js (1 of 1)
970-
971-
972-
nested contexts
973-
test override
974-
✓ updates as expected
975-
976-
977-
1 passing
978-
979-
980-
(Results)
981-
982-
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
983-
│ Tests: 1 │
984-
│ Passing: 1 │
985-
│ Failing: 0 │
986-
│ Pending: 0 │
987-
│ Skipped: 0 │
988-
│ Screenshots: 0 │
989-
│ Video: false │
990-
│ Duration: X seconds │
991-
│ Spec Ran: testConfigOverrides-describe-only-valid.js │
992-
└────────────────────────────────────────────────────────────────────────────────────────────────┘
993-
994-
995-
====================================================================================================
996-
997-
(Run Finished)
998-
999-
1000-
Spec Tests Passing Failing Pending Skipped
1001-
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
1002-
│ ✔ testConfigOverrides-describe-only-v XX:XX 1 1 - - - │
1003-
│ alid.js │
1004-
└────────────────────────────────────────────────────────────────────────────────────────────────┘
1005-
✔ All specs passed! XX:XX 1 1 - - -
1006-
1007-
1008-
`

system-tests/projects/e2e/cypress/integration/testConfigOverrides-it-only-valid.js

Lines changed: 0 additions & 27 deletions
This file was deleted.

system-tests/test/testConfigOverrides_spec.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,6 @@ describe('testConfigOverrides', () => {
3333
},
3434
})
3535

36-
systemTests.it(`correctly applies overrides when valid configuration for describe.only`, {
37-
spec: 'testConfigOverrides-describe-only-valid.js',
38-
snapshot: true,
39-
expectedExitCode: 0,
40-
config: {
41-
video: false,
42-
},
43-
})
44-
45-
systemTests.it(`correctly applies overrides when valid configuration for it.only`, {
46-
spec: 'testConfigOverrides-it-only-valid.js',
47-
snapshot: true,
48-
expectedExitCode: 0,
49-
config: {
50-
video: false,
51-
},
52-
})
53-
5436
// window.Error throws differently for firefox. break into
5537
// browser permutations for snapshot comparisons
5638
const permutations = [

0 commit comments

Comments
 (0)