#54409 closed defect (bug) (fixed)
E2E Tests: Update test for saved draft with no title
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.9 | Priority: | normal |
Severity: | normal | Version: | 5.9 |
Component: | Build/Test Tools | Keywords: | has-patch has-unit-tests |
Focuses: | Cc: |
Description
When [52093] changed the default theme to TwentyTwenty Two, E2E tests failed when testing that draft posts created on the dashboard(with an empty title) resulted in a different title than expected.
After investigation, it was noted that the previous TwentyTwenty One theme included a the_title
filter that changed all empty post titles to "Untitled". This is the result that the E2E tests were expecting.
However, given that historically, tests are usually crafted for default behavior(see [38838] as one example), the E2E tests for drafts saved with no title should be updated to expect "(no title)". Additionally, the test should also be updated with a more tightly scoped selector to only select the link text, not any child tags, e.g. <time>
.
Trac ticket: https://core.trac.wordpress.org/ticket/54409