Skip to content

Commit

Permalink
Update test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgefilipecosta committed Jul 8, 2024
1 parent 918e815 commit d66599d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ test.describe( 'Dataviews List Layout', () => {
page.getByRole( 'button', { name: 'Reset' } )
).toBeFocused();

await page.keyboard.press( 'Tab' );
await expect(
page.getByRole( 'button', { name: 'Layout' } )
).toBeFocused();

await page.keyboard.press( 'Tab' );
await expect(
page.getByRole( 'button', { name: 'View options' } )
Expand All @@ -69,6 +74,7 @@ test.describe( 'Dataviews List Layout', () => {
await page.keyboard.press( 'Tab' );
await page.keyboard.press( 'Tab' );
await page.keyboard.press( 'Tab' );
await page.keyboard.press( 'Tab' );

// Make sure the items have loaded before reaching for the 1st item in the list.
await expect( page.getByRole( 'grid' ) ).toBeVisible();
Expand Down Expand Up @@ -98,6 +104,7 @@ test.describe( 'Dataviews List Layout', () => {
await page.keyboard.press( 'Tab' );
await page.keyboard.press( 'Tab' );
await page.keyboard.press( 'Tab' );
await page.keyboard.press( 'Tab' );

// Make sure the items have loaded before reaching for the 1st item in the list.
await expect( page.getByRole( 'grid' ) ).toBeVisible();
Expand All @@ -121,6 +128,7 @@ test.describe( 'Dataviews List Layout', () => {
await page.keyboard.press( 'Tab' );
await page.keyboard.press( 'Tab' );
await page.keyboard.press( 'Tab' );
await page.keyboard.press( 'Tab' );

// Make sure the items have loaded before reaching for the 1st item in the list.
await expect( page.getByRole( 'grid' ) ).toBeVisible();
Expand Down Expand Up @@ -162,6 +170,7 @@ test.describe( 'Dataviews List Layout', () => {
await page.keyboard.press( 'Tab' );
await page.keyboard.press( 'Tab' );
await page.keyboard.press( 'Tab' );
await page.keyboard.press( 'Tab' );

// Make sure the items have loaded before reaching for the 1st item in the list.
await expect( page.getByRole( 'grid' ) ).toBeVisible();
Expand Down
3 changes: 1 addition & 2 deletions test/e2e/specs/site-editor/new-templates-list.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ test.describe( 'Templates', () => {
test( 'Field visibility', async ( { admin, page } ) => {
await admin.visitSiteEditor( { postType: 'wp_template' } );

await page.getByRole( 'button', { name: 'View options' } ).click();
await page.getByRole( 'menuitem', { name: 'Layout' } ).click();
await page.getByRole( 'button', { name: 'Layout' } ).click();
await page.getByRole( 'menuitemradio', { name: 'Table' } ).click();

await page.getByRole( 'button', { name: 'Description' } ).click();
Expand Down

0 comments on commit d66599d

Please sign in to comment.