-
Notifications
You must be signed in to change notification settings - Fork 58
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
VideoPress block: Add tests to verify Privacy and Rating settings #5754
Conversation
This commit pulls in the changes from this PR, which are needed to use the picker in our tests: WordPress/gutenberg#50493
Wanna run full suite of Android and iOS UI tests? Click here and 'Approve' CI job! |
@@ -17,6 +17,10 @@ export const PLAYBACK_SETTINGS = [ | |||
|
|||
export const PLAYBACK_BAR_COLOR_SETTINGS = [ 'Dynamic color' ]; | |||
|
|||
export const RATING_OPTIONS = [ 'G', 'PG-13', 'R' ]; | |||
|
|||
export const PRIVACY_OPTIONS = [ 'Site default (Public)', 'Public', 'Private' ]; |
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.
The first privacy option (Site default (Public)
) can also be Site default (Private)
if the site is private. I'm wondering if it would be worth adding a test case for this, WDYT? Note that it would require mocking the hook or the fetch request that returns the site privacy value.
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.
I think that's a great idea! I looked a bit into what was needed and see that it would involve mocking the useSyncMedia
hook in order to get the privateEnabledForSite
value, like here. I think that would be easier to get working when that hook has been mocked for testing the syncing, so will make a note to follow up with a different PR after that. :)
Relevant discussion here: #5754 (comment)
|
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 @SiobhyB 🏅 ! LGTM 🎊 !
Part of the coverage efforts outlined in #5734
Description
pressSettingInPicker
, has been introduced to loop through and select each of the available options in the Privacy and Rating pickers.To test:
TEST_RN_PLATFORM=ios npm run test src/test/videopress/edit.js
andTEST_RN_PLATFORM=android npm run test src/test/videopress/edit.js
commands from the terminal to verify the tests pass as expected. Also, verify the tests on this PR pass.PR submission checklist: