fix: unit test vv -> vv-de vv-it vv-fr
This commit is contained in:
parent
bf1353553b
commit
213c70691a
|
|
@ -49,14 +49,21 @@ describe("Onboarding", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it("VV: redirect to profile next route for logged-in user with organisation", () => {
|
it("VV: redirect to profile next route for logged-in user with organisation", () => {
|
||||||
const user = useUserStore();
|
const testCases = ["vv-de", "vv-it", "vv-fr"];
|
||||||
user.loggedIn = true;
|
testCases.forEach((testCase) => {
|
||||||
user.organisation = 1;
|
const user = useUserStore();
|
||||||
const mockNext = vi.fn();
|
user.loggedIn = true;
|
||||||
onboardingRedirect(routeLocation("accountProfile", "vv"), START_LOCATION, mockNext);
|
user.organisation = 1;
|
||||||
expect(mockNext).toHaveBeenCalledWith({
|
const mockNext = vi.fn();
|
||||||
name: "checkoutAddress",
|
onboardingRedirect(
|
||||||
params: { courseType: "vv" },
|
routeLocation("accountProfile", testCase),
|
||||||
|
START_LOCATION,
|
||||||
|
mockNext
|
||||||
|
);
|
||||||
|
expect(mockNext).toHaveBeenCalledWith({
|
||||||
|
name: "checkoutAddress",
|
||||||
|
params: { courseType: testCase },
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue