-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
1,739 additions
and
1,072 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: ci | ||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
permissions: | ||
actions: none | ||
checks: none | ||
contents: read | ||
deployments: none | ||
issues: none | ||
packages: none | ||
pull-requests: none | ||
repository-projects: none | ||
security-events: none | ||
statuses: none | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Prepare demo-app | ||
run: | | ||
cd demo-app | ||
npm ci | ||
- name: Prepare lib | ||
run: | | ||
cd lib | ||
npm ci | ||
- name: Prepare root | ||
run: | | ||
npm ci | ||
- name: Execute tests with defaults | ||
run: | | ||
npm run serve-and-test:parallel | ||
- name: Execute tests with spec reporter | ||
run: | | ||
npm run serve-and-test:parallel:spec | ||
- name: Execute tests with junit reporter | ||
run: | | ||
npm run serve-and-test:parallel:junit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,56 @@ | ||
describe('Delete pizza', () => { | ||
beforeEach(() => { | ||
cy.server(); | ||
cy.fixture('pizzas').as('pizzasAPI'); | ||
cy.fixture('addTopping').as('addToppingAPI'); | ||
cy.route({ | ||
method: 'DELETE', | ||
url: '/api/pizzas/*', | ||
response: {} | ||
}).as('deletePizza'); | ||
cy.route({ | ||
method: 'GET', | ||
status: 200, | ||
url: '/api/pizzas', | ||
response: '@pizzasAPI' | ||
}).as('getPizzas'); | ||
|
||
cy.visit(''); | ||
}); | ||
|
||
it('should delete a pizza', () => { | ||
cy.wait(5000); | ||
cy.get('.pizza-item') | ||
.contains(`Seaside Surfin'`) | ||
.within(() => { | ||
cy.get('.btn.btn__ok').click(); | ||
}); | ||
|
||
cy.get('.btn.btn__warning') | ||
.contains('Delete Pizza') | ||
.click(); | ||
|
||
cy.wait('@deletePizza').should(res => { | ||
expect(res.status).to.equal(200); | ||
}); | ||
}); | ||
}); | ||
describe('Delete pizza', () => { | ||
beforeEach(() => { | ||
cy.server(); | ||
cy.fixture('pizzas').as('pizzasAPI'); | ||
cy.fixture('addTopping').as('addToppingAPI'); | ||
cy.route({ | ||
method: 'DELETE', | ||
url: '/api/pizzas/*', | ||
response: {} | ||
}).as('deletePizza'); | ||
cy.route({ | ||
method: 'GET', | ||
status: 200, | ||
url: '/api/pizzas', | ||
response: '@pizzasAPI' | ||
}).as('getPizzas'); | ||
|
||
cy.visit(''); | ||
}); | ||
|
||
it('should delete a pizza', () => { | ||
cy.wait(5000); | ||
cy.get('.pizza-item') | ||
.contains(`Seaside Surfin'`) | ||
.within(() => { | ||
cy.get('.btn.btn__ok').click(); | ||
}); | ||
|
||
cy.get('.btn.btn__warning') | ||
.contains('Delete Pizza') | ||
.click(); | ||
|
||
cy.wait('@deletePizza').should(res => { | ||
expect(res.status).to.equal(200); | ||
}); | ||
}); | ||
|
||
describe('Nested pizza deletion', () => { | ||
it('should delete a nested pizza', () => { | ||
cy.wait(5000); | ||
cy.get('.pizza-item') | ||
.contains(`Seaside Surfin'`) | ||
.within(() => { | ||
cy.get('.btn.btn__ok').click(); | ||
}); | ||
|
||
cy.get('.btn.btn__warning') | ||
.contains('Delete Pizza') | ||
.click(); | ||
|
||
cy.wait('@deletePizza').should(res => { | ||
expect(res.status).to.equal(200); | ||
}); | ||
}); | ||
}) | ||
}); |
78 changes: 39 additions & 39 deletions
78
others/2/delete-pizza.js → cypress/integration/2/delete-pizza.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,39 @@ | ||
describe('Delete pizza', () => { | ||
beforeEach(() => { | ||
cy.server(); | ||
cy.fixture('pizzas').as('pizzasAPI'); | ||
cy.fixture('addTopping').as('addToppingAPI'); | ||
cy.route({ | ||
method: 'DELETE', | ||
url: '/api/pizzas/*', | ||
response: {} | ||
}).as('deletePizza'); | ||
cy.route({ | ||
method: 'GET', | ||
status: 200, | ||
url: '/api/pizzas', | ||
response: '@pizzasAPI' | ||
}).as('getPizzas'); | ||
|
||
cy.visit(''); | ||
}); | ||
|
||
it('should delete a pizza', () => { | ||
cy.wait(5000); | ||
|
||
cy.get('.pizza-item') | ||
.contains(`Seaside Surfin'`) | ||
.within(() => { | ||
cy.get('.btn.btn__ok').click(); | ||
}); | ||
|
||
cy.get('.btn.btn__warning') | ||
.contains('Delete Pizza') | ||
.click(); | ||
|
||
cy.wait('@deletePizza') | ||
.should(res => { | ||
expect(res.status).to.equal(200); | ||
}); | ||
}); | ||
}); | ||
describe('Delete pizza', () => { | ||
beforeEach(() => { | ||
cy.server(); | ||
cy.fixture('pizzas').as('pizzasAPI'); | ||
cy.fixture('addTopping').as('addToppingAPI'); | ||
cy.route({ | ||
method: 'DELETE', | ||
url: '/api/pizzas/*', | ||
response: {} | ||
}).as('deletePizza'); | ||
cy.route({ | ||
method: 'GET', | ||
status: 200, | ||
url: '/api/pizzas', | ||
response: '@pizzasAPI' | ||
}).as('getPizzas'); | ||
|
||
cy.visit(''); | ||
}); | ||
|
||
it('should delete a pizza', () => { | ||
cy.wait(5000); | ||
|
||
cy.get('.pizza-item') | ||
.contains(`Seaside Surfin'`) | ||
.within(() => { | ||
cy.get('.btn.btn__ok').click(); | ||
}); | ||
|
||
cy.get('.btn.btn__warning') | ||
.contains('Delete Pizza') | ||
.click(); | ||
|
||
cy.wait('@deletePizza') | ||
.should(res => { | ||
expect(res.status).to.equal(200); | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.