Frame Functional Tests: Replace chai with Playwright by seanpdoyle · Pull Request #1461 · hotwired/turbo
Follow-up to hotwired#1454 This commit continues to migrate from `assert` usage toward Playwright's `expect`. This commit focuses on the `src/tests/functional/frame_tests.js` file. Utilize Playwright's built-in [assertions][] so that functional test assertions are consistent. The `chai`-based assertions provide similar coverage, but not much is gained for the suite by having two competing styles of assertion. The majority of this diff replaces `assert.equal` with `expect(...).toEqual()`. In some cases, text comparison is replaced with Playwright's [toHaveText][], since that assertion bakes in synchronization and waiting support, and has the ability to compare contents in a way that ignores spacing differences. [assertions]: https://playwright.dev/docs/test-assertions [toHaveText]: https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-text
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters