-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* new tabbed preferences - web * mobile using Navigation component * small cleanup * small refactor after the rebase * addressed some first feedback * remove Block Manager modal from options * revert move of block manager * fix more styles * sync menus in large and small viewports * add + update unit tests * fix custom fields button width * add togglePreferencesOption e2e util and fix some tests * updated e2e utils * Polish * Fix colors. * Actually fix colors. * add keys to fix animation because of React reconciliation * update snapshots * add key prop to TabPanel Co-authored-by: jasmussen <[email protected]>
- Loading branch information
1 parent
63ee69e
commit 1524fee
Showing
19 changed files
with
723 additions
and
367 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
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
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
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
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 |
---|---|---|
@@ -1,13 +1,17 @@ | ||
/** | ||
* Internal dependencies | ||
*/ | ||
import { toggleScreenOption } from './toggle-screen-option'; | ||
import { togglePreferencesOption } from './toggle-preferences-option'; | ||
import { toggleMoreMenu } from './toggle-more-menu'; | ||
|
||
/** | ||
* Disables Pre-publish checks. | ||
*/ | ||
export async function disablePrePublishChecks() { | ||
await toggleScreenOption( 'Include pre-publish checklist', false ); | ||
await togglePreferencesOption( | ||
'General', | ||
'Include pre-publish checklist', | ||
false | ||
); | ||
await toggleMoreMenu(); | ||
} |
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 |
---|---|---|
@@ -1,13 +1,17 @@ | ||
/** | ||
* Internal dependencies | ||
*/ | ||
import { toggleScreenOption } from './toggle-screen-option'; | ||
import { togglePreferencesOption } from './toggle-preferences-option'; | ||
import { toggleMoreMenu } from './toggle-more-menu'; | ||
|
||
/** | ||
* Enables Pre-publish checks. | ||
*/ | ||
export async function enablePrePublishChecks() { | ||
await toggleScreenOption( 'Include pre-publish checklist', true ); | ||
await togglePreferencesOption( | ||
'General', | ||
'Include pre-publish checklist', | ||
true | ||
); | ||
await toggleMoreMenu(); | ||
} |
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
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,36 @@ | ||
/** | ||
* Internal dependencies | ||
*/ | ||
import { clickOnCloseModalButton } from './click-on-close-modal-button'; | ||
import { clickOnMoreMenuItem } from './click-on-more-menu-item'; | ||
|
||
/** | ||
* Toggles a preference option with the given tab label and the option label. | ||
* | ||
* @param {string} tabLabel The preferences tab label to click. | ||
* @param {string} optionLabel The option label to search the button for. | ||
* @param {boolean} [shouldBeChecked] If true, turns the option on. If false, off. If not provided, the option will be toggled. | ||
*/ | ||
export async function togglePreferencesOption( | ||
tabLabel, | ||
optionLabel, | ||
shouldBeChecked | ||
) { | ||
await clickOnMoreMenuItem( 'Preferences' ); | ||
const [ tabHandle ] = await page.$x( | ||
`//button[contains(text(), "${ tabLabel }")]` | ||
); | ||
await tabHandle.click(); | ||
const [ optionHandle ] = await page.$x( | ||
`//label[contains(text(), "${ optionLabel }")]` | ||
); | ||
const isChecked = await page.evaluate( | ||
( element ) => element.control.checked, | ||
optionHandle | ||
); | ||
if ( isChecked !== shouldBeChecked ) { | ||
await optionHandle.click(); | ||
} | ||
|
||
await clickOnCloseModalButton(); | ||
} |
This file was deleted.
Oops, something went wrong.
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
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
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
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
Oops, something went wrong.