Skip to content

Consolidate text assertion specs and port upstream regressions - #406

Merged
YusukeIwaki merged 2 commits into
mainfrom
codex/to-have-text-upstream-tests
Nov 17, 2026
Merged

YusukeIwaki merged 2 commits into
mainfrom
codex/to-have-text-upstream-tests

Conversation

@YusukeIwaki

@YusukeIwaki YusukeIwaki commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner

Consolidate the #to_have_text cases from spec/integration/assertions_spec.rb into spec/integration/page/expect_to_have_text_spec.rb, alongside upstream substring regression tests. The moved examples retain their assertions, source reference, and Sinatra setup; the negated and array regression cases from #402 run independently.

Port the corresponding Playwright release-1.65 tests, preserving their names and conditions:

  • EX-281 pass contain: substring matching, whitespace normalization, and ignoreCase behavior for to_contain_text.
  • EX-282 fail: to_have_text rejects a substring match and reports expected and actual values.
  • EX-286 fail with impossible timeout: the same mismatch and diagnostic checks with timeout: 1.

Diagnostic assertions use Ruby's existing message format. This follows up on #402 and keeps its text assertion coverage together with the upstream regression cases.

Validation: Ruby 4.0.0 / Playwright Core 1.65.1; rbenv exec bundle exec rspec spec/integration/page/expect_to_have_text_spec.rb spec/integration/assertions_spec.rb passes on Chromium and WebKit (86 examples, 0 failures each). git diff --check passes.

@vercel

vercel Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
playwright-ruby-client Ignored Ignored Preview Nov 17, 2026 4:52am UTC

@YusukeIwaki YusukeIwaki changed the title Port upstream text assertion regression tests Consolidate text assertion specs and port upstream regressions Nov 17, 2026
@YusukeIwaki
YusukeIwaki merged commit fef1eea into main Nov 17, 2026
40 of 41 checks passed
@YusukeIwaki
YusukeIwaki deleted the codex/to-have-text-upstream-tests branch November 17, 2026 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant