get pixel colour util for e2e tests (#2599)
* get pixel colour for e2e tests * remove cleverness
This commit is contained in:
@ -134,9 +134,14 @@ test('Basic sketch', async ({ page }) => {
|
||||
await page.getByRole('button', { name: 'Line' }).click()
|
||||
await page.waitForTimeout(100)
|
||||
|
||||
const line1 = await u.getSegmentBodyCoords(`[data-overlay-index="${0}"]`, 0)
|
||||
await expect(await u.getGreatestPixDiff(line1, [249, 249, 249])).toBeLessThan(
|
||||
3
|
||||
)
|
||||
// click between first two clicks to get center of the line
|
||||
await page.mouse.click(startXPx + PUR * 15, 500 - PUR * 10)
|
||||
await page.waitForTimeout(100)
|
||||
await expect(await u.getGreatestPixDiff(line1, [0, 0, 255])).toBeLessThan(3)
|
||||
|
||||
// hold down shift
|
||||
await page.keyboard.down('Shift')
|
||||
|
||||
Reference in New Issue
Block a user