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:
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');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user