Skip to content

Commit

Permalink
Merge pull request #3080 from ONSdigital/ear-2288-new-theme
Browse files Browse the repository at this point in the history
Replace health theme with ukhsa-ons
  • Loading branch information
Paul-Joel authored Oct 13, 2023
2 parents 37c7bcd + e37247f commit 564fb4d
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 5 deletions.
2 changes: 1 addition & 1 deletion eq-author-api/constants/themes.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const THEME_SHORT_NAMES = [
"dbt-dsit",
"dbt-dsit-ni",
"social",
"health",
"ukhsa-ons",
"desnz",
"desnz-ni",
];
Expand Down
1 change: 1 addition & 0 deletions eq-author-api/migrations/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const migrations = [
require("./addValidationToListCollectorAnswers"),
require("./addFieldsToListCollectorFolderContents"),
require("./addAdditonalContentsToAddItemPage"),
require("./updateHealthThemeToPandemicMonitoring"),
];

const currentVersion = migrations.length;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = (questionnaire) => {
if (questionnaire.theme === "health") {
questionnaire.theme = "ukhsa-ons";
}
return questionnaire;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const updateHealthThemeToPandemicMonitoring = require("./updateHealthThemeToPandemicMonitoring");

describe("updateHealthTheme", () => {
it("should update health theme", () => {
const questionnaire = {
theme: "health",
};

const updatedQuestionnaire =
updateHealthThemeToPandemicMonitoring(questionnaire);
expect(updatedQuestionnaire.theme).toBe("ukhsa-ons");
});
});
2 changes: 1 addition & 1 deletion eq-author-api/schema/resolvers/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,7 @@ const Resolvers = {
"Northern Ireland": "northernireland",
Business: "business",
Social: "social",
Health: "health",
"Pandemic monitoring": "ukhsa-ons",
"UKIS Northern Ireland": "ukis_ni",
"UKIS ONS": "ukis",
};
Expand Down
6 changes: 3 additions & 3 deletions eq-author/src/constants/themes.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ const THEMES = [
"Header includes the Office for National Statistics logo but does not include the links for 'Help', 'My account' or 'Sign out'",
},
{
id: "health",
title: "Health",
id: "ukhsa-ons",
title: "Pandemic monitoring",
description:
"Header includes the Office for National Statistics logo but does not include the links for 'Help', 'My account' or 'Sign out'",
"Header includes the logos for Office for National Statistics and UK Health and Security Agency but does not include the links for Help’, ‘My account or Sign out",
},
{
id: "dbt",
Expand Down

0 comments on commit 564fb4d

Please sign in to comment.