92 lines
3.3 KiB
JavaScript
92 lines
3.3 KiB
JavaScript
import { loginWithFixtures } from '../support/intercept';
|
|
|
|
describe('Discover Tab Navigation', () => {
|
|
beforeEach(() => {
|
|
loginWithFixtures();
|
|
// Suppress Cytoscape rendering errors in headless mode
|
|
cy.on('uncaught:exception', () => false);
|
|
});
|
|
|
|
describe('navigating from Map page', () => {
|
|
beforeEach(() => {
|
|
cy.visit('/discover/log/297310264/map');
|
|
cy.wait('@getDiscover');
|
|
});
|
|
|
|
it('shows DISCOVER heading and MAP/CONFORMANCE/PERFORMANCE tabs', () => {
|
|
cy.get('#nav_bar').contains('DISCOVER').should('be.visible');
|
|
cy.get('.nav-item').should('have.length', 3);
|
|
cy.get('.nav-item').eq(0).should('contain', 'MAP');
|
|
cy.get('.nav-item').eq(1).should('contain', 'CONFORMANCE');
|
|
cy.get('.nav-item').eq(2).should('contain', 'PERFORMANCE');
|
|
});
|
|
|
|
it('clicking PERFORMANCE tab navigates to performance page', () => {
|
|
cy.get('.nav-item').contains('PERFORMANCE').click();
|
|
cy.url().should('include', '/performance');
|
|
cy.wait('@getPerformance');
|
|
cy.get('.z-\\[9999\\]', { timeout: 10000 }).should('not.exist');
|
|
cy.contains('Time Usage').should('be.visible');
|
|
});
|
|
|
|
it('clicking CONFORMANCE tab navigates to conformance page', () => {
|
|
cy.get('.nav-item').contains('CONFORMANCE').click();
|
|
cy.url().should('include', '/conformance');
|
|
cy.wait('@getLogCheckParams');
|
|
cy.get('.z-\\[9999\\]', { timeout: 10000 }).should('not.exist');
|
|
cy.contains('Rule Settings').should('be.visible');
|
|
});
|
|
|
|
it('shows back arrow to return to Files', () => {
|
|
cy.get('#backPage').should('exist');
|
|
cy.get('#backPage').should('have.attr', 'href', '/files');
|
|
});
|
|
});
|
|
|
|
describe('navigating from Performance page', () => {
|
|
beforeEach(() => {
|
|
cy.visit('/discover/log/297310264/performance');
|
|
cy.wait('@getPerformance');
|
|
cy.get('.z-\\[9999\\]', { timeout: 10000 }).should('not.exist');
|
|
});
|
|
|
|
it('clicking MAP tab navigates to map page', () => {
|
|
cy.get('.nav-item').contains('MAP').click();
|
|
cy.url().should('include', '/map');
|
|
cy.wait('@getDiscover');
|
|
cy.get('#cy').should('exist');
|
|
});
|
|
|
|
it('clicking CONFORMANCE tab navigates to conformance page', () => {
|
|
cy.get('.nav-item').contains('CONFORMANCE').click();
|
|
cy.url().should('include', '/conformance');
|
|
cy.wait('@getLogCheckParams');
|
|
cy.get('.z-\\[9999\\]', { timeout: 10000 }).should('not.exist');
|
|
cy.contains('Rule Settings').should('be.visible');
|
|
});
|
|
});
|
|
|
|
describe('navigating from Conformance page', () => {
|
|
beforeEach(() => {
|
|
cy.visit('/discover/log/297310264/conformance');
|
|
cy.wait('@getLogCheckParams');
|
|
cy.get('.z-\\[9999\\]', { timeout: 10000 }).should('not.exist');
|
|
});
|
|
|
|
it('clicking MAP tab navigates to map page', () => {
|
|
cy.get('.nav-item').contains('MAP').click();
|
|
cy.url().should('include', '/map');
|
|
cy.wait('@getDiscover');
|
|
cy.get('#cy').should('exist');
|
|
});
|
|
|
|
it('clicking PERFORMANCE tab navigates to performance page', () => {
|
|
cy.get('.nav-item').contains('PERFORMANCE').click();
|
|
cy.url().should('include', '/performance');
|
|
cy.wait('@getPerformance');
|
|
cy.get('.z-\\[9999\\]', { timeout: 10000 }).should('not.exist');
|
|
cy.contains('Time Usage').should('be.visible');
|
|
});
|
|
});
|
|
});
|