Apply repository-wide ESLint auto-fix formatting pass
Co-Authored-By: Codex <codex@openai.com>
This commit is contained in:
@@ -3,36 +3,38 @@
|
||||
// Authors:
|
||||
// imacat.yang@dsp.im (imacat), 2026/03/05
|
||||
|
||||
import { loginWithFixtures } from '../support/intercept';
|
||||
import { loginWithFixtures } from "../support/intercept";
|
||||
|
||||
describe('404 Not Found Page', () => {
|
||||
describe("404 Not Found Page", () => {
|
||||
beforeEach(() => {
|
||||
// Suppress Navbar error on 404 page (route.matched[1] is null)
|
||||
cy.on('uncaught:exception', () => false);
|
||||
cy.on("uncaught:exception", () => false);
|
||||
});
|
||||
|
||||
it('displays 404 page for non-existent route', () => {
|
||||
it("displays 404 page for non-existent route", () => {
|
||||
loginWithFixtures();
|
||||
cy.visit('/this-page-does-not-exist');
|
||||
cy.contains('404').should('be.visible');
|
||||
cy.contains('The page you are looking for does not exist.').should('be.visible');
|
||||
cy.visit("/this-page-does-not-exist");
|
||||
cy.contains("404").should("be.visible");
|
||||
cy.contains("The page you are looking for does not exist.").should(
|
||||
"be.visible",
|
||||
);
|
||||
});
|
||||
|
||||
it('has a link back to Files page', () => {
|
||||
it("has a link back to Files page", () => {
|
||||
loginWithFixtures();
|
||||
cy.visit('/some/random/path');
|
||||
cy.contains('a', 'Go to Files')
|
||||
.should('be.visible')
|
||||
.should('have.attr', 'href', '/files');
|
||||
cy.visit("/some/random/path");
|
||||
cy.contains("a", "Go to Files")
|
||||
.should("be.visible")
|
||||
.should("have.attr", "href", "/files");
|
||||
});
|
||||
|
||||
it('displays 404 for unauthenticated user on invalid route', () => {
|
||||
cy.visit('/not-a-real-page');
|
||||
it("displays 404 for unauthenticated user on invalid route", () => {
|
||||
cy.visit("/not-a-real-page");
|
||||
cy.url().then((url) => {
|
||||
if (url.includes('/login')) {
|
||||
cy.url().should('include', '/login');
|
||||
if (url.includes("/login")) {
|
||||
cy.url().should("include", "/login");
|
||||
} else {
|
||||
cy.contains('404').should('be.visible');
|
||||
cy.contains("404").should("be.visible");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user