fix(scholars): improve validation, fix delete, add status badges #48
1 changed files with 5 additions and 0 deletions
|
|
@ -1,6 +1,8 @@
|
||||||
// @vitest-environment happy-dom
|
// @vitest-environment happy-dom
|
||||||
import { describe, expect, it, vi, beforeEach } from "vitest";
|
import { describe, expect, it, vi, beforeEach } from "vitest";
|
||||||
import { mount, flushPromises } from "@vue/test-utils";
|
import { mount, flushPromises } from "@vue/test-utils";
|
||||||
|
import { setActivePinia, createPinia } from "pinia";
|
||||||
|
import { useAuthStore } from "@/stores/auth";
|
||||||
import AdminPdfQueueSection from "./AdminPdfQueueSection.vue";
|
import AdminPdfQueueSection from "./AdminPdfQueueSection.vue";
|
||||||
|
|
||||||
vi.mock("@/features/admin_dbops", () => ({
|
vi.mock("@/features/admin_dbops", () => ({
|
||||||
|
|
@ -36,6 +38,9 @@ function buildQueueItem(overrides: Record<string, unknown> = {}) {
|
||||||
|
|
||||||
describe("AdminPdfQueueSection", () => {
|
describe("AdminPdfQueueSection", () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
setActivePinia(createPinia());
|
||||||
|
const auth = useAuthStore();
|
||||||
|
auth.$patch({ state: "authenticated", user: { id: 1, email: "admin@test.com", is_admin: true, is_active: true } });
|
||||||
mockedListQueue.mockReset();
|
mockedListQueue.mockReset();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue