Skip to content

Commit

Permalink
✔️: refactor WorkflowInvocationHeader unit test to use fake registe…
Browse files Browse the repository at this point in the history
…red user
  • Loading branch information
itisAliRH committed Oct 9, 2024
1 parent 0084a63 commit e70109f
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { createTestingPinia } from "@pinia/testing";
import { getFakeRegisteredUser } from "@tests/test-data";
import { shallowMount } from "@vue/test-utils";
import flushPromises from "flush-promises";
import { getLocalVue } from "tests/jest/helpers";
Expand Down Expand Up @@ -81,14 +82,9 @@ async function mountWorkflowInvocationHeader(ownsWorkflow = true, hasReturnBtn =
});

const userStore = useUserStore();
userStore.currentUser = {
id: "1",
email: "[email protected]",
tags_used: [],
isAnonymous: false,
total_disk_usage: 0,
userStore.currentUser = getFakeRegisteredUser({
username: ownsWorkflow ? WORKFLOW_OWNER : OTHER_USER,
};
});

return { wrapper };
}
Expand Down

0 comments on commit e70109f

Please sign in to comment.