Replace hard-coded test passwords with crypto.randomUUID() (S2068)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-10 09:51:34 +08:00
parent 30ea7711ce
commit fe8a1e8a00
2 changed files with 7 additions and 5 deletions

View File

@@ -59,7 +59,7 @@ describe("Login", () => {
const wrapper = mountLogin();
const store = useLoginStore();
store.auth.username = "user";
store.auth.password = "pass";
store.auth.password = crypto.randomUUID();
await wrapper.vm.$nextTick();
const btn = wrapper.find("#login_btn_main_btn");
expect(btn.attributes("disabled")).toBeUndefined();
@@ -76,7 +76,7 @@ describe("Login", () => {
it("toggles password visibility", async () => {
const wrapper = mountLogin();
const store = useLoginStore();
store.auth.password = "secret";
store.auth.password = crypto.randomUUID();
await wrapper.vm.$nextTick();
const pwdInput = wrapper.find("#password");