mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-10 18:10:08 +00:00
Fix broken user tests (#21)
This commit is contained in:
@@ -25,8 +25,6 @@ describe("users", () => {
|
||||
}
|
||||
|
||||
async function waitForUserScreenShow() {
|
||||
await mockAddStylesheet();
|
||||
|
||||
// Wait for "show" to be called
|
||||
const { UserSelectionScreen } = await import("../../src/scripts/ui/userSelection");
|
||||
let resolve, reject;
|
||||
@@ -54,6 +52,7 @@ describe("users", () => {
|
||||
const starting = start({
|
||||
resetEnv: true,
|
||||
userConfig: { storage: "server", users },
|
||||
preSetup: mockAddStylesheet,
|
||||
});
|
||||
|
||||
// Ensure no current user
|
||||
@@ -99,7 +98,7 @@ describe("users", () => {
|
||||
return { users, selection, ...s };
|
||||
}
|
||||
|
||||
it.skip("Fail after ts test migration. allows user creation if no users", async () => {
|
||||
it("allows user creation if no users", async () => {
|
||||
const { users } = await testUserScreen((selection) => {
|
||||
// Ensure we have no users flag added
|
||||
expect(selection.classList.contains("no-users")).toBeTruthy();
|
||||
@@ -119,7 +118,7 @@ describe("users", () => {
|
||||
expect(localStorage["Comfy.userId"]).toBe("Test User!");
|
||||
expect(localStorage["Comfy.userName"]).toBe("Test User");
|
||||
});
|
||||
it.skip("Fail after ts test migration. allows user creation if no current user but other users", async () => {
|
||||
it("allows user creation if no current user but other users", async () => {
|
||||
const users = {
|
||||
"Test User 2!": "Test User 2",
|
||||
};
|
||||
@@ -142,7 +141,7 @@ describe("users", () => {
|
||||
expect(localStorage["Comfy.userId"]).toBe("Test User 3!");
|
||||
expect(localStorage["Comfy.userName"]).toBe("Test User 3");
|
||||
});
|
||||
it.skip("Fail after ts test migration. allows user selection if no current user but other users", async () => {
|
||||
it("allows user selection if no current user but other users", async () => {
|
||||
const users = {
|
||||
"A!": "A",
|
||||
"B!": "B",
|
||||
|
||||
Reference in New Issue
Block a user