This repository was archived by the owner on Jun 4, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 73
3.1 refactor tests #113
Merged
Merged
3.1 refactor tests #113
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
68f8a13
props fixes
ac9a1d5
update changelog
2aef71c
bump version
d96fc00
filter typing
099c85d
- delete unused usage files
00173a1
- separate cypress and visual tests into 2 ci jobs
29b59f2
- build before tests!
3562225
Merge remote-tracking branch 'origin/develop' into 3.1-refactor-tests
c1a79c5
add browsers to the node image for visual-test
c13ae61
merge with develop
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 hidden or 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 hidden or 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 was deleted.
Oops, something went wrong.
This file contains hidden or 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,9 +1,9 @@ | ||
{ | ||
"video": false, | ||
"fixturesFolder": "./tests/e2e/cypress/fixtures", | ||
"integrationFolder": "./tests/e2e/cypress/integration", | ||
"pluginsFile": "./tests/e2e/cypress/plugins/index.js", | ||
"screenshotsFolder": "./tests/e2e/cypress/screenshots", | ||
"supportFile": "./tests/e2e/cypress/support/index.js", | ||
"videoFolder": "./tests/e2e/cypress/videos" | ||
"fixturesFolder": "./tests/cypress/fixtures", | ||
"integrationFolder": "./tests/cypress/tests", | ||
"pluginsFile": "./tests/cypress/plugins/index.js", | ||
"screenshotsFolder": "./tests/cypress/screenshots", | ||
"supportFile": "./tests/cypress/support/index.js", | ||
"videoFolder": "./tests/cypress/videos" | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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 |
---|---|---|
|
@@ -7,8 +7,8 @@ | |
"preprivate::opentests": "run-s private::wait*", | ||
"preprivate::runtests": "run-s private::wait*", | ||
"private::build": "webpack --display-reasons --bail", | ||
"private::host_dash8081": "python tests/e2e/dash/v_be_page.py", | ||
"private::host_dash8082": "python tests/e2e/dash/v_copy_paste.py", | ||
"private::host_dash8081": "python tests/cypress/dash/v_be_page.py", | ||
"private::host_dash8082": "python tests/cypress/dash/v_copy_paste.py", | ||
"private::host_js": "http-server ./dash_table -c-1 --silent", | ||
"private::wait_dash8081": "wait-on http://localhost:8081", | ||
"private::wait_dash8082": "wait-on http://localhost:8082", | ||
|
@@ -17,15 +17,14 @@ | |
"private::lint.ts": "tslint --project . src/**/*.ts", | ||
"private::opentests": "cypress open", | ||
"private::runtests": "cypress run --browser chrome", | ||
"private::test-e2e": "run-p --race private::host* private::runtests", | ||
"private::test-visual": "build-storybook && percy-storybook", | ||
"build.watch": "webpack-dev-server --content-base dash_table --mode development", | ||
"build:js": "run-s \"private::build -- --mode production\"", | ||
"build:js-dev": "run-s \"private::build -- --mode development\"", | ||
"build:js-test": "webpack --display-reasons --bail --config webpack.test.config.js", | ||
"build:py": "./extract-meta src/dash-table/Table.js > dash_table/metadata.json && cp package.json dash_table", | ||
"lint": "run-s private::lint.js private::lint.ts", | ||
"test": "run-s private::test-*", | ||
"test": "run-p --race private::host* private::runtests", | ||
"test.visual": "build-storybook && percy-storybook", | ||
"test.watch": "run-p --race \"build:js-test -- --watch\" --race private::host* private::opentests" | ||
}, | ||
"author": "Chris P <[email protected]", | ||
|
This file contains hidden or 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 |
---|---|---|
|
@@ -7,8 +7,8 @@ | |
"preprivate::opentests": "run-s private::wait*", | ||
"preprivate::runtests": "run-s private::wait*", | ||
"private::build": "webpack --display-reasons --bail", | ||
"private::host_dash8081": "python tests/e2e/dash/v_be_page.py", | ||
"private::host_dash8082": "python tests/e2e/dash/v_copy_paste.py", | ||
"private::host_dash8081": "python tests/cypress/dash/v_be_page.py", | ||
"private::host_dash8082": "python tests/cypress/dash/v_copy_paste.py", | ||
"private::host_js": "http-server ./dash_table -c-1 --silent", | ||
"private::wait_dash8081": "wait-on http://localhost:8081", | ||
"private::wait_dash8082": "wait-on http://localhost:8082", | ||
|
@@ -17,15 +17,14 @@ | |
"private::lint.ts": "tslint --project . src/**/*.ts", | ||
"private::opentests": "cypress open", | ||
"private::runtests": "cypress run --browser chrome", | ||
"private::test-e2e": "run-p --race private::host* private::runtests", | ||
"private::test-visual": "build-storybook && percy-storybook", | ||
"build.watch": "webpack-dev-server --content-base dash_table --mode development", | ||
"build:js": "run-s \"private::build -- --mode production\"", | ||
"build:js-dev": "run-s \"private::build -- --mode development\"", | ||
"build:js-test": "webpack --display-reasons --bail --config webpack.test.config.js", | ||
"build:py": "./extract-meta src/dash-table/Table.js > dash_table/metadata.json && cp package.json dash_table", | ||
"lint": "run-s private::lint.js private::lint.ts", | ||
"test": "run-s private::test-*", | ||
"test": "run-p --race private::host* private::runtests", | ||
"test.visual": "build-storybook && percy-storybook", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. new script for visual tests |
||
"test.watch": "run-p --race \"build:js-test -- --watch\" --race private::host* private::opentests" | ||
}, | ||
"author": "Chris P <[email protected]", | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or 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,18 @@ | ||
import DashTable from 'cypress/DashTable'; | ||
|
||
describe('delete', () => { | ||
beforeEach(() => cy.visit('http://localhost:8081')); | ||
|
||
it('can delete row', () => { | ||
DashTable.getCell(0, 0).within(() => cy.get('.dash-cell-value').should('have.html', '0')); | ||
DashTable.getDelete(0).click(); | ||
DashTable.getCell(0, 0).within(() => cy.get('.dash-cell-value').should('have.html', '1')); | ||
}); | ||
|
||
it('can delete row when sorted', () => { | ||
cy.get('tr th.column-0 .sort').click({ force: true }); | ||
DashTable.getCell(0, 0).within(() => cy.get('.dash-cell-value').should('have.html', '28155')); | ||
DashTable.getDelete(0).click(); | ||
DashTable.getCell(0, 0).within(() => cy.get('.dash-cell-value').should('have.html', '28154')); | ||
}); | ||
}); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Moved the test involving a dash server into its own file under /server |
This file contains hidden or 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 hidden or 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,18 @@ | ||
import DashTable from 'cypress/DashTable'; | ||
|
||
describe('delete', () => { | ||
beforeEach(() => cy.visit('http://localhost:8080')); | ||
|
||
it('can delete row', () => { | ||
DashTable.getCell(0, 0).within(() => cy.get('.dash-cell-value').should('have.html', '1')); | ||
DashTable.getDelete(0).click(); | ||
DashTable.getCell(0, 0).within(() => cy.get('.dash-cell-value').should('have.html', '2')); | ||
}); | ||
|
||
it('can delete row when sorted', () => { | ||
cy.get('tr th.column-0 .sort').click({ force: true }); | ||
DashTable.getCell(0, 0).within(() => cy.get('.dash-cell-value').should('have.html', '4999')); | ||
DashTable.getDelete(0).click(); | ||
DashTable.getCell(0, 0).within(() => cy.get('.dash-cell-value').should('have.html', '4998')); | ||
}); | ||
}); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Moved standalone (no dash server) test under /standalone |
File renamed without changes.
File renamed without changes.
This file contains hidden or 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,25 @@ | ||
import DashTable from 'cypress/DashTable'; | ||
|
||
describe('select row', () => { | ||
describe('fe pagination & sort', () => { | ||
beforeEach(() => cy.visit('http://localhost:8080')); | ||
|
||
it('can select row', () => { | ||
DashTable.getSelect(0).within(() => cy.get('input').click()); | ||
DashTable.getSelect(0).within(() => cy.get('input').should('be.checked')); | ||
}); | ||
|
||
it('can select row when sorted', () => { | ||
cy.get('tr th.column-0 .sort').click({ force: true }); | ||
DashTable.getSelect(0).within(() => cy.get('input').click()); | ||
DashTable.getSelect(0).within(() => cy.get('input').should('be.checked')); | ||
}); | ||
|
||
it('select, sort, new row is not selected', () => { | ||
DashTable.getSelect(0).within(() => cy.get('input').click()); | ||
DashTable.getSelect(0).within(() => cy.get('input').should('be.checked')); | ||
cy.get('tr th.column-0 .sort').click({ force: true }); | ||
DashTable.getSelect(0).within(() => cy.get('input').should('not.be.checked')); | ||
}); | ||
}); | ||
}); |
File renamed without changes.
File renamed without changes.
This file contains hidden or 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
File renamed without changes.
File renamed without changes.
This file contains hidden or 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
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.
new job for visual tests