#58777 closed defect (bug) (fixed)
E2E Tests: Resolve 404s in Cache-Control Headers Directive tests.
Reported by: | costdev | Owned by: | 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).
- 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 thatpublishPost
can be imported, andawait publishPost();
can be called between this line andawait logout();
to ensure the post is actually published. This is how it's done in another test in the suite.
- this line effectively attempts to navigate to
http://localhost:8889/wp-admin/wp-admin
, producing a 404. This seems to be resolved by usingawait 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
#2
@
14 months ago
- Owner set to peterwilsoncc
- Resolution set to fixed
- Status changed from new to closed
In 56197:
@peterwilsoncc commented on PR #4825:
14 months ago
#3
Note: See
TracTickets for help on using
tickets.
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.