62 lines
2.3 KiB
JavaScript
62 lines
2.3 KiB
JavaScript
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');
|
|
});
|
|
});
|