mirror of
https://github.com/PeWu/topola-viewer.git
synced 2025-12-24 03:00:05 +00:00
Added cypress e2e tests
This commit is contained in:
parent
543a910c2f
commit
358f6c6a7d
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,3 +1,7 @@
|
||||
build
|
||||
node_modules
|
||||
src/react-app-env.d.ts
|
||||
cypress/fixtures/example.json
|
||||
cypress/plugins/index.js
|
||||
cypress/support/commands.js
|
||||
cypress/support/index.js
|
||||
|
||||
5
cypress.json
Normal file
5
cypress.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"viewportWidth": 1280,
|
||||
"viewportHeight": 1024,
|
||||
"baseUrl": "http://localhost:3000/#"
|
||||
}
|
||||
13
cypress/integration/chart_view.spec.js
Normal file
13
cypress/integration/chart_view.spec.js
Normal file
@ -0,0 +1,13 @@
|
||||
describe('Chart view', () => {
|
||||
beforeEach(() => {
|
||||
cy.visit('/view?handleCors=false&url=https%3A%2F%2Fraw.githubusercontent.com%2FPeWu%2Ftopola%2Fmaster%2Fdemo%2Fdata%2Ffamily.ged');
|
||||
});
|
||||
it('loads data from URL', () => {
|
||||
cy.contains('Bonifacy');
|
||||
});
|
||||
it('Animates chart', () => {
|
||||
cy.contains('Chike').should('not.exist');
|
||||
cy.contains('Radobod').click({force: true});
|
||||
cy.contains('Chike');
|
||||
});
|
||||
});
|
||||
12
cypress/integration/intro.spec.js
Normal file
12
cypress/integration/intro.spec.js
Normal file
@ -0,0 +1,12 @@
|
||||
describe('Intro page', () => {
|
||||
beforeEach(() => {
|
||||
cy.visit('/');
|
||||
});
|
||||
it('displays intro text', () => {
|
||||
cy.contains('Here are some examples');
|
||||
});
|
||||
it('displays menu', () => {
|
||||
cy.contains('Load from URL');
|
||||
cy.contains('Load from file');
|
||||
});
|
||||
});
|
||||
939
package-lock.json
generated
939
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -43,6 +43,7 @@
|
||||
"@types/react-dom": "*",
|
||||
"@types/react-intl": "^2.3.15",
|
||||
"@types/react-router-dom": "^4.3.1",
|
||||
"cypress": "^4.0.1",
|
||||
"gh-pages": "^2.0.1",
|
||||
"prettier": "^1.15.3",
|
||||
"react-scripts": "^3.0.1",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user