diff --git a/client/package.json b/client/package.json index 615b3d7216f..dc2efb499da 100644 --- a/client/package.json +++ b/client/package.json @@ -68,6 +68,7 @@ "markdown-it-regexp": "^0.4.0", "object-hash": "^3.0.0", "pinia": "^2.0.23", + "pinia-plugin-persistedstate": "^2.4.0", "popper.js": "^1.16.1", "pretty-bytes": "^6.0.0", "pyre-to-regexp": "^0.0.5", diff --git a/client/src/components/History/Multiple/MultipleView.test.js b/client/src/components/History/Multiple/MultipleView.test.js index 1d68cf1f333..bafaa10556e 100644 --- a/client/src/components/History/Multiple/MultipleView.test.js +++ b/client/src/components/History/Multiple/MultipleView.test.js @@ -1,3 +1,4 @@ +import { createPinia } from "pinia"; import { mount } from "@vue/test-utils"; import flushPromises from "flush-promises"; import { getLocalVue } from "jest/helpers"; @@ -10,6 +11,8 @@ const COUNT = 8; const USER_ID = "test-user-id"; const CURRENT_HISTORY_ID = "test-history-id-0"; +const pinia = createPinia(); + const getFakeHistorySummaries = (num, selectedIndex = 0) => { const result = Array.from({ length: num }, (_, index) => ({ id: `test-history-id-${index}`, @@ -32,6 +35,7 @@ describe("MultipleView", () => { beforeEach(async () => { wrapper = mount(MultipleView, { store, + pinia, stubs: { CurrentUser: CurrentUserMock, UserHistories: UserHistoriesMock, diff --git a/client/src/components/History/Multiple/MultipleViewList.vue b/client/src/components/History/Multiple/MultipleViewList.vue index fb138be6ac3..0876a977761 100644 --- a/client/src/components/History/Multiple/MultipleViewList.vue +++ b/client/src/components/History/Multiple/MultipleViewList.vue @@ -31,9 +31,10 @@