Skip to content

test: unskip future APIs tests for specific browsers#1187

Open
edmundhung wants to merge 1 commit intomainfrom
fix-future-api-browser-tests
Open

test: unskip future APIs tests for specific browsers#1187
edmundhung wants to merge 1 commit intomainfrom
fix-future-api-browser-tests

Conversation

@edmundhung
Copy link
Copy Markdown
Owner

@edmundhung edmundhung commented Apr 13, 2026

Generated Summary

Changes Summary

useControl.browser.test.tsx

  • Removed server import from vitest/browser
  • Converted the focus/blur events test from it.skipIf(server.browser === 'firefox') to an unconditional it(), removing Firefox-specific gating

useForm.browser.test.tsx

  • Converted two blur-based validation tests from test.skipIf(server.browser === 'webkit' || server.browser === 'firefox') to unconditional test() calls
  • Introduced a per-test runtime guard: const shouldAssertCheckboxBlurError = server.browser !== 'webkit'
  • Wrapped checkbox blur error assertions in conditional blocks (if (shouldAssertCheckboxBlurError)) across both "shouldValidate: onBlur" and "shouldValidate: onBlur / shouldRevalidate: onInput" tests, while keeping text/description field assertions unconditional

This shift from compile-time test skipping to runtime assertion filtering allows these tests to run across all browsers while accommodating WebKit's different checkbox interaction behavior.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 13, 2026

⚠️ No Changeset found

Latest commit: 5706b35

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: a9da78ec-2172-4664-a075-9547c8e913ec

📥 Commits

Reviewing files that changed from the base of the PR and between a9481c5 and 5706b35.

📒 Files selected for processing (2)
  • packages/conform-react/tests/useControl.browser.test.tsx
  • packages/conform-react/tests/useForm.browser.test.tsx

📝 Walkthrough

Walkthrough

These changes update browser-specific test conditionals in conform-react's test suite. Previously skipped test cases for Firefox and WebKit are now executed unconditionally, with runtime guards selectively suppressing assertions for specific browsers rather than skipping entire tests.

Changes

Cohort / File(s) Summary
useControl Test Refactor
packages/conform-react/tests/useControl.browser.test.tsx
Removed Firefox browser skip condition and server import from vitest. The focus/blur emulation test now runs unconditionally on all browsers instead of being skipped for Firefox.
useForm Test Conditionals
packages/conform-react/tests/useForm.browser.test.tsx
Replaced Firefox and WebKit skip conditions with unconditional tests that use runtime guards (shouldAssertCheckboxBlurError). Wrap checkbox blur error assertions in conditionals to suppress them on WebKit while assertions for other fields remain active across all browsers.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰✨ No more skipping tests for browsers grand,
Now they run on every land!
Runtime guards make assertions wise,
WebKit quirks meet watchful eyes,
Conform tests bloom, pure and true!

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: unskipping browser-specific test skips (Firefox, WebKit) to allow tests to run across browsers with conditional assertions.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying conform with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5706b35
Status: ✅  Deploy successful!
Preview URL: https://cafce469.conform.pages.dev
Branch Preview URL: https://fix-future-api-browser-tests.conform.pages.dev

View logs

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 13, 2026

More templates

@conform-to/dom

npm i https://pkg.pr.new/@conform-to/dom@1187

@conform-to/react

npm i https://pkg.pr.new/@conform-to/react@1187

@conform-to/valibot

npm i https://pkg.pr.new/@conform-to/valibot@1187

@conform-to/validitystate

npm i https://pkg.pr.new/@conform-to/validitystate@1187

@conform-to/yup

npm i https://pkg.pr.new/@conform-to/yup@1187

@conform-to/zod

npm i https://pkg.pr.new/@conform-to/zod@1187

commit: 5706b35

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