-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
RNMobile: Add integration test to verify button block border radius functionality #33211
Conversation
Size Change: +1.33 kB (0%) Total Size: 1.07 MB
ℹ️ View Unchanged
|
36f4c33
to
344a354
Compare
The test should assert the existance of a React element but because of a missing `await`, was instead asserting an unresolved Promise instead. Since the unresolved Promise is a value, `toBeDefined` was returning `true` and the test was passing. Fixing the test involves resolving the Promise using `await` so that what's asserted is an actual React element.
I noticed when running the integration test that the following console error is logged:
I think it was caused by the gutenberg/test/native/setup.js Line 199 in cb25fef
However, per the original code, we should return a JSX element:
|
I fixed the issue in this commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work @guarani 👏 !
LGTM 🎊 !
An important thing that we should keep an eye on is the integration tests duration, for this case, the duration is around |
Thanks for fixing that console error. I'd seen it but hadn't checked if it was new or not.
I'll keep an eye on this. While the tests themselves are quick, the entire execution time (from when I execute the command till when it finishes) is quite long. I see 59.19 seconds for a run of a single test. |
…unctionality (#33211) * Add setup for button radius test * Tweak query in test * Clean up bottons tests * Clean up buttons test further * RNMobile: Fix reusable block test assertion The test should assert the existance of a React element but because of a missing `await`, was instead asserting an unresolved Promise instead. Since the unresolved Promise is a value, `toBeDefined` was returning `true` and the test was passing. Fixing the test involves resolving the Promise using `await` so that what's asserted is an actual React element. * Update useResizeObserver mock Co-authored-by: Carlos Garcia <fluiddot@gmail.com>
Description
[NEW] Button block border radius tests
Adds a test to the button block on mobile to ensure button radius changes are saved properly. Fixes wordpress-mobile/gutenberg-mobile#3667.
[BUGFIX] Reusable block tests
The test should assert the existence of a React element but because of a missing
await
, was instead asserting an unresolved Promise instead. Since the unresolved Promise is a value,toBeDefined
was returningtrue
and the test was passing.Fixing the test involved resolving the Promise using
await
so that what's asserted is an actual React element.How has this been tested?
[NEW] Button block border radius tests
[BUGFIX] Reusable block tests
Run the test and ensure it passes:
Types of changes
Checklist:
*.native.js
files for terms that need renaming or removal).