Skip to content

Commit

Permalink
Adapt History SelectorModal test
Browse files Browse the repository at this point in the history
  • Loading branch information
davelopez committed May 28, 2024
1 parent 6f38f5b commit 9d662f5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions client/src/components/History/Modals/SelectorModal.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import { createPinia } from "pinia";
import { useHistoryStore } from "stores/historyStore";
import { getLocalVue } from "tests/jest/helpers";

import { useUserStore } from "@/stores/userStore";

import SelectorModal from "./SelectorModal";

const localVue = getLocalVue();
Expand Down Expand Up @@ -35,6 +37,14 @@ const PROPS_FOR_MODAL_MULTIPLE_SELECT = {

const CURRENT_HISTORY_INDICATION_TEXT = "(Current)";

const CURRENT_USER = {
email: "email",
id: "user_id",
tags_used: [],
isAnonymous: false,
total_disk_usage: 0,
};

describe("History SelectorModal.vue", () => {
let wrapper;
let axiosMock;
Expand All @@ -60,6 +70,10 @@ describe("History SelectorModal.vue", () => {
icon: { template: "<div></div>" },
},
});

const userStore = useUserStore();
userStore.setCurrentUser(CURRENT_USER);

historyStore = useHistoryStore();
axiosMock = new MockAdapter(axios);
getUpdatedAxiosMock();
Expand Down

0 comments on commit 9d662f5

Please sign in to comment.