-
Notifications
You must be signed in to change notification settings - Fork 25
me-17983: test if video is playing on ESM examples main page #820
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
Conversation
✅ Deploy Preview for cld-video-player ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for cld-vp-esm-pages ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
tsi
left a 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.
Lookin good, on small note...
| export async function testMainPageVideoIsPlaying(page: Page, videoElement: VideoComponent) { | ||
| await test.step('Click on play button to play video', async () => { | ||
| await waitForPageToLoadWithTimeout(page, 5000); | ||
| return videoElement.clickPlay(); |
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.
Could this click mistakenly trigger pause instead of play? i.e. if the video is auto-playing
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 clickPlay is used only on pages/videos which are not auto-playing. The video on main pages is not auto-played so this is why we need to click on play.
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.
👍 if you need/want to be sure, you can check player is-playing status
Relevant task - https://cloudinary.atlassian.net/browse/ME-17983
This test is navigating to ESM main page and make sure that video element are playing.
As it share common steps as mainPageVideoIsPlaying.spec.ts that was already implemented I created common spec function testMainPageVideoIsPlaying and using it on both specs.