Skip to content

Commit dc06e82

Browse files
committed
chore: update test-project for Cypress 15.0.0
1 parent 0508b75 commit dc06e82

File tree

5 files changed

+20
-19
lines changed

5 files changed

+20
-19
lines changed

test-project/README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@ npx cypress open
1818
- Select "Scaffold example specs"
1919
- Close all Cypress windows
2020

21-
Test that scaffolded specs run:
22-
23-
```shell
24-
npm test
25-
```
26-
2721
Remove Cypress from `package.json`:
2822

2923
```shell

test-project/cypress/e2e/2-advanced-examples/actions.cy.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ context('Actions', () => {
1717
cy.get('.action-email').type('{del}{selectall}{backspace}')
1818

1919
// .type() with key modifiers
20-
cy.get('.action-email').type('{alt}{option}') //these are equivalent
21-
cy.get('.action-email').type('{ctrl}{control}') //these are equivalent
22-
cy.get('.action-email').type('{meta}{command}{cmd}') //these are equivalent
20+
cy.get('.action-email').type('{alt}{option}') // these are equivalent
21+
cy.get('.action-email').type('{ctrl}{control}') // these are equivalent
22+
cy.get('.action-email').type('{meta}{command}{cmd}') // these are equivalent
2323
cy.get('.action-email').type('{shift}')
2424

2525
// Delay each keypress by 0.1 sec

test-project/cypress/e2e/2-advanced-examples/cypress_api.cy.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/// <reference types="cypress" />
22

33
context('Cypress APIs', () => {
4-
54
context('Cypress.Commands', () => {
65
beforeEach(() => {
76
cy.visit('https://example.cypress.io/cypress-api')

test-project/cypress/e2e/2-advanced-examples/misc.cy.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,20 @@ context('Misc', () => {
4343
if (Cypress.platform === 'win32') {
4444
cy.exec(`print ${Cypress.config('configFile')}`)
4545
.its('stderr').should('be.empty')
46-
} else {
46+
}
47+
else {
4748
cy.exec(`cat ${Cypress.config('configFile')}`)
4849
.its('stderr').should('be.empty')
4950

50-
cy.exec('pwd')
51-
.its('code').should('eq', 0)
51+
cy.log(`Cypress version ${Cypress.version}`)
52+
if (Cypress.version.split('.').map(Number)[0] < 15) {
53+
cy.exec('pwd')
54+
.its('code').should('eq', 0)
55+
}
56+
else {
57+
cy.exec('pwd')
58+
.its('exitCode').should('eq', 0)
59+
}
5260
}
5361
})
5462

test-project/cypress/e2e/2-advanced-examples/storage.cy.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ context('Local Storage / Session Storage', () => {
6464
expect(storageMap).to.deep.equal({
6565
// other origins will also be present if localStorage is set on them
6666
'https://example.cypress.io': {
67-
'prop1': 'red',
68-
'prop2': 'blue',
69-
'prop3': 'magenta',
67+
prop1: 'red',
68+
prop2: 'blue',
69+
prop3: 'magenta',
7070
},
7171
})
7272
})
@@ -94,9 +94,9 @@ context('Local Storage / Session Storage', () => {
9494
expect(storageMap).to.deep.equal({
9595
// other origins will also be present if sessionStorage is set on them
9696
'https://example.cypress.io': {
97-
'prop4': 'cyan',
98-
'prop5': 'yellow',
99-
'prop6': 'black',
97+
prop4: 'cyan',
98+
prop5: 'yellow',
99+
prop6: 'black',
100100
},
101101
})
102102
})

0 commit comments

Comments
 (0)