mirror of
https://github.com/enso-org/enso.git
synced 2024-12-30 04:33:46 +03:00
be2ae3279c
Fixes #8433 * Adds E2E test to `test` script in gui2 (without server) * Add options to `run` script to specify what test should be run: `unit` (default), `e2e`, or `ci` (which runs both unit and e2e without watching/spawning report server). * The CI test step now checks e2e tests. ### Important Notes ~~One of e2e tests was disabled because it caught the regression on develop: #8476 ~~
24 lines
1.1 KiB
TypeScript
24 lines
1.1 KiB
TypeScript
import { expect, test } from '@playwright/test'
|
|
import * as actions from './actions'
|
|
import * as customExpect from './customExpect'
|
|
import * as locate from './locate'
|
|
|
|
test('component browser shows entries, and creates a new node', async ({ page }) => {
|
|
await actions.goToGraph(page)
|
|
await locate.graphEditor(page).click()
|
|
await locate.graphEditor(page).press('Enter')
|
|
await customExpect.toExist(locate.componentBrowser(page))
|
|
await customExpect.toExist(locate.componentBrowserEntry(page))
|
|
let nodeCount = await locate.graphNode(page).count()
|
|
await locate.componentBrowserEntry(page).last().click()
|
|
await expect(locate.componentBrowser(page)).not.toBeVisible()
|
|
await expect(locate.graphNode(page)).toHaveCount(nodeCount + 1)
|
|
|
|
// Clicking at highlighted entry should also work.
|
|
nodeCount = await locate.graphNode(page).count()
|
|
await locate.graphEditor(page).press('Enter')
|
|
await locate.componentBrowserSelectedEntry(page).first().click()
|
|
await expect(locate.componentBrowser(page)).not.toBeVisible()
|
|
await expect(locate.graphNode(page)).toHaveCount(nodeCount + 1)
|
|
})
|