Cleanup now unused code
This commit is contained in:
parent
0998285fd8
commit
1b5db2c4cf
4 changed files with 0 additions and 60 deletions
|
|
@ -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}`,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
const storeActions = {
|
||||
// Content Actions
|
||||
GET_ROUTE_INFO_ACTION: "getRouteInfo",
|
||||
GET_HOMEPAGE_NAME: "getHomepageName",
|
||||
GET_PAGE_DATA: "getPageData",
|
||||
|
||||
// Vehicle Actions
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue