fix: 校正一次性密码展示与 CSV 下载
This commit is contained in:
@@ -69,4 +69,28 @@ describe("EndpointsView 开通端", () => {
|
||||
expect(w.text()).not.toContain("只显示一次");
|
||||
w.unmount();
|
||||
});
|
||||
|
||||
it("手填密码开通后不显示一次性面板和 undefined", async () => {
|
||||
const pinia = createPinia();
|
||||
const w = mount(wrap(EndpointsView), {
|
||||
global: { plugins: [pinia] },
|
||||
attachTo: document.body,
|
||||
});
|
||||
await flushPromises();
|
||||
|
||||
const openBtn = w.findAll("button").find((b) => b.text().trim() === "开通");
|
||||
await openBtn!.trigger("click");
|
||||
await nextTick();
|
||||
await flushPromises();
|
||||
|
||||
await w.find('[data-testid="create-name"]').find("input").setValue("手填端");
|
||||
await w.find('[data-testid="create-login-password"]').find("input").setValue("handpassword12");
|
||||
await w.find('[data-testid="create-submit"]').trigger("click");
|
||||
await flushPromises();
|
||||
|
||||
expect(w.text()).not.toContain("undefined");
|
||||
expect(w.text()).not.toContain("只显示一次");
|
||||
expect(w.text()).toContain("手填端");
|
||||
w.unmount();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user