Skip to content

Commit

Permalink
Fix E2E tests (#9185)
Browse files Browse the repository at this point in the history
- Fix #9184
- It turns out the logic for handling macOS was already present elsewhere - and even *in the same file*! It seems like this was an oversight

# Important Notes
None
  • Loading branch information
somebody1234 authored Feb 26, 2024
1 parent 65f66fa commit 207f6a0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/gui2/e2e/componentBrowser.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import * as actions from './actions'
import * as customExpect from './customExpect'
import * as locate from './locate'

const ACCEPT_SUGGESTION_SHORTCUT = os.platform() === 'darwin' ? 'Meta+Enter' : 'Control+Enter'
const CONTROL_KEY = os.platform() === 'darwin' ? 'Meta' : 'Control'
const ACCEPT_SUGGESTION_SHORTCUT = `${CONTROL_KEY}+Enter`

async function deselectAllNodes(page: Page) {
await page.keyboard.press('Escape')
Expand Down Expand Up @@ -155,7 +156,7 @@ test('Editing existing nodes', async ({ page }) => {
const ADDED_PATH = '"/home/enso/Input.txt"'

// Start node editing
await locate.graphNodeIcon(node).click({ modifiers: ['Control'] })
await locate.graphNodeIcon(node).click({ modifiers: [CONTROL_KEY] })
await expect(locate.componentBrowser(page)).toBeVisible()
const input = locate.componentBrowserInput(page).locator('input')
await expect(input).toHaveValue('Data.read')
Expand Down

0 comments on commit 207f6a0

Please sign in to comment.