upgrade cypress version

This commit is contained in:
Przemek Więch
2025-01-11 12:04:20 +01:00
parent 0f9a46a7b0
commit 9cadda886e
8 changed files with 650 additions and 1827 deletions

View File

@@ -0,0 +1,19 @@
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');
});
it('shows the right panel', () => {
cy.contains('a random note');
});
});

View File

@@ -0,0 +1,11 @@
describe('Embedded mode', () => {
it('shows data', () => {
const url = 'https://pewu.github.io/topola-embedded/#' + Cypress.config('baseUrl');
cy.visit(url);
cy.get('iframe')
.its('0.contentDocument.body').should('not.be.empty')
.then(cy.wrap)
.find('#root')
.contains('Bonifacy');
});
});

12
cypress/e2e/intro.cy.js Normal file
View File

@@ -0,0 +1,12 @@
describe('Intro page', () => {
beforeEach(() => {
cy.visit('/');
});
it('displays intro text', () => {
cy.contains('Examples');
});
it('displays menu', () => {
cy.contains('Open file');
cy.contains('Load from URL');
});
});

12
cypress/e2e/search.cy.js Normal file
View File

@@ -0,0 +1,12 @@
describe('Chart view', () => {
beforeEach(() => {
cy.visit('/view?handleCors=false&url=https%3A%2F%2Fraw.githubusercontent.com%2FPeWu%2Ftopola%2Fmaster%2Fdemo%2Fdata%2Ffamily.ged');
});
it('Search works', () => {
cy.contains('Chike').should('not.exist');
cy.get('#search').type('chik');
cy.contains('Chike');
cy.get('#search').type('{enter}');
cy.get('#content').contains('Chike');
});
});