Apply repository-wide ESLint auto-fix formatting pass
Co-Authored-By: Codex <codex@openai.com>
This commit is contained in:
@@ -4,39 +4,39 @@
|
||||
// cindy.chang@dsp.im (Cindy Chang), 2024/07/02
|
||||
// imacat.yang@dsp.im (imacat), 2026/03/05
|
||||
|
||||
import { loginWithFixtures } from '../../support/intercept';
|
||||
import { loginWithFixtures } from "../../support/intercept";
|
||||
|
||||
describe('Create an Account', () => {
|
||||
describe("Create an Account", () => {
|
||||
beforeEach(() => {
|
||||
loginWithFixtures();
|
||||
// Override: new usernames should return 404 (account doesn't exist yet)
|
||||
cy.intercept('GET', '/api/users/unit-test-*', {
|
||||
cy.intercept("GET", "/api/users/unit-test-*", {
|
||||
statusCode: 404,
|
||||
body: { detail: 'Not found' },
|
||||
}).as('checkNewUser');
|
||||
cy.visit('/account-admin');
|
||||
cy.wait('@getUsers');
|
||||
body: { detail: "Not found" },
|
||||
}).as("checkNewUser");
|
||||
cy.visit("/account-admin");
|
||||
cy.wait("@getUsers");
|
||||
});
|
||||
|
||||
it('Create a new account with admin role; should show saved message.', () => {
|
||||
cy.contains('button', 'Create New').should('be.visible').click();
|
||||
it("Create a new account with admin role; should show saved message.", () => {
|
||||
cy.contains("button", "Create New").should("be.visible").click();
|
||||
|
||||
cy.get('#input_account_field').type('unit-test-0001');
|
||||
cy.get('#input_name_field').type('unit-test-0001');
|
||||
cy.get('#input_first_pwd').type('aaaaaa');
|
||||
cy.get('.checkbox-and-text').first().find('div').first().click();
|
||||
cy.get("#input_account_field").type("unit-test-0001");
|
||||
cy.get("#input_name_field").type("unit-test-0001");
|
||||
cy.get("#input_first_pwd").type("aaaaaa");
|
||||
cy.get(".checkbox-and-text").first().find("div").first().click();
|
||||
|
||||
cy.contains('button', 'Confirm')
|
||||
.should('be.visible')
|
||||
.and('be.enabled')
|
||||
cy.contains("button", "Confirm")
|
||||
.should("be.visible")
|
||||
.and("be.enabled")
|
||||
.click();
|
||||
cy.wait('@postUser');
|
||||
cy.contains('Account added').should('be.visible');
|
||||
cy.wait("@postUser");
|
||||
cy.contains("Account added").should("be.visible");
|
||||
});
|
||||
|
||||
it('Confirm button is disabled when required fields are empty.', () => {
|
||||
cy.contains('button', 'Create New').should('be.visible').click();
|
||||
cy.get('#input_account_field').type('test');
|
||||
cy.contains('button', 'Confirm').should('be.disabled');
|
||||
it("Confirm button is disabled when required fields are empty.", () => {
|
||||
cy.contains("button", "Create New").should("be.visible").click();
|
||||
cy.get("#input_account_field").type("test");
|
||||
cy.contains("button", "Confirm").should("be.disabled");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user