Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
EmmaLRussell committed Oct 26, 2023
1 parent 577c177 commit af13f4c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion app/static/src/app/store/sessions/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ export const actions: ActionTree<SessionsState, AppState> = {
const sessionIds = localStorageManager.getSessionIds(appName!, rootGetters[AppStateGetter.baseUrlPath]);
const sessionIdsQs = sessionIds.join(",");
const removeDuplicates = !rootState.userPreferences.showDuplicateSessions;
const url = `/${appsPath}/${appName}/sessions/metadata?sessionIds=${sessionIdsQs}&removeDuplicates=${removeDuplicates}`;
const qs = `?sessionIds=${sessionIdsQs}&removeDuplicates=${removeDuplicates}`;
const url = `/${appsPath}/${appName}/sessions/metadata${qs}`;
await api(context)
.withSuccess(SessionsMutation.SetSessionsMetadata)
.withError(`errors/${ErrorsMutation.AddError}`, true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ import { shallowMount } from "@vue/test-utils";
import Vuex from "vuex";
import VueFeather from "vue-feather";
import { RouterLink } from "vue-router";
import { nextTick } from "vue";
import SessionsPage from "../../../../src/app/components/sessions/SessionsPage.vue";
import ErrorsAlert from "../../../../src/app/components/ErrorsAlert.vue";
import { BasicState } from "../../../../src/app/store/basic/state";
import {mockBasicState, mockUserPreferences} from "../../../mocks";
import { mockBasicState, mockUserPreferences } from "../../../mocks";
import { SessionsAction } from "../../../../src/app/store/sessions/actions";
import { SessionMetadata } from "../../../../src/app/types/responseTypes";
import EditSessionLabel from "../../../../src/app/components/sessions/EditSessionLabel.vue";
import ConfirmModal from "../../../../src/app/components/ConfirmModal.vue";
import { AppStateAction } from "../../../../src/app/store/appState/actions";
import {nextTick} from "vue";

describe("SessionsPage", () => {
const mockGetSessions = jest.fn();
Expand Down
2 changes: 1 addition & 1 deletion app/static/tests/unit/localStorageManager.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { localStorageManager } from "../../src/app/localStorageManager";
import {mockUserPreferences} from "../mocks";
import { mockUserPreferences } from "../mocks";

describe("localStorageManager for sessions", () => {
let spyOnGetItem: any;
Expand Down
4 changes: 2 additions & 2 deletions app/static/tests/unit/store/sessions/actions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ describe("SessionsActions", () => {
const url = "/apps/test-app/sessions/metadata?sessionIds=123,456&removeDuplicates=true";
mockAxios.onGet(url).reply(200, mockSuccess(metadata));

const userPreferences = {...mockUserPreferences(), showDuplicateSessions: false};
const userPreferences = { ...mockUserPreferences(), showDuplicateSessions: false };
const rootState = mockBasicState({ appName: "test-app", appsPath: "apps", userPreferences });
const commit = jest.fn();
await (actions[SessionsAction.GetSessions] as any)({ commit, rootState, rootGetters });
Expand All @@ -242,7 +242,7 @@ describe("SessionsActions", () => {
const url = "/apps/test-app/sessions/metadata?sessionIds=123,456&removeDuplicates=false";
mockAxios.onGet(url).reply(200, mockSuccess([]));

const userPreferences = {...mockUserPreferences(), showDuplicateSessions: true};
const userPreferences = { ...mockUserPreferences(), showDuplicateSessions: true };
const rootState = mockBasicState({ appName: "test-app", appsPath: "apps", userPreferences });
const commit = jest.fn();
await (actions[SessionsAction.GetSessions] as any)({ commit, rootState, rootGetters });
Expand Down

0 comments on commit af13f4c

Please sign in to comment.