forked from tnicola/cypress-parallel
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: [NO-JIRA] update lib to latest from upstream #2
Closed
Closed
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
217ebfb
move lib to sub directory
jeremiah-snee-openx fe614b1
git updates
jeremiah-snee-openx 8651ec0
pizza-demo
jeremiah-snee-openx a262161
add cypress
jeremiah-snee-openx 861625f
update repo files
jeremiah-snee-openx 1a2d4a1
npm i
jeremiah-snee-openx cc238bc
version bump
jeremiah-snee-openx c94279c
update names
jeremiah-snee-openx 395f823
revert
jeremiah-snee-openx 59ff696
merge change
jeremiah-snee-openx 65778df
remaining conflicts & misc fixes
jeremiah-snee-openx c5b90b4
rm
jeremiah-snee-openx 9ca5fcb
revert changes
jeremiah-snee-openx 4d7e494
redundent
jeremiah-snee-openx 30e94f4
format
jeremiah-snee-openx 5c46554
local debug
jeremiah-snee-openx 59f48de
package version update
jeremiah-snee-openx 5e75402
cli analytics off
jeremiah-snee-openx 9193f46
only install
jeremiah-snee-openx 08d25aa
rm
jeremiah-snee-openx 06e1646
Merge branch 'chore/test' into chore/updates
jeremiah-snee-openx 3bddaf9
resultPath
jeremiah-snee-openx 9f14601
final tweaks
jeremiah-snee-openx a96200c
update runner
jeremiah-snee-openx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,3 @@ | ||
* text=auto | ||
|
||
*.* text eol=lf |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022 Nicola Tommasi | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const { defineConfig } = require('cypress') | ||
|
||
module.exports = defineConfig({ | ||
video: false, | ||
e2e: { | ||
// We've imported your old cypress plugins here. | ||
// You may want to clean this up later by importing these. | ||
setupNodeEvents(on, config) { | ||
return require('./cypress/plugins/index.js')(on, config) | ||
}, | ||
baseUrl: 'http://localhost:3000', | ||
}, | ||
}) |
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,3 @@ | ||
describe('Spec filename contains glob characters', () => { | ||
it('should run', () => { cy.wrap(true).should('eq', true) }) | ||
}) |
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,35 @@ | ||
describe('Delete pizza', () => { | ||
beforeEach(() => { | ||
|
||
cy.fixture('pizzas').then((pizzas) => { | ||
cy.intercept({ | ||
method: 'DELETE', | ||
url: '/api/pizzas/*' | ||
}, pizzas).as('deletePizza'); | ||
|
||
cy.intercept({ | ||
method: 'GET', | ||
url: '/api/pizzas' | ||
}, pizzas).as('getPizzas'); | ||
}); | ||
cy.fixture('addTopping').as('addToppingAPI'); | ||
|
||
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').its('response.statusCode').should('eq', 200) | ||
}); | ||
}); |
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,97 @@ | ||
describe('Modify pizza', () => { | ||
beforeEach(() => { | ||
cy.fixture('pizzas').then((pizzas) => { | ||
cy.intercept({ | ||
method: 'GET', | ||
url: '/api/pizzas'}, pizzas).as('getPizzas'); | ||
}); | ||
|
||
cy.fixture('addTopping').as('addToppingAPI'); | ||
|
||
cy.intercept({ | ||
method: 'PUT', | ||
url: '/api/pizzas/*' | ||
}).as('addTopping'); | ||
|
||
cy.visit(''); | ||
}); | ||
|
||
it('should remove a topping', () => { | ||
cy.wait(5000); | ||
|
||
cy.get('.pizza-item') | ||
.contains(`Seaside Surfin'`) | ||
.within(() => { | ||
cy.get('.btn.btn__ok').click(); | ||
}); | ||
cy.get('.pizza-toppings-item') | ||
.contains('bacon') | ||
.click(); | ||
cy.get('.btn.btn__ok') | ||
.contains('Save changes') | ||
.click(); | ||
|
||
cy.wait('@addTopping') | ||
.its('request.body') | ||
.then(res => { | ||
expect(res.toppings).to.deep.equal([ | ||
{ id: 6, name: 'mushroom' }, | ||
{ id: 7, name: 'olive' }, | ||
{ id: 3, name: 'basil' }, | ||
{ id: 1, name: 'anchovy' }, | ||
{ id: 8, name: 'onion' }, | ||
{ id: 11, name: 'sweetcorn' }, | ||
{ id: 9, name: 'pepper' }, | ||
{ id: 5, name: 'mozzarella' } | ||
]); | ||
}); | ||
}); | ||
|
||
it('should add a topping', () => { | ||
cy.get('.pizza-item') | ||
.contains(`Plain Ol' Pepperoni`) | ||
.within(() => { | ||
cy.get('.btn.btn__ok').click(); | ||
}); | ||
cy.get('.pizza-toppings-item') | ||
.contains('mushroom') | ||
.click(); | ||
cy.get('.btn.btn__ok') | ||
.contains('Save changes') | ||
.click(); | ||
|
||
cy.wait('@addTopping') | ||
.its('request.body') | ||
.then(res => { | ||
expect(res.toppings).to.deep.equal([ | ||
{ id: 10, name: 'pepperoni' }, | ||
{ id: 6, name: 'mushroom' } | ||
]); | ||
}); | ||
}); | ||
|
||
it('can remove and add the same topping', () => { | ||
cy.get('.pizza-item') | ||
.contains(`Plain Ol' Pepperoni`) | ||
.within(() => { | ||
cy.get('.btn.btn__ok').click(); | ||
}); | ||
cy.get('.pizza-toppings-item') | ||
.contains('pepperoni') | ||
.click(); | ||
cy.get('.pizza-toppings-item') | ||
.contains('pepperoni') | ||
.click(); | ||
cy.get('.btn.btn__ok') | ||
.contains('Save changes') | ||
.click(); | ||
|
||
cy.wait('@addTopping') | ||
.its('response.body') | ||
.then(res => { | ||
expect(res.toppings).to.deep.equal([ | ||
{ id: 10, name: 'pepperoni' }, | ||
]); | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need all that example tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is used for local test validation of cypress plugin. It is not supposed to be included in the published distribution of the package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, but if we decide to keep tests then we need to setup ci/cd for it and also add tests for customisation