unused cypress file; why unused? because cypress doesn't support canvas element
This commit is contained in:
29
cypress/e2e/pageAdmin.cy.js
Normal file
29
cypress/e2e/pageAdmin.cy.js
Normal file
@@ -0,0 +1,29 @@
|
||||
describe('Modal dismissal related navigation button test', ()=>{
|
||||
beforeEach(() => {
|
||||
cy.visit('https://REDACTED-HOST/files');
|
||||
cy.login();
|
||||
cy.visit('https://REDACTED-HOST/files');
|
||||
});
|
||||
|
||||
it("On MAP page, after dismissing modal, active page is still MAP page, not CONFORMANCE page.", () => {
|
||||
cy.get('tbody td').first().dblclick();
|
||||
// Should enter MAP page
|
||||
cy.url().should('include', 'map');
|
||||
cy.url().should('include', 'filter');
|
||||
|
||||
cy.get('canvas').click();
|
||||
|
||||
// At least set a condition as an edit action
|
||||
cy.get('[type="checkbox"]').first().check();
|
||||
cy.contains('button', 'Apply').click();
|
||||
cy.get('#tabFunnel').click();
|
||||
cy.contains('button', 'Apply All').click();
|
||||
cy.contains('.nav-item', 'CONFORMANCE').click();
|
||||
// Simulate escape keyboard; simulate dismissal of modal
|
||||
cy.get('body').trigger('keydown', { keyCode: 27});
|
||||
cy.wait(500);
|
||||
cy.get('body').trigger('keyup', { keyCode: 27});
|
||||
cy.get('.nav-item', 'MAP').should('have.class', 'active');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user