Add Discover page E2E tests with real API fixture data
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
50
cypress/e2e/discoverConformance.cy.js
Normal file
50
cypress/e2e/discoverConformance.cy.js
Normal file
@@ -0,0 +1,50 @@
|
||||
import { loginWithFixtures } from '../support/intercept';
|
||||
|
||||
describe('Discover Conformance Page', () => {
|
||||
beforeEach(() => {
|
||||
loginWithFixtures();
|
||||
cy.visit('/discover/log/297310264/conformance');
|
||||
cy.wait('@getLogCheckParams');
|
||||
});
|
||||
|
||||
it('page loads and loading overlay disappears', () => {
|
||||
cy.get('.z-\\[9999\\]', { timeout: 10000 }).should('not.exist');
|
||||
});
|
||||
|
||||
it('displays Rule Settings sidebar', () => {
|
||||
cy.get('.z-\\[9999\\]', { timeout: 10000 }).should('not.exist');
|
||||
cy.contains('Rule Settings').should('be.visible');
|
||||
});
|
||||
|
||||
it('displays Conformance Checking Results heading', () => {
|
||||
cy.get('.z-\\[9999\\]', { timeout: 10000 }).should('not.exist');
|
||||
cy.contains('Conformance Checking Results').should('be.visible');
|
||||
});
|
||||
|
||||
it('displays rule type radio options', () => {
|
||||
cy.get('.z-\\[9999\\]', { timeout: 10000 }).should('not.exist');
|
||||
cy.contains('Have activity').should('be.visible');
|
||||
cy.contains('Activity sequence').should('be.visible');
|
||||
cy.contains('Activity duration').should('be.visible');
|
||||
cy.contains('Processing time').should('be.visible');
|
||||
cy.contains('Waiting time').should('be.visible');
|
||||
cy.contains('Cycle time').should('be.visible');
|
||||
});
|
||||
|
||||
it('displays Clear and Apply buttons', () => {
|
||||
cy.get('.z-\\[9999\\]', { timeout: 10000 }).should('not.exist');
|
||||
cy.contains('button', 'Clear').should('be.visible');
|
||||
cy.contains('button', 'Apply').should('exist');
|
||||
});
|
||||
|
||||
it('displays Activity list area', () => {
|
||||
cy.get('.z-\\[9999\\]', { timeout: 10000 }).should('not.exist');
|
||||
cy.contains('Activity list').should('be.visible');
|
||||
});
|
||||
|
||||
it('displays default placeholder values in results', () => {
|
||||
cy.get('.z-\\[9999\\]', { timeout: 10000 }).should('not.exist');
|
||||
cy.contains('Conformance Rate').should('be.visible');
|
||||
cy.contains('Cases').should('be.visible');
|
||||
});
|
||||
});
|
||||
46
cypress/e2e/discoverMap.cy.js
Normal file
46
cypress/e2e/discoverMap.cy.js
Normal file
@@ -0,0 +1,46 @@
|
||||
import { loginWithFixtures } from '../support/intercept';
|
||||
|
||||
describe('Discover Map Page', () => {
|
||||
beforeEach(() => {
|
||||
loginWithFixtures();
|
||||
// Suppress Cytoscape rendering errors in headless mode
|
||||
cy.on('uncaught:exception', () => false);
|
||||
cy.visit('/discover/log/297310264/map');
|
||||
cy.wait('@getDiscover');
|
||||
});
|
||||
|
||||
it('page loads and cytoscape container exists', () => {
|
||||
cy.get('#cy').should('exist');
|
||||
});
|
||||
|
||||
it('displays left sidebar buttons', () => {
|
||||
// Visualization Setting, Filter, Traces buttons
|
||||
cy.get('.material-symbols-outlined').contains('track_changes').should('exist');
|
||||
cy.get('.material-symbols-outlined').contains('tornado').should('exist');
|
||||
cy.get('.material-symbols-outlined').contains('rebase').should('exist');
|
||||
});
|
||||
|
||||
it('displays right sidebar Summary button', () => {
|
||||
cy.get('#sidebar_state').should('exist');
|
||||
cy.get('#iconState').should('exist');
|
||||
});
|
||||
|
||||
it('clicking Visualization Setting button toggles sidebar', () => {
|
||||
// Click the track_changes icon (Visualization Setting)
|
||||
cy.contains('span.material-symbols-outlined', 'track_changes').parent('li').click();
|
||||
// SidebarView should open
|
||||
cy.contains('Visualization Setting').should('be.visible');
|
||||
});
|
||||
|
||||
it('clicking Summary button toggles sidebar', () => {
|
||||
cy.get('#iconState').click();
|
||||
// SidebarState should open with insights/stats
|
||||
cy.contains('Summary').should('be.visible');
|
||||
});
|
||||
|
||||
it('clicking Traces button toggles sidebar', () => {
|
||||
cy.contains('span.material-symbols-outlined', 'rebase').parent('li').click();
|
||||
// SidebarTraces should open
|
||||
cy.contains('Traces').should('be.visible');
|
||||
});
|
||||
});
|
||||
61
cypress/e2e/discoverPerformance.cy.js
Normal file
61
cypress/e2e/discoverPerformance.cy.js
Normal file
@@ -0,0 +1,61 @@
|
||||
import { loginWithFixtures } from '../support/intercept';
|
||||
|
||||
describe('Discover Performance Page', () => {
|
||||
beforeEach(() => {
|
||||
loginWithFixtures();
|
||||
cy.visit('/discover/log/297310264/performance');
|
||||
cy.wait('@getPerformance');
|
||||
});
|
||||
|
||||
it('page loads and loading overlay disappears', () => {
|
||||
// Loading overlay should not be visible after data loads
|
||||
cy.get('.z-\\[9999\\]', { timeout: 10000 }).should('not.exist');
|
||||
});
|
||||
|
||||
it('displays Time Usage sidebar section', () => {
|
||||
cy.get('.z-\\[9999\\]', { timeout: 10000 }).should('not.exist');
|
||||
cy.contains('Time Usage').should('be.visible');
|
||||
});
|
||||
|
||||
it('displays Frequency sidebar section', () => {
|
||||
cy.get('.z-\\[9999\\]', { timeout: 10000 }).should('not.exist');
|
||||
cy.contains('Frequency').should('be.visible');
|
||||
});
|
||||
|
||||
it('displays sidebar navigation items', () => {
|
||||
cy.get('.z-\\[9999\\]', { timeout: 10000 }).should('not.exist');
|
||||
cy.contains('Cycle Time & Efficiency').should('be.visible');
|
||||
cy.contains('Processing Time').should('be.visible');
|
||||
cy.contains('Waiting Time').should('be.visible');
|
||||
cy.contains('Number of Cases').should('be.visible');
|
||||
});
|
||||
|
||||
it('displays chart titles', () => {
|
||||
cy.get('.z-\\[9999\\]', { timeout: 10000 }).should('not.exist');
|
||||
cy.contains('Average Cycle Time').should('be.visible');
|
||||
cy.contains('Cycle Efficiency').should('be.visible');
|
||||
cy.contains('Average Processing Time').should('be.visible');
|
||||
cy.contains('Average Processing Time by Activity').should('be.visible');
|
||||
cy.contains('Average Waiting Time').should('be.visible');
|
||||
});
|
||||
|
||||
it('displays frequency chart titles', () => {
|
||||
cy.get('.z-\\[9999\\]', { timeout: 10000 }).should('not.exist');
|
||||
cy.contains('New Cases').should('be.visible');
|
||||
cy.contains('Number of Cases by Activity').should('be.visible');
|
||||
});
|
||||
|
||||
it('renders canvas elements for charts', () => {
|
||||
cy.get('.z-\\[9999\\]', { timeout: 10000 }).should('not.exist');
|
||||
// Chart.js renders into canvas elements
|
||||
cy.get('canvas').should('have.length.at.least', 5);
|
||||
});
|
||||
|
||||
it('sidebar navigation scrolls to section', () => {
|
||||
cy.get('.z-\\[9999\\]', { timeout: 10000 }).should('not.exist');
|
||||
// Click on "Waiting Time" in sidebar
|
||||
cy.contains('li', 'Waiting Time').click();
|
||||
// The Waiting Time section should be in view
|
||||
cy.get('#waitingTime').should('exist');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user