Make WordPress Core

Opened 14 months ago

Closed 14 months ago

Last modified 14 months ago

#58777 closed defect (bug) (fixed)

E2E Tests: Resolve 404s in Cache-Control Headers Directive tests.

Reported by: costdev's profile costdev Owned by: peterwilsoncc's profile peterwilsoncc
Milestone: 6.3 Priority: normal
Severity: normal Version: 6.3
Component: Build/Test Tools Keywords: has-patch has-unit-tests
Focuses: Cc:

Description

There are two 404s that can occur in these tests.

You can see that even in this successful run, the 404s occurred (the second one is in the next block).

  1. this block attempts to publish the post. However, this seems to fail. When await logout(); completes and an attempt is made to go to the published URL, a 404 is triggered. It seems that publishPost can be imported, and await publishPost(); can be called between this line and await logout(); to ensure the post is actually published. This is how it's done in another test in the suite.
  1. this line effectively attempts to navigate to http://localhost:8889/wp-admin/wp-admin, producing a 404. This seems to be resolved by using await visitAdminPage( '/' );.

After implementing these changes, the E2E run of the PR shows that the Cache-Control headers directives tests simply pass with no 404 output.

Change History (3)

This ticket was mentioned in PR #4825 on WordPress/wordpress-develop by @costdev.


14 months ago
#1

  • Keywords has-unit-tests added

Previously, an attempt to view a new post as a logged-out user and an attempt to visit an admin page resulted in 404s.

This change ensures that both URLs are reachable.

#2 @peterwilsoncc
14 months ago

  • Owner set to peterwilsoncc
  • Resolution set to fixed
  • Status changed from new to closed

In 56197:

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.

Note: See TracTickets for help on using tickets.