Skip to content

Commit 9ba2c68

Browse files
committed
Update app index in testing
1 parent 73f4610 commit 9ba2c68

File tree

3 files changed

+27
-3
lines changed

3 files changed

+27
-3
lines changed

client/src/entry/analysis/modules/Login.test.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,19 @@ import Login from "./Login.vue";
1010

1111
const localVue = getLocalVue(true);
1212

13-
vi.mock("@/app", () => ({
13+
const configMock = {
14+
allow_local_account_creation: true,
15+
enable_oidc: true,
16+
mailing_join_addr: "mailing_join_addr",
17+
prefer_custos_login: true,
18+
registration_warning_message: "registration_warning_message",
19+
server_mail_configured: true,
20+
show_welcome_with_login: true,
21+
terms_url: "terms_url",
22+
welcome_url: "welcome_url",
23+
};
24+
25+
vi.mock("@/app/index", () => ({
1426
getGalaxyInstance: vi.fn(() => ({ session_csrf_token: "session_csrf_token" })),
1527
}));
1628

client/src/entry/analysis/modules/Register.test.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,19 @@ import RegisterForm from "@/components/Register/RegisterForm.vue";
1010

1111
const localVue = getLocalVue(true);
1212

13-
vi.mock("@/app/singleton", () => ({
13+
const configMock = {
14+
allow_local_account_creation: true,
15+
enable_oidc: true,
16+
mailing_join_addr: "mailing_join_addr",
17+
prefer_custos_login: true,
18+
registration_warning_message: "registration_warning_message",
19+
server_mail_configured: true,
20+
show_welcome_with_login: true,
21+
terms_url: "terms_url",
22+
welcome_url: "welcome_url",
23+
};
24+
25+
vi.mock("@/app/index", () => ({
1426
getGalaxyInstance: vi.fn(() => ({ session_csrf_token: "session_csrf_token" })),
1527
}));
1628

client/src/entry/analysis/router-push.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const { mockGalaxy } = vi.hoisted(() => ({
1212
},
1313
}));
1414

15-
vi.mock("@/app", () => ({
15+
vi.mock("@/app/index", () => ({
1616
getGalaxyInstance: vi.fn(() => mockGalaxy),
1717
}));
1818

0 commit comments

Comments
 (0)