47 lines
1.6 KiB
JavaScript
47 lines
1.6 KiB
JavaScript
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');
|
|
});
|
|
});
|