diff --git a/solution/backend/regulations/templates/regulations/partials/header.html b/solution/backend/regulations/templates/regulations/partials/header.html
index 911067cebb..a04bcbe6b5 100644
--- a/solution/backend/regulations/templates/regulations/partials/header.html
+++ b/solution/backend/regulations/templates/regulations/partials/header.html
@@ -9,9 +9,8 @@
>
-
-{% endblock %}
-
-{% block blocking_modal %}{% endblock %}
-
-{% block flash_banner %}{% endblock %}
-
-{% block pre_header %}
- Skip to main content
-{% endblock %}
-
-{% block body %}
-
-{% endblock %}
diff --git a/solution/backend/regulations/templates/regulations/resources.html b/solution/backend/regulations/templates/regulations/resources.html
index a8280f517e..1b58d5f343 100644
--- a/solution/backend/regulations/templates/regulations/resources.html
+++ b/solution/backend/regulations/templates/regulations/resources.html
@@ -22,9 +22,9 @@
data-about-url="{% url 'about' %}"
data-custom-url="{{ CUSTOM_URL }}"
data-home-url="{% url 'homepage' %}"
- data-resources-url="{% url 'resources' %}"
data-search-url="{% url 'search' %}"
data-host="{{ host }}"
data-statutes-url="{% url 'statutes' %}"
+ data-subjects-url="{% url 'subjects' %}"
>
{% endblock %}
diff --git a/solution/backend/regulations/templates/regulations/search.html b/solution/backend/regulations/templates/regulations/search.html
index 4a4c1507da..c8886076ce 100644
--- a/solution/backend/regulations/templates/regulations/search.html
+++ b/solution/backend/regulations/templates/regulations/search.html
@@ -24,9 +24,9 @@
data-about-url="{% url 'about' %}"
data-custom-url="{{ CUSTOM_URL }}"
data-home-url="{% url 'homepage' %}"
- data-resources-url="{% url 'resources' %}"
data-search-url="{% url 'search' %}"
data-host="{{ host }}"
data-statutes-url="{% url 'statutes' %}"
+ data-subjects-url="{% url 'subjects' %}"
>
{% endblock %}
diff --git a/solution/backend/regulations/templates/regulations/statute.html b/solution/backend/regulations/templates/regulations/statute.html
index 19b90948da..f79fb00cdd 100644
--- a/solution/backend/regulations/templates/regulations/statute.html
+++ b/solution/backend/regulations/templates/regulations/statute.html
@@ -25,8 +25,8 @@
data-about-url="{% url 'about' %}"
data-custom-url="{{ CUSTOM_URL }}"
data-home-url="{% url 'homepage' %}"
- data-resources-url="{% url 'resources' %}"
data-search-url="{% url 'search' %}"
+ data-subjects-url="{% url 'subjects' %}"
data-host="{{ host }}"
>
{% endblock %}
diff --git a/solution/backend/regulations/templates/regulations/subjects.html b/solution/backend/regulations/templates/regulations/subjects.html
index 3bce681649..ec322bd924 100644
--- a/solution/backend/regulations/templates/regulations/subjects.html
+++ b/solution/backend/regulations/templates/regulations/subjects.html
@@ -25,9 +25,9 @@
data-custom-login-url="{% url 'custom_login' %}"
data-custom-url="{{ CUSTOM_URL }}"
data-home-url="{% url 'homepage' %}"
- data-resources-url="{% url 'resources' %}"
data-search-url="{% url 'search' %}"
data-statutes-url="{% url 'statutes' %}"
+ data-subjects-url="{% url 'subjects' %}"
data-host="{{ host }}"
data-is-authenticated="{{ is_authenticated }}"
data-has-editable-job-code="{{ has_editable_job_code }}"
diff --git a/solution/ui/e2e/cypress/e2e/about-page.spec.cy.js b/solution/ui/e2e/cypress/e2e/about-page.spec.cy.js
index 21b2e3f795..f8ae4e329a 100644
--- a/solution/ui/e2e/cypress/e2e/about-page.spec.cy.js
+++ b/solution/ui/e2e/cypress/e2e/about-page.spec.cy.js
@@ -11,4 +11,15 @@ describe("About page", { scrollBehavior: "center" }, () => {
cy.visit("/about/");
cy.checkLinkRel();
});
+
+ it("goes to the Subjects page using header link", () => {
+ cy.viewport("macbook-15");
+ cy.visit("/about/");
+ cy.clickHeaderLink({
+ page: "subjects",
+ label: "Find by Subject",
+ screen: "wide",
+ });
+ cy.url().should("include", "/subjects");
+ });
});
diff --git a/solution/ui/e2e/cypress/e2e/error-page.cy.js b/solution/ui/e2e/cypress/e2e/error-page.cy.js
index e85a4b0f1a..d1f56126ed 100644
--- a/solution/ui/e2e/cypress/e2e/error-page.cy.js
+++ b/solution/ui/e2e/cypress/e2e/error-page.cy.js
@@ -65,6 +65,17 @@ describe("Error page", { scrollBehavior: "center" }, () => {
});
});
+ it("error-page - goes to the Subjects page using header link", () => {
+ cy.viewport("macbook-15");
+ cy.visit("/about/");
+ cy.clickHeaderLink({
+ page: "subjects",
+ label: "Find by Subject",
+ screen: "wide",
+ });
+ cy.url().should("include", "/subjects");
+ });
+
it("allows a user to go back to the homepage by clicking the top left link", () => {
cy.viewport("macbook-15");
cy.request({ url: "/404", failOnStatusCode: false })
diff --git a/solution/ui/e2e/cypress/e2e/resources.spec.cy.js b/solution/ui/e2e/cypress/e2e/resources.spec.cy.js
index acc08a72e1..fc19fad0e6 100644
--- a/solution/ui/e2e/cypress/e2e/resources.spec.cy.js
+++ b/solution/ui/e2e/cypress/e2e/resources.spec.cy.js
@@ -10,24 +10,14 @@ describe("Resources page", () => {
});
});
- it("goes to resources page from homepage", () => {
- cy.viewport("macbook-15");
- cy.visit("/");
- cy.clickHeaderLink({ page: "Resources", screen: "wide" });
- cy.url().should("include", "/resources");
- });
-
- it("resources link nested in a dropdown menu on narrow screen widths", () => {
- cy.viewport("iphone-x");
- cy.visit("/");
- cy.clickHeaderLink({ page: "Resources", screen: "narrow" });
- cy.url().should("include", "/resources");
- });
-
it("goes to another SPA page from the resources page", () => {
cy.viewport("macbook-15");
cy.visit("/resources");
- cy.clickHeaderLink({ page: "Statutes", screen: "wide" });
+ cy.clickHeaderLink({
+ page: "statutes",
+ label: "Statutes",
+ screen: "wide",
+ });
cy.url().should("include", "/statutes");
});
});
@@ -82,10 +72,10 @@ describe("Resources page", () => {
it("does not filter locations on the search", () => {
cy.viewport("macbook-15");
cy.visit("/resources");
- cy.wait("@resources").then( (interception) => {
- expect(interception.request.url).to.not.contain( 'location=')
+ cy.wait("@resources").then((interception) => {
+ expect(interception.request.url).to.not.contain("location=");
});
- })
+ });
it("renders correctly", () => {
cy.viewport("macbook-15");
@@ -156,7 +146,10 @@ describe("Resources page", () => {
cy.viewport("macbook-15");
cy.visit("/resources");
cy.injectAxe();
- cy.get("button#select-resource-categories").should("not.have.attr", "disabled");
+ cy.get("button#select-resource-categories").should(
+ "not.have.attr",
+ "disabled"
+ );
cy.get("#select-resource-categories").click({
force: true,
});
diff --git a/solution/ui/e2e/cypress/e2e/statutes.spec.cy.js b/solution/ui/e2e/cypress/e2e/statutes.spec.cy.js
index e325b0bb56..d467594d88 100644
--- a/solution/ui/e2e/cypress/e2e/statutes.spec.cy.js
+++ b/solution/ui/e2e/cypress/e2e/statutes.spec.cy.js
@@ -16,7 +16,11 @@ describe("Statute Table", () => {
it("goes to statutes page from homepage and has SSA Title 19 selected by default", () => {
cy.viewport("macbook-15");
cy.visit("/");
- cy.clickHeaderLink({ page: "Statutes", screen: "wide" });
+ cy.clickHeaderLink({
+ page: "statutes",
+ label: "Statutes",
+ screen: "wide",
+ });
cy.url().should("include", "/statutes/");
cy.get("h1").contains("Statute Reference");
@@ -55,7 +59,11 @@ describe("Statute Table", () => {
it("statutes link nested in a dropdown menu on mobile screen widths", () => {
cy.viewport("iphone-x");
cy.visit("/");
- cy.clickHeaderLink({ page: "Statutes", screen: "narrow" });
+ cy.clickHeaderLink({
+ page: "statutes",
+ label: "Statutes",
+ screen: "narrow",
+ });
cy.url().should("include", "/statutes/");
});
@@ -73,7 +81,11 @@ describe("Statute Table", () => {
it("goes to another SPA page from the statutes page", () => {
cy.viewport("macbook-15");
cy.visit("/statutes");
- cy.clickHeaderLink({ page: "Resources", screen: "wide" });
- cy.url().should("include", "/resources");
+ cy.clickHeaderLink({
+ page: "subjects",
+ label: "Find by Subject",
+ screen: "wide",
+ });
+ cy.url().should("include", "/subjects");
});
});
diff --git a/solution/ui/e2e/cypress/e2e/subjects.spec.cy.js b/solution/ui/e2e/cypress/e2e/subjects.spec.cy.js
index 7a8ff2c0ad..8eddc843f1 100644
--- a/solution/ui/e2e/cypress/e2e/subjects.spec.cy.js
+++ b/solution/ui/e2e/cypress/e2e/subjects.spec.cy.js
@@ -595,7 +595,7 @@ describe("Find by Subjects", () => {
});
});
- it("goes to another SPA page from the policy repository page", () => {
+ it("goes to another SPA page from the subjects page", () => {
cy.viewport("macbook-15");
cy.eregsLogin({
username,
@@ -603,8 +603,8 @@ describe("Find by Subjects", () => {
landingPage: "/subjects/",
});
cy.visit("/subjects");
- cy.clickHeaderLink({ page: "Resources", screen: "wide" });
- cy.url().should("include", "/resources");
+ cy.clickHeaderLink({ page: "statutes", label: "Statutes", screen: "wide" });
+ cy.url().should("include", "/statutes");
});
it("should have the correct labels for public and internal documents", () => {
diff --git a/solution/ui/e2e/cypress/support/common-commands/header.js b/solution/ui/e2e/cypress/support/common-commands/header.js
index 8ae84bfbfc..a6bfdb7bfe 100644
--- a/solution/ui/e2e/cypress/support/common-commands/header.js
+++ b/solution/ui/e2e/cypress/support/common-commands/header.js
@@ -46,7 +46,11 @@ export const goHome = () => {
cy.url().should("eq", Cypress.config().baseUrl + "/");
};
-export const clickHeaderLink = ({ page = "Resources", screen = "wide" }) => {
+export const clickHeaderLink = ({
+ page = "statutes",
+ label = "Statutes",
+ screen = "wide",
+}) => {
const listLocation =
screen === "wide"
? "header .header--links .links--container"
@@ -68,7 +72,7 @@ export const clickHeaderLink = ({ page = "Resources", screen = "wide" }) => {
`${listLocation} > ul.links__list li a[data-testid=${page.toLowerCase()}]`
)
.should("be.visible")
- .should("have.text", page)
+ .should("have.text", label)
.click({ force: true });
// styled as selected
@@ -76,7 +80,7 @@ export const clickHeaderLink = ({ page = "Resources", screen = "wide" }) => {
`${listLocation} > ul.links__list li a[data-testid=${page.toLowerCase()}]`
)
.should("be.visible")
- .should("have.text", page)
+ .should("have.text", label)
.should("have.attr", "class")
.and("match", /active/);
} else {
@@ -90,9 +94,11 @@ export const clickHeaderLink = ({ page = "Resources", screen = "wide" }) => {
cy.get(".more--dropdown-menu").should("be.visible");
- cy.get(`${listLocation} > ul.links__list li a[data-testid=${page.toLowerCase()}]`)
+ cy.get(
+ `${listLocation} > ul.links__list li a[data-testid=${page.toLowerCase()}]`
+ )
.should("be.visible")
- .should("have.text", page)
+ .should("have.text", label)
.click({ force: true });
}
};
diff --git a/solution/ui/regulations/eregs-vite/src/App.vue b/solution/ui/regulations/eregs-vite/src/App.vue
index ace9aba74b..d78014100d 100644
--- a/solution/ui/regulations/eregs-vite/src/App.vue
+++ b/solution/ui/regulations/eregs-vite/src/App.vue
@@ -25,15 +25,15 @@ export default {
type: String,
default: "",
},
- resourcesUrl: {
+ searchUrl: {
type: String,
default: "",
},
- searchUrl: {
+ statutesUrl: {
type: String,
default: "",
},
- statutesUrl: {
+ subjectsUrl: {
type: String,
default: "",
},
@@ -61,9 +61,9 @@ export default {
:custom-login-url="customLoginUrl"
:custom-url="customUrl"
:home-url="homeUrl"
- :resources-url="resourcesUrl"
:search-url="searchUrl"
:statutes-url="statutesUrl"
+ :subjects-url="subjectsUrl"
:host="host"
:is-authenticated="isAuthenticated === 'True'"
:has-editable-job-code="hasEditableJobCode === 'True'"
diff --git a/solution/ui/regulations/eregs-vite/src/components/header/HeaderLinks.vue b/solution/ui/regulations/eregs-vite/src/components/header/HeaderLinks.vue
index e125259496..2fdd5994bd 100644
--- a/solution/ui/regulations/eregs-vite/src/components/header/HeaderLinks.vue
+++ b/solution/ui/regulations/eregs-vite/src/components/header/HeaderLinks.vue
@@ -5,15 +5,11 @@ import HeaderChevronUp from "../svgs/header-chevron-up.vue";
import HeaderChevronDown from "../svgs/header-chevron-down.vue";
const props = defineProps({
- aboutUrl: {
+ statutesUrl: {
type: String,
required: true,
},
- resourcesUrl: {
- type: String,
- required: true,
- },
- statutesUrl: {
+ subjectsUrl: {
type: String,
required: true,
},
@@ -27,16 +23,10 @@ const links = [
href: props.statutesUrl,
},
{
- name: "resources",
- label: "Resources",
- active: window.location.pathname.includes("resources"),
- href: props.resourcesUrl,
- },
- {
- name: "about",
- label: "About",
- active: window.location.pathname.includes("about"),
- href: props.aboutUrl,
+ name: "subjects",
+ label: "Find by Subject",
+ active: window.location.pathname.includes("subjects"),
+ href: props.subjectsUrl,
},
];
diff --git a/solution/ui/regulations/eregs-vite/src/router/index.js b/solution/ui/regulations/eregs-vite/src/router/index.js
index 908f21ad0a..c44bad68de 100644
--- a/solution/ui/regulations/eregs-vite/src/router/index.js
+++ b/solution/ui/regulations/eregs-vite/src/router/index.js
@@ -1,10 +1,10 @@
import Vue from "vue";
import VueRouter from "vue-router";
import CacheExplorer from "../views/CacheExplorer.vue";
-import Subjects from "../views/Subjects.vue";
import Resources from "../views/Resources.vue";
import Search from "../views/Search.vue";
import Statutes from "../views/Statutes.vue";
+import Subjects from "../views/Subjects.vue";
Vue.use(VueRouter);
@@ -14,11 +14,6 @@ const routes = [
name: "cache",
component: CacheExplorer,
},
- {
- path: "/subjects",
- name: "subjects",
- component: Subjects,
- },
{
path: "/resources",
name: "resources",
@@ -34,6 +29,11 @@ const routes = [
name: "statutes",
component: Statutes,
},
+ {
+ path: "/subjects",
+ name: "subjects",
+ component: Subjects,
+ },
];
const router = ({ customUrl = "", host = "" }) =>
diff --git a/solution/ui/regulations/eregs-vite/src/views/Resources.vue b/solution/ui/regulations/eregs-vite/src/views/Resources.vue
index ff82a25fb5..8f6be5e305 100644
--- a/solution/ui/regulations/eregs-vite/src/views/Resources.vue
+++ b/solution/ui/regulations/eregs-vite/src/views/Resources.vue
@@ -14,9 +14,8 @@
@@ -208,10 +207,6 @@ export default {
type: String,
default: "/",
},
- resourcesUrl: {
- type: String,
- default: "/resources/",
- },
searchUrl: {
type: String,
default: "/search/",
@@ -220,6 +215,10 @@ export default {
type: String,
default: "/statutes/",
},
+ subjectsUrl: {
+ type: String,
+ default: "/subjects/",
+ },
},
data() {
diff --git a/solution/ui/regulations/eregs-vite/src/views/Search.vue b/solution/ui/regulations/eregs-vite/src/views/Search.vue
index 320d59e58a..3351030b76 100644
--- a/solution/ui/regulations/eregs-vite/src/views/Search.vue
+++ b/solution/ui/regulations/eregs-vite/src/views/Search.vue
@@ -14,9 +14,8 @@
@@ -204,10 +203,6 @@ export default {
type: String,
default: "/",
},
- resourcesUrl: {
- type: String,
- default: "/resources/",
- },
searchUrl: {
type: String,
default: "/search/",
@@ -216,6 +211,10 @@ export default {
type: String,
default: "/statutes/",
},
+ subjectsUrl: {
+ type: String,
+ default: "/subjects/",
+ },
},
provide() {
diff --git a/solution/ui/regulations/eregs-vite/src/views/Statutes.vue b/solution/ui/regulations/eregs-vite/src/views/Statutes.vue
index 69b688c1c4..b157e55fd0 100644
--- a/solution/ui/regulations/eregs-vite/src/views/Statutes.vue
+++ b/solution/ui/regulations/eregs-vite/src/views/Statutes.vue
@@ -33,14 +33,14 @@ const props = defineProps({
type: String,
default: "/",
},
- resourcesUrl: {
- type: String,
- default: "/resources/",
- },
searchUrl: {
type: String,
default: "/search/",
},
+ subjectsUrl: {
+ type: String,
+ default: "/subjects/",
+ },
});
// get route query params
@@ -169,8 +169,7 @@ getStatutesArray();
diff --git a/solution/ui/regulations/eregs-vite/src/views/Subjects.vue b/solution/ui/regulations/eregs-vite/src/views/Subjects.vue
index 0e5da9aa37..4cbc4cbe8b 100644
--- a/solution/ui/regulations/eregs-vite/src/views/Subjects.vue
+++ b/solution/ui/regulations/eregs-vite/src/views/Subjects.vue
@@ -57,10 +57,6 @@ const props = defineProps({
type: Boolean,
default: false,
},
- resourcesUrl: {
- type: String,
- default: "/resources/",
- },
searchUrl: {
type: String,
default: "/search/",
@@ -69,6 +65,10 @@ const props = defineProps({
type: String,
default: "/statutes/",
},
+ subjectsUrl: {
+ type: String,
+ default: "/subjects/",
+ },
});
// Router and Route
@@ -351,8 +351,6 @@ getDocSubjects();