Skip to content

Commit

Permalink
Add page status
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin940726 committed Feb 13, 2023
1 parent db05b20 commit ab50bef
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions packages/e2e-test-utils-playwright/src/request-utils/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,18 @@
*/
import type { RequestUtils } from './index';

const PAGE_STATUS = [
'publish',
'future',
'draft',
'pending',
'private',
'trash',
] as const;

export type Page = {
id: number;
status: 'publish' | 'future' | 'draft' | 'pending' | 'private';
status: typeof PAGE_STATUS[ number ];
};

/**
Expand All @@ -20,8 +29,8 @@ export async function deleteAllPages( this: RequestUtils ) {
path: '/wp/v2/pages',
params: {
per_page: 100,
// All possible statuses.
status: 'publish,future,draft,pending,private,trash',

status: PAGE_STATUS.join( ',' ),
},
} );

Expand Down

0 comments on commit ab50bef

Please sign in to comment.