Apply repository-wide ESLint auto-fix formatting pass
Co-Authored-By: Codex <codex@openai.com>
This commit is contained in:
@@ -3,60 +3,60 @@
|
||||
// Authors:
|
||||
// imacat.yang@dsp.im (imacat), 2026/03/05
|
||||
|
||||
import { loginWithFixtures, setupApiIntercepts } from '../support/intercept';
|
||||
import { loginWithFixtures, setupApiIntercepts } from "../support/intercept";
|
||||
|
||||
describe('Navigation and Routing', () => {
|
||||
it('redirects / to /files when logged in', () => {
|
||||
describe("Navigation and Routing", () => {
|
||||
it("redirects / to /files when logged in", () => {
|
||||
loginWithFixtures();
|
||||
cy.visit('/');
|
||||
cy.url().should('include', '/files');
|
||||
cy.visit("/");
|
||||
cy.url().should("include", "/files");
|
||||
});
|
||||
|
||||
it('shows 404 page for unknown routes', () => {
|
||||
it("shows 404 page for unknown routes", () => {
|
||||
loginWithFixtures();
|
||||
cy.visit('/nonexistent-page');
|
||||
cy.contains('404').should('exist');
|
||||
cy.visit("/nonexistent-page");
|
||||
cy.contains("404").should("exist");
|
||||
});
|
||||
|
||||
it('navbar shows correct view name', () => {
|
||||
it("navbar shows correct view name", () => {
|
||||
loginWithFixtures();
|
||||
cy.visit('/files');
|
||||
cy.wait('@getFiles');
|
||||
cy.get('#nav_bar').should('exist');
|
||||
cy.get('#nav_bar h2').should('contain', 'FILES');
|
||||
cy.visit("/files");
|
||||
cy.wait("@getFiles");
|
||||
cy.get("#nav_bar").should("exist");
|
||||
cy.get("#nav_bar h2").should("contain", "FILES");
|
||||
});
|
||||
|
||||
it('navbar shows back arrow on non-files pages', () => {
|
||||
it("navbar shows back arrow on non-files pages", () => {
|
||||
loginWithFixtures();
|
||||
cy.visit('/discover/log/1/map');
|
||||
cy.visit("/discover/log/1/map");
|
||||
// Back arrow should be visible on discover pages
|
||||
cy.get('#backPage').should('exist');
|
||||
cy.get("#backPage").should("exist");
|
||||
});
|
||||
|
||||
it('navbar tabs are clickable on discover page', () => {
|
||||
it("navbar tabs are clickable on discover page", () => {
|
||||
loginWithFixtures();
|
||||
cy.visit('/discover/log/1/map');
|
||||
cy.visit("/discover/log/1/map");
|
||||
// Discover navbar should show MAP, CONFORMANCE, PERFORMANCE tabs
|
||||
cy.contains('.nav-item', 'MAP').should('exist');
|
||||
cy.contains('.nav-item', 'CONFORMANCE').should('exist');
|
||||
cy.contains('.nav-item', 'PERFORMANCE').should('exist');
|
||||
cy.contains(".nav-item", "MAP").should("exist");
|
||||
cy.contains(".nav-item", "CONFORMANCE").should("exist");
|
||||
cy.contains(".nav-item", "PERFORMANCE").should("exist");
|
||||
|
||||
// Click CONFORMANCE tab
|
||||
cy.contains('.nav-item', 'CONFORMANCE').click();
|
||||
cy.url().should('include', '/conformance');
|
||||
cy.contains(".nav-item", "CONFORMANCE").click();
|
||||
cy.url().should("include", "/conformance");
|
||||
|
||||
// Click PERFORMANCE tab
|
||||
cy.contains('.nav-item', 'PERFORMANCE').click();
|
||||
cy.url().should('include', '/performance');
|
||||
cy.contains(".nav-item", "PERFORMANCE").click();
|
||||
cy.url().should("include", "/performance");
|
||||
|
||||
// Click MAP tab to go back
|
||||
cy.contains('.nav-item', 'MAP').click();
|
||||
cy.url().should('include', '/map');
|
||||
cy.contains(".nav-item", "MAP").click();
|
||||
cy.url().should("include", "/map");
|
||||
});
|
||||
|
||||
it('login page is accessible at /login', () => {
|
||||
it("login page is accessible at /login", () => {
|
||||
setupApiIntercepts();
|
||||
cy.visit('/login');
|
||||
cy.get('h2').should('contain', 'LOGIN');
|
||||
cy.visit("/login");
|
||||
cy.get("h2").should("contain", "LOGIN");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user