-
Notifications
You must be signed in to change notification settings - Fork 273
Expand file tree
/
Copy pathtestsForAllAMPPages.js
More file actions
31 lines (27 loc) · 1.03 KB
/
testsForAllAMPPages.js
File metadata and controls
31 lines (27 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// For testing features that may differ across services but share a common logic e.g. translated strings.
export default ({ service, pageType }) => {
describe(`testsForAllAMPPages to run for ${service} ${pageType}`, () => {
describe('Header Tests', () => {
// limit number to Zhongwen for navigation toggling
const testMobileNav = service === 'zhongwen';
if (testMobileNav) {
it('should show dropdown menu and hide scrollable menu when menu button is clicked', () => {
cy.viewport(320, 480);
cy.get('nav')
.find('[data-e2e="scrollable-nav"]')
.should('be.visible');
cy.get('nav')
.find('[data-e2e="dropdown-nav"] ul')
.should('not.be.visible');
cy.get('nav button').click();
cy.get('nav')
.find('[data-e2e="scrollable-nav"]')
.should('not.be.visible');
cy.get('nav')
.find('[data-e2e="dropdown-nav"] ul')
.should('be.visible');
});
}
});
});
};