-
Notifications
You must be signed in to change notification settings - Fork 384
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Persist default mobile_redirect setting when it is not interacted with
- Loading branch information
1 parent
bd9c505
commit 7f997eb
Showing
4 changed files
with
61 additions
and
4 deletions.
There are no files selected for viewing
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
File renamed without changes.
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,32 @@ | ||
/** | ||
* WordPress dependencies | ||
*/ | ||
const { visitAdminPage } = require( '@wordpress/e2e-test-utils/build/visit-admin-page' ); | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
const { completeWizard, cleanUpWizard } = require( '../../utils/onboarding-wizard-utils' ); | ||
|
||
describe( 'Mobile redirect settings', () => { | ||
afterEach( async () => { | ||
await visitAdminPage( 'admin.php', 'page=amp-setup' ); | ||
await cleanUpWizard(); | ||
} ); | ||
|
||
it( 'persists the mobile redirect setting on', async () => { | ||
await completeWizard( { mode: 'reader' } ); | ||
await visitAdminPage( 'admin.php', 'page=amp-options' ); | ||
|
||
await page.waitForSelector( '#mobile_redirect' ); | ||
await expect( page ).toMatchElement( '#mobile_redirect:checked' ); | ||
} ); | ||
|
||
it( 'persists the mobile redirect setting off', async () => { | ||
await completeWizard( { mode: 'reader', mobileRedirect: false } ); | ||
await visitAdminPage( 'admin.php', 'page=amp-options' ); | ||
|
||
await page.waitForSelector( '#mobile_redirect' ); | ||
await expect( page ).not.toMatchElement( '#mobile_redirect:checked' ); | ||
} ); | ||
} ); |
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