Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

Commit

Permalink
Merge pull request #23 from AudiusProject/jowlee-wait-track-render-play
Browse files Browse the repository at this point in the history
Wait for track to render
  • Loading branch information
jowlee committed Feb 10, 2021
1 parent facc947 commit 7d6e451
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/probers/src/flows/play-track.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ import { wait, waitForNetworkIdle2 } from '../utils'

export const playTrack = async (page, baseUrl, route) => {
await waitForNetworkIdle2(page, page.goto(`${baseUrl}/${route}`))

// Tracks may still be loading, so wait for track to render
await page.waitForSelector(`span[class^=TrackTile_title]`)

// Play the first track tile.
await page.click(`div[class^=TrackTile_container]`)
// Make sure audio playback starts.
Expand Down

0 comments on commit 7d6e451

Please sign in to comment.