Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to handle browser JSON responses more robustly #3305

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

myabc
Copy link
Contributor

@myabc myabc commented Feb 2, 2025

What are you trying to accomplish?

Sticking to Capybara's API for getting document text should (in theory) make this less likely to break in the event of a browser changing how it renders plain text/JSON responses.

Arguably, it also reads slightly better.

Screenshots

There should be no visual changes.

Integration

List the issues that this change affects.

Risk Assessment

  • Low risk the change is small, highly observable, and easily rolled back.
  • Medium risk changes that are isolated, reduced in scope or could impact few users. The change will not impact library availability.
  • High risk changes are those that could impact customers and SLOs, low or no test coverage, low observability, or slow to rollback.

What approach did you choose and why?

Anything you want to highlight for special attention from reviewers?

Accessibility

  • Fixes axe scan violation - This change fixes an existing axe scan violation.
  • No new axe scan violation - This change does not introduce any new axe scan violations.
  • New axe violation - This change introduces a new axe scan violation. Please describe why the violation cannot be resolved below.

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Added/updated previews (Lookbook)
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.

@myabc myabc requested a review from a team as a code owner February 2, 2025 03:28
@myabc myabc requested a review from TylerJDev February 2, 2025 03:28
Copy link

changeset-bot bot commented Feb 2, 2025

⚠️ No Changeset found

Latest commit: a3fc4ce

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

Sticking to Capybara's API for getting document text should (in theory)
make this less likely to break in the event of a browser changing how it
renders plain text/JSON responses.

[skip changeset]
@myabc myabc force-pushed the feature/test-json-response-improvements branch from a3fc4ce to e37f0bc Compare February 2, 2025 03:34
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