Skip to content

Commit

Permalink
Fix flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
farmaazon committed Oct 25, 2024
1 parent bc31b18 commit 45e7e80
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
11 changes: 6 additions & 5 deletions app/gui/e2e/project-view/rightPanel.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,16 @@ test('Doc panel focus (regression #10471)', async ({ page }) => {
await page.keyboard.press(`${CONTROL_KEY}+D`)
await page.keyboard.press(`${CONTROL_KEY}+\``)
await expect(locate.rightDock(page)).toBeVisible()
await expect(locate.bottomDock(page)).toBeVisible()
const codeEditor = page.locator('.CodeEditor')
await expect(codeEditor).toBeVisible()

// Focus code editor.
await locate.bottomDock(page).click()
await codeEditor.click()

await page.evaluate(() => {
const codeEditor = (window as any).__codeEditorApi
const docStart = codeEditor.indexOf('The main method')
codeEditor.placeCursor(docStart + 8)
const codeEditorApi = (window as any).__codeEditorApi
const docStart = codeEditorApi.indexOf('The main method')
codeEditorApi.placeCursor(docStart + 8)
})
await page.keyboard.press('Space')
await page.keyboard.press('T')
Expand Down
1 change: 0 additions & 1 deletion app/gui/src/project-view/providers/tooltipState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ const { provideFn, injectFn } = createContextStore('tooltip registry', () => {
return set ? last(set) : undefined
},
registerTooltip(slot: Ref<Slot | undefined>) {
console.log('REGISTER TOOLTIP')
const entry: TooltipEntry = {
contents: slot,
key: Symbol(),
Expand Down

0 comments on commit 45e7e80

Please sign in to comment.