Add Files to Discover entry flow E2E tests
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
69
cypress/e2e/filesToDiscover.cy.js
Normal file
69
cypress/e2e/filesToDiscover.cy.js
Normal file
@@ -0,0 +1,69 @@
|
||||
import { loginWithFixtures } from '../support/intercept';
|
||||
|
||||
describe('Files to Discover Entry Flow', () => {
|
||||
beforeEach(() => {
|
||||
loginWithFixtures();
|
||||
// Suppress Cytoscape rendering errors in headless mode
|
||||
cy.on('uncaught:exception', () => false);
|
||||
cy.visit('/files');
|
||||
cy.wait('@getFiles');
|
||||
});
|
||||
|
||||
describe('double-click table row to enter Discover', () => {
|
||||
it('double-click log file navigates to Map page', () => {
|
||||
// Target the Name column (has class .fileName) to avoid matching Dependency column
|
||||
cy.contains('td.fileName', 'sample-process.xes').parent('tr').dblclick();
|
||||
cy.url().should('include', '/discover/log/1/map');
|
||||
cy.wait('@getDiscover');
|
||||
cy.get('#cy').should('exist');
|
||||
});
|
||||
|
||||
it('double-click filter file navigates to Map page', () => {
|
||||
cy.contains('td.fileName', 'filtered-sample').parent('tr').dblclick();
|
||||
cy.url().should('include', '/discover/filter/10/map');
|
||||
cy.wait('@getFilterDiscover');
|
||||
cy.get('#cy').should('exist');
|
||||
});
|
||||
});
|
||||
|
||||
describe('double-click grid card to enter Discover', () => {
|
||||
beforeEach(() => {
|
||||
// Switch to grid view
|
||||
cy.get('svg').parent('li.cursor-pointer').last().click();
|
||||
});
|
||||
|
||||
it('double-click log file grid card navigates to Map page', () => {
|
||||
// Use last() to target the All Files grid section (not Recently Used)
|
||||
cy.get('li[title="sample-process.xes"]').last().dblclick();
|
||||
cy.url().should('include', '/discover/log/1/map');
|
||||
cy.wait('@getDiscover');
|
||||
cy.get('#cy').should('exist');
|
||||
});
|
||||
});
|
||||
|
||||
describe('DISCOVER tab filters files', () => {
|
||||
it('clicking DISCOVER tab shows only Log, Filter, and Rule files', () => {
|
||||
cy.get('.nav-item').contains('DISCOVER').click();
|
||||
cy.contains('td.fileName', 'sample-process.xes').should('exist');
|
||||
cy.contains('td.fileName', 'filtered-sample').should('exist');
|
||||
cy.contains('td.fileName', 'conformance-check-1').should('exist');
|
||||
});
|
||||
});
|
||||
|
||||
describe('Navbar state after entering Discover', () => {
|
||||
it('shows DISCOVER heading and tabs after entering from Files', () => {
|
||||
cy.contains('td.fileName', 'sample-process.xes').parent('tr').dblclick();
|
||||
cy.url().should('include', '/discover/');
|
||||
cy.get('#nav_bar').contains('DISCOVER').should('be.visible');
|
||||
cy.get('.nav-item').contains('MAP').should('exist');
|
||||
cy.get('.nav-item').contains('CONFORMANCE').should('exist');
|
||||
cy.get('.nav-item').contains('PERFORMANCE').should('exist');
|
||||
});
|
||||
|
||||
it('shows back arrow pointing to /files', () => {
|
||||
cy.contains('td.fileName', 'sample-process.xes').parent('tr').dblclick();
|
||||
cy.url().should('include', '/discover/');
|
||||
cy.get('#backPage').should('have.attr', 'href', '/files');
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user