From e70109fc073bdd5c7d2376f91ce262e5f27c986f Mon Sep 17 00:00:00 2001 From: Alireza Heidari Date: Wed, 9 Oct 2024 15:15:36 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=94=EF=B8=8F:=20refactor=20`WorkflowInvoc?= =?UTF-8?q?ationHeader`=20unit=20=20test=20to=20use=20fake=20registered=20?= =?UTF-8?q?user?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WorkflowInvocationHeader.test.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/client/src/components/WorkflowInvocationState/WorkflowInvocationHeader.test.ts b/client/src/components/WorkflowInvocationState/WorkflowInvocationHeader.test.ts index f6308952b587..6964145c03b6 100644 --- a/client/src/components/WorkflowInvocationState/WorkflowInvocationHeader.test.ts +++ b/client/src/components/WorkflowInvocationState/WorkflowInvocationHeader.test.ts @@ -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"; @@ -81,14 +82,9 @@ async function mountWorkflowInvocationHeader(ownsWorkflow = true, hasReturnBtn = }); const userStore = useUserStore(); - userStore.currentUser = { - id: "1", - email: "test@mail.test", - tags_used: [], - isAnonymous: false, - total_disk_usage: 0, + userStore.currentUser = getFakeRegisteredUser({ username: ownsWorkflow ? WORKFLOW_OWNER : OTHER_USER, - }; + }); return { wrapper }; }