Cleaned up login page loading in E2E tests#26251
Conversation
WalkthroughThis pull request updates navigation handling across multiple page helper classes in the e2e test suite. The 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
bdb3dae to
fe2a5af
Compare
towards https://linear.app/ghost/issue/NY-1000 *This test-only change should have no user impact.* This change: - Logs a more helpful error when visiting the signup page. This seems to be failing in CI a lot, and it'd be useful to know more about the error. - Removes an unnecessary `waitFor` on the email address field. `locator.fill()` [automatically waits for this][0]. - Stops an unnecessary check when going to the sign-in page. A user should already be available, and the extra wait will probably never happen--we visit a URL and then check that we're not at a different URL, which it will never be. (And if it *did* redirect, we wouldn't catch it this way.) [0]: https://playwright.dev/docs/actionability
fe2a5af to
d5dcad5
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@e2e/helpers/pages/public/public-page.ts`:
- Around line 80-93: In goto(), remove the redundant unconditional call to
enableAnalyticsRequests() so analytics are only enabled for the analytics
project; keep the call inside the if (testInfo.project.name === 'analytics')
block along with pageHitRequestPromise() and ensure the existing logic that
awaits pageHitPromise and returns result remains unchanged (references: goto,
enableAnalyticsRequests, pageHitRequestPromise, test.info()).
towards https://linear.app/ghost/issue/NY-1000
This test-only change should have no user impact.
This change:
Logs a more helpful error when visiting the signup page. This seems to be failing in CI a lot, and it'd be useful to know more about the error.
Removes an unnecessary
waitForon the email address field.locator.fill()automatically waits for this.Stops an unnecessary check when going to the sign-in page. A user should already be available, and the extra wait will probably never happen--we visit a URL and then check that we're not at a different URL, which it will never be. (And if it did redirect, we wouldn't catch it this way.)