Cleanup now unused code

This commit is contained in:
Chloe Herd 2023-12-18 15:46:46 -05:00
parent 0998285fd8
commit 1b5db2c4cf
4 changed files with 0 additions and 60 deletions

View file

@ -1,14 +1,4 @@
const endpoints = {
GetRouteInfo: {
url: (applicationAbbreviation) =>
`/content/api/v1/content/${applicationAbbreviation}/RouteInfo`,
method: "POST",
},
GetHomepageInfo: {
url: (applicationAbbreviation) =>
`/content/api/v1/content/${applicationAbbreviation}/HomepageInfo`,
method: "GET",
},
GetPageData: {
url: (applicationAbbreviation, pageName) =>
`/content/api/v1/content/${applicationAbbreviation}/${pageName}`,

View file

@ -1,7 +1,5 @@
const storeActions = {
// Content Actions
GET_ROUTE_INFO_ACTION: "getRouteInfo",
GET_HOMEPAGE_NAME: "getHomepageName",
GET_PAGE_DATA: "getPageData",
// Vehicle Actions

View file

@ -956,26 +956,6 @@ export const actions = {
context.commit(storeMutations.RESET_SAVE_SESSION_PROMISE);
},
// Content API Actions
getRouteInfo(context, { pageName }) {
return globalMethods.callHttpClient({
method: endpoints.GetRouteInfo.method,
endpoint: endpoints.GetRouteInfo.url(applicationConfig.APPLICATION_ABBREVIATION),
payload: {
pageName: pageName,
},
logApiCall: true,
pageNameToLog: pageName,
});
},
getHomepageName(context) {
return globalMethods.callHttpClient({
method: endpoints.GetHomepageInfo.method,
endpoint: endpoints.GetHomepageInfo.url(applicationConfig.APPLICATION_ABBREVIATION),
});
},
getPageData(context, { pageName }) {
return globalMethods.callHttpClient({
method: endpoints.GetPageData.method,

View file

@ -659,34 +659,6 @@ describe("Actions", () => {
expect(commit).toBeCalledWith(storeMutations.RESET_STATE);
});
it("getRouteInfo action, returns route info", async () => {
// Arrange
const context = state;
globalMethods.callHttpClient.mockImplementation(() => {
return Promise.resolve({ data: { Widget: "Data" } });
});
// Act
const response = await actions.getRouteInfo(context, "vehicle-year");
expect(response.data).toEqual({ Widget: "Data" });
});
it("getHomepageName action, returns homepage name", async () => {
// Arrange
const context = state;
globalMethods.callHttpClient.mockImplementation(() => {
return Promise.resolve({ data: { Name: "vehicle-year" } });
});
// Act
const response = await actions.getHomepageName(context);
expect(response.data).toEqual({ Name: "vehicle-year" });
});
it("getPageData action, returns page data", async () => {
// Arrange
const context = state;