-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
421de81
commit b908892
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
e2e-tests/fixtures/customizer/hfg/hfg-secondary-menu-component.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"neve_ran_builder_migration": true, | ||
"neve_migrated_builders": true, | ||
"neve_ran_migrations": true, | ||
"neve_had_old_skin": true, | ||
"neve_migrated_hfg_colors": true, | ||
"nav_menu_locations": { | ||
"primary": 176 | ||
}, | ||
"header_palette_switch_icon_size": "{\"mobile\":16,\"tablet\":16,\"desktop\":44}", | ||
"hfg_header_layout_v2": "{\"desktop\":{\"top\":{\"left\":[],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[{\"id\":\"secondary-menu\"}]},\"main\":{\"left\":[{\"id\":\"logo\"}],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[]},\"bottom\":{\"left\":[],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[]}},\"mobile\":{\"top\":{\"left\":[],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[]},\"main\":{\"left\":[{\"id\":\"logo\"}],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[{\"id\":\"nav-icon\"}]},\"bottom\":{\"left\":[],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[]},\"sidebar\":[{\"id\":\"secondary-menu\"}]}}\";}", | ||
"neve_new_skin": "new" | ||
} |
21 changes: 21 additions & 0 deletions
21
e2e-tests/specs/customizer/hfg/hgf-secondary-menu-component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { test, expect } from '@playwright/test'; | ||
import { setCustomizeSettings } from '../../../utils'; | ||
import secondaryMenuSetup from '../../../fixtures/customizer/hfg/hfg-secondary-menu-component.json'; | ||
|
||
test.describe('Secondary Nav', async () => { | ||
test('Only Secondary Nav', async ({ page, request, baseURL }) => { | ||
await setCustomizeSettings('hfgSearchFormIcon', secondaryMenuSetup, { | ||
request, | ||
baseURL, | ||
}); | ||
await page.goto('/?test_name=hfgSecondaryNav'); | ||
|
||
await page.setViewportSize({ width: 375, height: 812 }); // Mobile Mode. | ||
|
||
await page.getByRole('button', { name: 'Navigation Menu' }).click(); | ||
|
||
await expect( | ||
page.getByRole('link', { name: 'Sample Page' }) | ||
).toBeVisible(); // Secondary_Nav_Walker enqueues the necessary JS to make the menu work. | ||
}); | ||
}); |