Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken user tests #21

Merged
merged 1 commit into from
Jun 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions tests-ui/tests/users.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -54,6 +52,7 @@ describe("users", () => {
const starting = start({
resetEnv: true,
userConfig: { storage: "server", users },
preSetup: mockAddStylesheet,
});

// Ensure no current user
Expand Down Expand Up @@ -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();
Expand All @@ -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",
};
Expand All @@ -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",
Expand Down
Loading