mirror of
https://github.com/enso-org/enso.git
synced 2024-12-23 10:42:05 +03:00
Workaround for failing test (#9498)
One of our tests had transient failures, which were very tricky to track - it seems that not every `mouse.move` action actually emits 'pointerleave' action, on which we rely when hiding node menu. I played with different configurations, and this one looks quite reliable (100 runs of tests in a row passed, at least). But I still don't understand what is happening there, and the investigation will be in scope of #9478
This commit is contained in:
parent
84301bd7b6
commit
a02cfa4906
@ -270,14 +270,16 @@ test('Component browser handling of overridden record-mode', async ({ page }) =>
|
||||
const ADDED_PATH = '"/home/enso/Input.txt"'
|
||||
const recordModeToggle = node.getByTestId('overrideRecordingButton')
|
||||
const recordModeIndicator = node.getByTestId('recordingOverriddenButton')
|
||||
const MENU_UNHOVER_CLOSE_DELAY = 300
|
||||
|
||||
// Enable record mode for the node.
|
||||
await locate.graphNodeIcon(node).hover()
|
||||
await expect(recordModeToggle).not.toHaveClass(/recording-overridden/)
|
||||
await recordModeToggle.click()
|
||||
await page.mouse.move(100, 80)
|
||||
await page.waitForTimeout(MENU_UNHOVER_CLOSE_DELAY)
|
||||
// TODO[ao]: The simple move near top-left corner not always works i.e. not always
|
||||
// `pointerleave` event is emitted. Investigated in https://github.com/enso-org/enso/issues/9478
|
||||
// once fixed, remember to change the second `await page.mouse.move(700, 1200, { steps: 20 })`
|
||||
// line below.
|
||||
await page.mouse.move(700, 1200, { steps: 20 })
|
||||
await expect(recordModeIndicator).toBeVisible()
|
||||
await locate.graphNodeIcon(node).hover()
|
||||
await expect(recordModeToggle).toHaveClass(/recording-overridden/)
|
||||
@ -291,7 +293,8 @@ test('Component browser handling of overridden record-mode', async ({ page }) =>
|
||||
await input.pressSequentially(` ${ADDED_PATH}`)
|
||||
await page.keyboard.press('Enter')
|
||||
await expect(locate.componentBrowser(page)).not.toBeVisible()
|
||||
await page.mouse.move(100, 80)
|
||||
// See TODO above.
|
||||
await page.mouse.move(700, 1200, { steps: 20 })
|
||||
await expect(recordModeIndicator).toBeVisible()
|
||||
// Ensure after editing the node, editing still doesn't display the override expression.
|
||||
await locate.graphNodeIcon(node).click({ modifiers: [CONTROL_KEY] })
|
||||
|
Loading…
Reference in New Issue
Block a user