Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion tests/player-colour-map.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,11 @@ test.describe('the colour-map radio row', () => {

test('the colour-map config row opens a table in grey or inferno, and the row shows it', async ({ page }) => {
await page.goto(PAINTING_PAGE)
await page.waitForFunction(() => window.GramFrame.__test__getInstances().filter(i => i.state.player.ready).length === 5)
// Six players, as tests/player-painting.spec.js waits for: the fixture's
// seventh table is the deliberately bad one, which never becomes an
// instance. Waiting for a count the page only passes through (it was 5,
// from before the fixture grew) is a race the page can skip in one frame.
await page.waitForFunction(() => window.GramFrame.__test__getInstances().filter(i => i.state.player.ready).length === 6)

const plain = await samplePixels(page, 0)
const grey = await samplePixels(page, 2)
Expand Down
Loading