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

chore: Update test util doc examples so they don't error out #7612

Merged
merged 4 commits into from
Jan 15, 2025

Conversation

LFDanLu
Copy link
Member

@LFDanLu LFDanLu commented Jan 15, 2025

Closes

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

🧢 Your Project:

@rspbot
Copy link

rspbot commented Jan 15, 2025

Copy link
Member

@snowystinger snowystinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like a fair number of issues in the docs, do we have some way we can run them? or how are you checking them?

@@ -1012,7 +1012,7 @@ it('ComboBox can select an option via keyboard', async function () {
// Render your test component/app and initialize the combobox tester
let {getByTestId} = render(
<Provider theme={defaultTheme}>
<ComboBox data-testid="test-combobox">
<ComboBox label="test-combobox" data-testid="test-combobox">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need this in the example? do we need both attributes?

Copy link
Member

@devongovett devongovett Jan 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess because of the warning about missing label? I think it's probably ok to keep the docs example minimal even so. we're omitting all of the content here as well

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah it was cuz of the missing labels, but I'm fine getting rid of it again

@reidbarber
Copy link
Member

do we have some way we can run them?

@snowystinger yarn test:docs should show console errors and warnings

@LFDanLu
Copy link
Member Author

LFDanLu commented Jan 15, 2025

@snowystinger to check these I basically copy pasted them into our test suite and made sure they ran after filling in the contents. They were originally constructed from test cases we already had but messed some of them up when paring them down/copying them over.

@LFDanLu LFDanLu enabled auto-merge January 15, 2025 18:10
@rspbot
Copy link

rspbot commented Jan 15, 2025

@LFDanLu LFDanLu added this pull request to the merge queue Jan 15, 2025
Merged via the queue into main with commit 80f8a2b Jan 15, 2025
30 checks passed
@LFDanLu LFDanLu deleted the test_util_doc_fixes branch January 15, 2025 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants