Rewrite old E2E tests to use fixture-based API mocking, eliminating need for real credentials
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,29 +1,32 @@
|
||||
describe('Modal dismissal related navigation button test', ()=>{
|
||||
beforeEach(() => {
|
||||
cy.visit('/files');
|
||||
cy.login();
|
||||
cy.visit('/files');
|
||||
});
|
||||
import { loginWithFixtures } from '../support/intercept';
|
||||
|
||||
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');
|
||||
describe('Discover page navigation tabs', () => {
|
||||
beforeEach(() => {
|
||||
loginWithFixtures();
|
||||
cy.visit('/files');
|
||||
cy.wait('@getFiles');
|
||||
});
|
||||
|
||||
cy.get('canvas').click();
|
||||
it('Double-clicking a log file enters the MAP page.', () => {
|
||||
cy.contains('td.fileName', 'sample-process.xes').dblclick();
|
||||
cy.url().should('include', 'map');
|
||||
// MAP tab should exist in the navbar
|
||||
cy.contains('.nav-item', 'MAP').should('exist');
|
||||
});
|
||||
|
||||
// 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');
|
||||
});
|
||||
it('Clicking CONFORMANCE tab switches active page.', () => {
|
||||
cy.contains('td.fileName', 'sample-process.xes').dblclick();
|
||||
cy.url().should('include', 'map');
|
||||
cy.contains('.nav-item', 'CONFORMANCE').click();
|
||||
cy.url().should('include', 'conformance');
|
||||
cy.contains('.nav-item', 'CONFORMANCE').should('have.class', 'active');
|
||||
});
|
||||
|
||||
it('Clicking PERFORMANCE tab switches active page.', () => {
|
||||
cy.contains('td.fileName', 'sample-process.xes').dblclick();
|
||||
cy.url().should('include', 'map');
|
||||
cy.contains('.nav-item', 'PERFORMANCE').click();
|
||||
cy.url().should('include', 'performance');
|
||||
cy.contains('.nav-item', 'PERFORMANCE').should('have.class', 'active');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user