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

Accessibility/button test #31189

Closed

Conversation

huzaifaaak
Copy link

@huzaifaaak huzaifaaak commented Mar 18, 2021

Summary

This PR aims to add test's for button.
Snapshot test for PR #31001 . This would make sure accessibilityState is properly set.

Changelog

[General] [Added] - Test's for button

Test Plan

npm test to run the test's.
Since the disabled prop of button has precedence over accessibilityState.disabled the test's will make sure it remains this way.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 18, 2021
Copy link

@analysis-bot analysis-bot left a comment

Choose a reason for hiding this comment

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

Code analysis results:

  • eslint found some issues. Run yarn lint --fix to automatically fix problems.

@analysis-bot
Copy link

analysis-bot commented Mar 18, 2021

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: a15a46c

@analysis-bot
Copy link

analysis-bot commented Mar 18, 2021

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,951,211 +0
android hermes armeabi-v7a 8,440,029 +0
android hermes x86 9,444,733 +0
android hermes x86_64 9,387,293 +0
android jsc arm64-v8a 10,683,818 +0
android jsc armeabi-v7a 10,155,741 +0
android jsc x86 10,738,853 +0
android jsc x86_64 11,321,673 +0

Base commit: feebfe1

Copy link

@analysis-bot analysis-bot left a comment

Choose a reason for hiding this comment

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

Code analysis results:

  • eslint found some issues. Run yarn lint --fix to automatically fix problems.

@huzaifaaak
Copy link
Author

@lunaleaps @kacieb Can you please review this

Copy link
Contributor

@lunaleaps lunaleaps left a comment

Choose a reason for hiding this comment

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

Small nit in terms of setting expectations, otherwise looks good!

Libraries/Components/__tests__/Button-test.js Outdated Show resolved Hide resolved
@facebook-github-bot
Copy link
Contributor

@lunaleaps has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Contributor

@kacieb kacieb left a comment

Choose a reason for hiding this comment

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

Hey! Thanks so much for writing these tests!

They can be simplified a bit - see my comment on another pull request about the same thing here.

You can follow the same test structure as this commit.

@lunaleaps
Copy link
Contributor

@huzaifaaak I'll wait for your response from @kacieb's comment before landing.

@huzaifaaak
Copy link
Author

@lunaleaps I have updated the test structure

@facebook-github-bot
Copy link
Contributor

@lunaleaps has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@lunaleaps merged this pull request in b5e649f.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Apr 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accessibility CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants