Skip to content

Commit 1a1393c

Browse files
committed
Create a few posts to test the Posts page.
1 parent 5f76eee commit 1a1393c

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

‎tests/e2e/utils/accessibility-pages.js‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,20 @@ const pages = [
7171
stateVariants: [
7272
{
7373
name: 'default',
74+
setup: async ( page, requestUtils ) => {
75+
// Create a published post.
76+
await requestUtils.createPost( {
77+
title: 'Test Published Post',
78+
status: 'publish',
79+
} );
80+
// Create a pending review post so there's something to filter.
81+
await requestUtils.createPost( {
82+
title: 'Test Pending Review Post',
83+
status: 'pending',
84+
} );
85+
// Reload the page to show the draft.
86+
await page.reload();
87+
},
7488
},
7589
{
7690
name: 'draft-filter',
@@ -82,7 +96,7 @@ const pages = [
8296
} );
8397
// Reload the page to show the draft.
8498
await page.reload();
85-
// Ensure table is visible before filtering.
99+
// Ensure table is visible before filtering.
86100
const tableVisible = await page.locator( 'table.wp-list-table' ).isVisible();
87101
if ( tableVisible ) {
88102
await filterByStatus( page, 'draft' );

0 commit comments

Comments
 (0)