mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-11-04 23:43:20 +08:00
Fixup server mocking in NotificationForm.test.ts.
The previous mock was not actually preventing that initial fetch against the API to get an openapi schema.
This commit is contained in:
@@ -5,9 +5,13 @@ import flushPromises from "flush-promises";
|
||||
import { setActivePinia } from "pinia";
|
||||
import type Vue from "vue";
|
||||
|
||||
import { useServerMock } from "@/api/client/__mocks__";
|
||||
|
||||
import NotificationForm from "./NotificationForm.vue";
|
||||
|
||||
jest.mock("@/api/schema");
|
||||
// Even though we don't use the API endpoints, this seems to prevent failure fetching
|
||||
// openapi during jest testing.
|
||||
useServerMock();
|
||||
|
||||
const SUBMIT_BUTTON_SELECTOR = "#notification-submit";
|
||||
|
||||
@@ -46,5 +50,7 @@ describe("NotificationForm.vue", () => {
|
||||
const { wrapper } = await mountNotificationForm();
|
||||
|
||||
expectSubmitButton(wrapper, false);
|
||||
|
||||
await flushPromises();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user