From 09c46e8b4511e0993d2fe330c813a2ed27966187 Mon Sep 17 00:00:00 2001 From: Kris Charbonneau <71025360+krischarbonneau@users.noreply.github.com> Date: Wed, 17 Apr 2024 09:17:17 -0400 Subject: [PATCH] Update staging from dev April 12, 2024 (#610) * aa fix for card buttton * h33 to div * OAuth Cookie Adjustments (for cookies too large issue) (#599) * OAuth Cookie Adjustments (for cookies too large issue) * adding in logic gates around new settings for testing * Keeping the functional setting for our purposes, still logic gated for staging testing * Removing scope from the deployment * clarifying env var names * aa fixes for menu * update dashboard e2e tests * added test for state of the cards * add analytics to breadcrumbs * Update dashboard mapper to include alternate stream 3 links if they exist (#607) * update most required card view --------- Co-authored-by: shewood Co-authored-by: lhr-git <102617425+lhr-git@users.noreply.github.com> Co-authored-by: shewood <28784886+shewood@users.noreply.github.com> Co-authored-by: Susan Mintz Co-authored-by: susan-esdc <163561589+susan-esdc@users.noreply.github.com> --- __tests__/components/Breadcrumb.test.js | 4 + __tests__/components/Header.test.js | 1 + components/BenefitTasks.tsx | 2 +- components/Breadcrumb.tsx | 4 +- components/Header.tsx | 22 ++- components/Layout.js | 4 + components/Menu.tsx | 24 +-- components/MostReqTasks.tsx | 155 ++++++++++----- components/PhaseBanner.tsx | 3 +- components/ViewMoreLessButton.tsx | 7 +- cypress/e2e/dashboard.cy.js | 253 +++++++++++++++--------- graphql/mappers/my-dashboard.ts | 18 +- pages/_app.js | 1 + pages/my-dashboard.js | 1 + 14 files changed, 326 insertions(+), 173 deletions(-) diff --git a/__tests__/components/Breadcrumb.test.js b/__tests__/components/Breadcrumb.test.js index 9a84959c0..8f0698e3c 100644 --- a/__tests__/components/Breadcrumb.test.js +++ b/__tests__/components/Breadcrumb.test.js @@ -21,6 +21,7 @@ describe('BreadCrumb', () => { , ) expect(primary).toBeTruthy() @@ -36,6 +37,7 @@ describe('BreadCrumb', () => { { text: 'Link2', link: '/' }, { text: 'Link3', link: '/' }, ]} + refPageAA='dashboard' />, ) expect(withItems).toBeTruthy() @@ -52,6 +54,7 @@ describe('BreadCrumb', () => { { text: 'Max length of breadcrumb 28', link: '/' }, { text: 'Link3', link: '/' }, ]} + refPageAA='dashboard' />, ) expect(withItemsWithLongText).toBeTruthy() @@ -62,6 +65,7 @@ describe('BreadCrumb', () => { , ) const results = await axe(container) diff --git a/__tests__/components/Header.test.js b/__tests__/components/Header.test.js index d372709b9..3c08d20b4 100644 --- a/__tests__/components/Header.test.js +++ b/__tests__/components/Header.test.js @@ -62,6 +62,7 @@ describe('Header', () => { { text: 'Max length of breadcrumb 28', link: '/' }, { text: 'Link3', link: '/' }, ], + refPageAA: 'dashboard' } test('renders Header component with default props', () => { render(
) diff --git a/components/BenefitTasks.tsx b/components/BenefitTasks.tsx index 5ca91f9f9..2a1be706d 100644 --- a/components/BenefitTasks.tsx +++ b/components/BenefitTasks.tsx @@ -81,7 +81,7 @@ const BenefitTasks = ({ ? 'noopener noreferrer' : undefined } - data-gc-analytics-customclick={`${refPageAA} ${acronym}:${task.id}`} + data-gc-analytics-customclick={`${refPageAA} ${acronym} ${taskList.title}:${task.id}`} className="flex items-center rounded-sm py-1 text-deep-blue-dark underline hover:text-blue-hover focus:outline-1 focus:outline-blue-hover" > diff --git a/components/Breadcrumb.tsx b/components/Breadcrumb.tsx index 7ed6b9b28..bf0cc9ed4 100644 --- a/components/Breadcrumb.tsx +++ b/components/Breadcrumb.tsx @@ -10,9 +10,10 @@ export interface BreadcrumbItem { export interface BreadcrumbProps { id?: string items?: BreadcrumbItem[] + refPageAA: string } -const Breadcrumb = ({ id, items }: BreadcrumbProps) => { +const Breadcrumb = ({ id, items, refPageAA }: BreadcrumbProps) => { return (
diff --git a/components/Layout.js b/components/Layout.js index 4f7a93e05..b55ea249f 100644 --- a/components/Layout.js +++ b/components/Layout.js @@ -123,6 +123,7 @@ export default function Layout(props) { breadCrumbItems={ props.breadCrumbItems ? props.breadCrumbItems : defaultBreadcrumbs } + refPageAA={props.refPageAA} topnavProps={{ skipToMainPath: '#mainContent', skipToAboutPath: '#page-footer', @@ -132,6 +133,9 @@ export default function Layout(props) { dataGcAnalyticsCustomClickInstitutionVariable={ props.children.props.aaPrefix } + dataGcAnalyticsCustomClickMenuVariable={ + props.dataGcAnalyticsCustomClickMenuVariable + } menuProps={{ legacyBehavior: true, menuList: [ diff --git a/components/Menu.tsx b/components/Menu.tsx index 7e001dbbb..83b690805 100644 --- a/components/Menu.tsx +++ b/components/Menu.tsx @@ -12,15 +12,11 @@ interface MenuItem { interface MenuProps { lang: string - dataGcAnalyticsCustomClickInstitutionVariable: string + dataGcAnalyticsCustomClick: string menuList: MenuItem[] } -const Menu = ({ - lang, - dataGcAnalyticsCustomClickInstitutionVariable, - menuList, -}: MenuProps) => { +const Menu = ({ lang, dataGcAnalyticsCustomClick, menuList }: MenuProps) => { const [showDropdown, setShowDropdown] = useState(false) const dropdown = useRef(null) @@ -52,8 +48,8 @@ const Menu = ({ return (
-