-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Sidebar Tabs: Stabilize the block inspector tabs experiment #47045
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
aaronrobertshaw
merged 14 commits into
trunk
from
update/stabilize-block-inspector-tabs
Jan 11, 2023
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
3d4c3db
Sidebar Tabs: Stabilize block inspector tabs experiment
aaronrobertshaw 25bd202
Stabilize block inspector tabs editor setting
aaronrobertshaw afdc1f0
Rely on allow list to determine list tab should show
aaronrobertshaw 983d6f6
Make linter happy
aaronrobertshaw f8d7d08
Make Nav list view tab dependent on off canvas experiment
aaronrobertshaw ccd0489
Fix block hierarchy navigation e2es
aaronrobertshaw dc5bfb4
Add playwright util to switch tabs
aaronrobertshaw aa0bdc3
Fix table e2es
aaronrobertshaw 3759b22
Fix buttons e2es
aaronrobertshaw 1eb8599
Fix push to global styles e2e
aaronrobertshaw 80231a1
Try and fix avatar e2e
aaronrobertshaw e2db856
Fix hooks-api e2e
aaronrobertshaw 9b2dffb
Fix avatar e2e (maybe...)
aaronrobertshaw 175a868
Remove unwarranted check in playwright util
aaronrobertshaw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
26 changes: 26 additions & 0 deletions
26
packages/e2e-test-utils-playwright/src/editor/switch-block-inspector-tab.ts
This file contains hidden or 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,26 @@ | ||
| /** | ||
| * Internal dependencies | ||
| */ | ||
| import type { Editor } from './index'; | ||
| import { expect } from '../test'; | ||
|
|
||
| /** | ||
| * Clicks on the block inspector tab button with the supplied label and waits | ||
| * for the tab switch. | ||
| * | ||
| * @param {Editor} this | ||
| * @param {string} label | ||
| */ | ||
| export async function switchBlockInspectorTab( this: Editor, label: string ) { | ||
| const inspectorTabButton = this.page.locator( | ||
| `role=region[name="Editor settings"i] >> role=tab[name="${ label }"i]` | ||
| ); | ||
| const id = await inspectorTabButton.getAttribute( 'id' ); | ||
|
|
||
| await inspectorTabButton.click(); | ||
| await expect( | ||
| this.page.locator( | ||
| `role=region[name="Editor settings"i] >> div[role="tabpanel"][aria-labelledby="${ id }"]` | ||
| ) | ||
| ).toBeVisible(); | ||
| } | ||
This file contains hidden or 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 hidden or 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 hidden or 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,19 @@ | ||
| /** | ||
| * Clicks on the block inspector tab button with the supplied label and waits | ||
| * for the tab switch. | ||
| * | ||
| * @param { string } label Aria label to find tab button by. | ||
| */ | ||
| export async function switchBlockInspectorTab( label ) { | ||
| const tabButton = await page.$( | ||
| `.block-editor-block-inspector__tabs button[aria-label="${ label }"]` | ||
| ); | ||
|
|
||
| if ( tabButton ) { | ||
aaronrobertshaw marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| const id = await page.evaluate( ( tab ) => tab.id, tabButton ); | ||
| await tabButton.click(); | ||
| await page.waitForSelector( | ||
| `div[role="tabpanel"][aria-labelledby="${ id }"]` | ||
| ); | ||
| } | ||
| } | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.