Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
},
"devDependencies": {
"@playwright/test": "^1.58.0",
"@types/node": "^24.10.1",
"@wordpress/e2e-test-utils-playwright": "^1.35.0",
"@types/node": "^20.17.10",
"@wordpress/e2e-test-utils-playwright": "^1.50.0",
"@wordpress/env": "^9.0.0",
"@wordpress/scripts": "^27.0.0"
}
Expand Down
41 changes: 29 additions & 12 deletions tests/e2e/exclude-with-post-in.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,21 @@ test.describe( 'Exclude Displayed Posts with post__in', () => {
.getByRole( 'button', { name: 'Title & Date' } )
.click();

// Selecting the pattern leaves a child block focused; re-select the
// AQL root block so its sidebar settings (including the Posts
// combobox) are shown.
await blockEditor.selectBlock.byName( 'core/query', 0 );
// Check if we need to set this to a custom loop, WP 6.9 does not default to custom.
await blockEditor.queryBlock.setAsCustom();

// Set the posts to include
// Set the posts to include - AQL requires typing to search; no posts shown until input has text.
await page
.getByRole( 'combobox', { name: 'Posts', exact: true } )
.getByRole( 'combobox', { name: 'Posts to Include' } )
.click();
await page.getByRole( 'option', { name: 'Post 23' } ).click();
await page.getByRole( 'option', { name: 'Post 21' } ).click();
await page.keyboard.type( 'Post 23' );
await page.getByRole( 'option', { name: 'Post 23', exact: true } ).click();
await page.keyboard.type( 'Post 21' );
await page.getByRole( 'option', { name: 'Post 21', exact: true } ).click();

// Get post titles from first query
const canvas = page
Expand Down Expand Up @@ -266,18 +272,29 @@ test.describe( 'Exclude Displayed Posts with post__in', () => {
}

await editor.openDocumentSettingsSidebar();
// Selecting the pattern leaves a child block focused; re-select the
// AQL root block so its sidebar settings (including the Posts
// combobox) are shown.
await blockEditor.selectBlock.byName( 'core/query', 0 );
await blockEditor.queryBlock.setAsCustom();

// Set the posts to include
// Set the posts to include - AQL requires typing to search; no posts shown until input has text.
await page
.getByRole( 'combobox', { name: 'Posts', exact: true } )
.getByRole( 'combobox', { name: 'Posts to Include' } )
.click();
await page.getByRole( 'option', { name: 'Post 23' } ).click();
await page.getByRole( 'option', { name: 'Post 21' } ).click();
await page.getByRole( 'option', { name: 'Post 19' } ).click();
await page.getByRole( 'option', { name: 'Post 18' } ).click();
await page.getByRole( 'option', { name: 'Post 16' } ).click();
await page.getByRole( 'option', { name: 'Post 24' } ).click();
for ( const postName of [
'Post 23',
'Post 21',
'Post 19',
'Post 18',
'Post 16',
'Post 24',
] ) {
await page.keyboard.type( postName );
await page
.getByRole( 'option', { name: postName, exact: true } )
.click();
}

// Select the first post template and configure it
await blockEditor.selectBlock.byName( 'core/post-template' );
Expand Down
Loading