Skip to content

Commit 5e14c43

Browse files
committed
Build/Test Tools: Prevent 404 errors in the E2E tests.
Modifies the cache control headers tests to prevent 404 errors for each of the tests. Props costdev. Fixes #58777. git-svn-id: https://develop.svn.wordpress.org/trunk@56197 602fd350-edb4-49c9-b593-d223f7449a82
1 parent d7ddda1 commit 5e14c43

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

tests/e2e/specs/cache-control-headers-directives.test.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {
22
visitAdminPage,
33
createNewPost,
4+
publishPost,
45
trashAllPosts,
56
createURL,
67
logout,
@@ -13,10 +14,8 @@ describe( 'Cache Control header directives', () => {
1314
} );
1415

1516
it( 'No private directive present in cache control when user not logged in.', async () => {
16-
await createNewPost( {
17-
title: 'Hello World',
18-
post_status: 'publish',
19-
} );
17+
await createNewPost( { title: 'Hello World' } );
18+
await publishPost();
2019
await logout();
2120

2221
const response = await page.goto( createURL( '/hello-world/' ) );
@@ -27,7 +26,7 @@ describe( 'Cache Control header directives', () => {
2726
} );
2827

2928
it( 'Private directive header present in cache control when logged in.', async () => {
30-
await visitAdminPage( '/wp-admin' );
29+
await visitAdminPage( '/' );
3130

3231
const response = await page.goto( createURL( '/wp-admin' ) );
3332
const responseHeaders = response.headers();

0 commit comments

Comments
 (0)