Apply repository-wide ESLint auto-fix formatting pass
Co-Authored-By: Codex <codex@openai.com>
This commit is contained in:
@@ -3,71 +3,71 @@
|
||||
// Authors:
|
||||
// imacat.yang@dsp.im (imacat), 2026/03/05
|
||||
|
||||
import { loginWithFixtures } from '../support/intercept';
|
||||
import { loginWithFixtures } from "../support/intercept";
|
||||
|
||||
describe('My Account Page', () => {
|
||||
describe("My Account Page", () => {
|
||||
beforeEach(() => {
|
||||
loginWithFixtures();
|
||||
cy.visit('/my-account');
|
||||
cy.wait('@getUserDetail');
|
||||
cy.visit("/my-account");
|
||||
cy.wait("@getUserDetail");
|
||||
});
|
||||
|
||||
it('displays user name heading', () => {
|
||||
cy.get('#general_acct_info_user_name').should('exist');
|
||||
cy.get('#general_acct_info_user_name').should('contain', 'Test Admin');
|
||||
it("displays user name heading", () => {
|
||||
cy.get("#general_acct_info_user_name").should("exist");
|
||||
cy.get("#general_acct_info_user_name").should("contain", "Test Admin");
|
||||
});
|
||||
|
||||
it('shows Admin badge for admin user', () => {
|
||||
cy.contains('Admin').should('exist');
|
||||
it("shows Admin badge for admin user", () => {
|
||||
cy.contains("Admin").should("exist");
|
||||
});
|
||||
|
||||
it('shows visit count info', () => {
|
||||
cy.get('#general_account_visit_info').should('exist');
|
||||
cy.get('#general_account_visit_info').should('contain', 'Total visits');
|
||||
it("shows visit count info", () => {
|
||||
cy.get("#general_account_visit_info").should("exist");
|
||||
cy.get("#general_account_visit_info").should("contain", "Total visits");
|
||||
});
|
||||
|
||||
it('displays account username (read-only)', () => {
|
||||
cy.contains('Test Admin').should('exist');
|
||||
it("displays account username (read-only)", () => {
|
||||
cy.contains("Test Admin").should("exist");
|
||||
});
|
||||
|
||||
it('shows Edit button for name field', () => {
|
||||
cy.contains('button', 'Edit').should('exist');
|
||||
it("shows Edit button for name field", () => {
|
||||
cy.contains("button", "Edit").should("exist");
|
||||
});
|
||||
|
||||
it('clicking Edit shows input field and Save/Cancel buttons', () => {
|
||||
cy.contains('button', 'Edit').first().click();
|
||||
cy.get('#input_name_field').should('exist');
|
||||
cy.contains('button', 'Save').should('exist');
|
||||
cy.contains('button', 'Cancel').should('exist');
|
||||
it("clicking Edit shows input field and Save/Cancel buttons", () => {
|
||||
cy.contains("button", "Edit").first().click();
|
||||
cy.get("#input_name_field").should("exist");
|
||||
cy.contains("button", "Save").should("exist");
|
||||
cy.contains("button", "Cancel").should("exist");
|
||||
});
|
||||
|
||||
it('clicking Cancel reverts name field to read-only', () => {
|
||||
cy.contains('button', 'Edit').first().click();
|
||||
cy.get('#input_name_field').should('exist');
|
||||
cy.contains('button', 'Cancel').click();
|
||||
cy.get('#input_name_field').should('not.exist');
|
||||
it("clicking Cancel reverts name field to read-only", () => {
|
||||
cy.contains("button", "Edit").first().click();
|
||||
cy.get("#input_name_field").should("exist");
|
||||
cy.contains("button", "Cancel").click();
|
||||
cy.get("#input_name_field").should("not.exist");
|
||||
});
|
||||
|
||||
it('shows Reset button for password field', () => {
|
||||
cy.contains('button', 'Reset').should('exist');
|
||||
it("shows Reset button for password field", () => {
|
||||
cy.contains("button", "Reset").should("exist");
|
||||
});
|
||||
|
||||
it('clicking Reset shows password input and Save/Cancel', () => {
|
||||
cy.contains('button', 'Reset').click();
|
||||
cy.get('input[type="password"]').should('exist');
|
||||
cy.contains('button', 'Save').should('exist');
|
||||
cy.contains('button', 'Cancel').should('exist');
|
||||
it("clicking Reset shows password input and Save/Cancel", () => {
|
||||
cy.contains("button", "Reset").click();
|
||||
cy.get('input[type="password"]').should("exist");
|
||||
cy.contains("button", "Save").should("exist");
|
||||
cy.contains("button", "Cancel").should("exist");
|
||||
});
|
||||
|
||||
it('clicking Cancel on password field hides the input', () => {
|
||||
cy.contains('button', 'Reset').click();
|
||||
cy.get('input[type="password"]').should('exist');
|
||||
it("clicking Cancel on password field hides the input", () => {
|
||||
cy.contains("button", "Reset").click();
|
||||
cy.get('input[type="password"]').should("exist");
|
||||
// The Cancel button for password is the second one
|
||||
cy.get('.cancel-btn').click();
|
||||
cy.get('input[type="password"]').should('not.exist');
|
||||
cy.get(".cancel-btn").click();
|
||||
cy.get('input[type="password"]').should("not.exist");
|
||||
});
|
||||
|
||||
it('shows Session section', () => {
|
||||
cy.contains('Session').should('exist');
|
||||
it("shows Session section", () => {
|
||||
cy.contains("Session").should("exist");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user