@@ -59,13 +129,18 @@ const CanonicalNavigationContainer: React.FC<
setIsOpen(!isOpen)}
+ isOpen={openDropdown === 'main'}
+ onClick={() =>
+ setOpenDropdown(openDropdown === 'main' ? null : 'main')
+ }
dir={dir}
/>
)}
-
+
{dropdownListItems}
@@ -83,6 +158,90 @@ const CanonicalNavigationContainer: React.FC<
{topBarOJsEnabled &&
}
);
+
+ // Sticky nav is rendered if it is not the lite site and if keyboard navigation has not been indicated with te tab key
+ const stickyNav =
+ !isLite && !isKeyboardNav ? (
+
+
+
+
+
+
+ {topScrollableListItems}
+
+ {!isLite && (
+
+ setOpenDropdown(
+ openDropdown === 'sticky' ? null : 'sticky',
+ )
+ }
+ dir={dir}
+ />
+ )}
+
+
+ {dropdownListItems}
+
+
+
+
+ {bottomScrollableListItems}
+
+
+
+
+
+
+ ) : null;
+
+ return (
+ <>
+ {mainNav}
+ {stickyNav}
+ >
+ );
};
export default CanonicalNavigationContainer;
diff --git a/src/app/legacy/psammead/psammead-navigation/src/DropdownNavigation/index.jsx b/src/app/legacy/psammead/psammead-navigation/src/DropdownNavigation/index.jsx
index 0a011bc20e9..76b83d1608c 100644
--- a/src/app/legacy/psammead/psammead-navigation/src/DropdownNavigation/index.jsx
+++ b/src/app/legacy/psammead/psammead-navigation/src/DropdownNavigation/index.jsx
@@ -45,11 +45,16 @@ const StyledDropdown = styled.div`
}
`;
-export const CanonicalDropdown = ({ isOpen, children, className = '' }) => {
+export const CanonicalDropdown = ({
+ isOpen,
+ children,
+ className = '',
+ isSticky = false,
+}) => {
const heightRef = useRef(null);
return (
(
diff --git a/ws-nextjs-app/cypress/e2e/livePage/index.cy.ts b/ws-nextjs-app/cypress/e2e/livePage/index.cy.ts
index 201b78290c0..e12800fbc8d 100644
--- a/ws-nextjs-app/cypress/e2e/livePage/index.cy.ts
+++ b/ws-nextjs-app/cypress/e2e/livePage/index.cy.ts
@@ -1,5 +1,5 @@
import { LIVE_PAGE } from '#app/routes/utils/pageTypes';
-import { assertPageView } from '../../../../cypress/e2e/specialFeatures/atiAnalytics/assertions';
+import { assertPageView } from '#cypress/e2e/specialFeatures/atiAnalytics/assertions';
import mediaPlayerTests from './mediaPlayer';
import pageVisit from './pageVisit';
import keyPoints from './keyPoints';
@@ -53,38 +53,38 @@ const atiAnalyticsTestSuites = [
assertDropdownNavigationComponentClick,
],
},
- {
- path: '/pidgin/live/c7p765ynk9qt',
- runforEnv: ['local'],
- service: 'pidgin',
- pageIdentifier: 'live_coverage.c7p765ynk9qt.page',
- siteId: 70,
- applicationType: 'responsive',
- contentType: 'live-coverage',
- tests: [
- assertPageView,
- assertScrollableNavigationComponentView,
- assertScrollableNavigationComponentClick,
- assertDropdownNavigationComponentView,
- assertDropdownNavigationComponentClick,
- ],
- },
- {
- path: '/urdu/live/cx2qdkezzzvt',
- runforEnv: ['live'],
- service: 'urdu',
- pageIdentifier: 'live_coverage.cx2qdkezzzvt.page',
- siteId: 95,
- applicationType: 'responsive',
- contentType: 'live-coverage',
- tests: [
- assertPageView,
- assertScrollableNavigationComponentView,
- assertScrollableNavigationComponentClick,
- assertDropdownNavigationComponentView,
- assertDropdownNavigationComponentClick,
- ],
- },
+ // {
+ // path: '/pidgin/live/c7p765ynk9qt',
+ // runforEnv: ['local'],
+ // service: 'pidgin',
+ // pageIdentifier: 'live_coverage.c7p765ynk9qt.page',
+ // siteId: 70,
+ // applicationType: 'responsive',
+ // contentType: 'live-coverage',
+ // tests: [
+ // assertPageView,
+ // assertScrollableNavigationComponentView,
+ // assertScrollableNavigationComponentClick,
+ // assertDropdownNavigationComponentView,
+ // assertDropdownNavigationComponentClick,
+ // ],
+ // },
+ // {
+ // path: '/urdu/live/cx2qdkezzzvt',
+ // runforEnv: ['live'],
+ // service: 'urdu',
+ // pageIdentifier: 'live_coverage.cx2qdkezzzvt.page',
+ // siteId: 95,
+ // applicationType: 'responsive',
+ // contentType: 'live-coverage',
+ // tests: [
+ // assertPageView,
+ // assertScrollableNavigationComponentView,
+ // assertScrollableNavigationComponentClick,
+ // assertDropdownNavigationComponentView,
+ // assertDropdownNavigationComponentClick,
+ // ],
+ // },
] as unknown as TestDataType[];
describe('Live Page Spec', () => {
diff --git a/ws-nextjs-app/cypress/e2e/specialFeatures/atiAnalytics/assertions/navigation.ts b/ws-nextjs-app/cypress/e2e/specialFeatures/atiAnalytics/assertions/navigation.ts
index bde41f5f456..c332021b9e8 100644
--- a/ws-nextjs-app/cypress/e2e/specialFeatures/atiAnalytics/assertions/navigation.ts
+++ b/ws-nextjs-app/cypress/e2e/specialFeatures/atiAnalytics/assertions/navigation.ts
@@ -73,7 +73,7 @@ export const assertDropdownNavigationComponentView = ({
cy.visit(path);
cy.viewport(320, 480);
- cy.get('nav button').click();
+ cy.get('nav button:visible').click();
assertATIComponentViewEvent({
component: DROPDOWN_NAVIGATION,
@@ -95,7 +95,7 @@ export const assertDropdownNavigationComponentClick = ({
cy.visit(path);
cy.viewport(320, 480);
- cy.get('nav button').click();
+ cy.get('nav button:visible').click();
// Click on first item, then return to the original page
cy.get('[data-e2e="dropdown-nav"]').find('a').first().click();