mirror of
https://github.com/enso-org/enso.git
synced 2024-12-21 03:12:01 +03:00
86c59469d0
1. The electron test hit timeouts from time to time, probably because of slow response from the engine: increased timeout. 2. Unify vite version across packages.
33 lines
1.5 KiB
TypeScript
33 lines
1.5 KiB
TypeScript
/** @file A test for basic flow of the application: open project and see if nodes appear. */
|
|
|
|
import { expect } from '@playwright/test'
|
|
import { electronTest, loginAsTestUser } from './electronTest'
|
|
|
|
electronTest('Create new project', async page => {
|
|
await loginAsTestUser(page)
|
|
await expect(page.getByRole('button', { name: 'New Project', exact: true })).toBeVisible()
|
|
await page.getByRole('button', { name: 'New Project', exact: true }).click()
|
|
await expect(page.locator('.GraphNode')).toHaveCount(1, { timeout: 60000 })
|
|
|
|
// We see the node type and visualization, so the engine is running the program
|
|
await expect(page.locator('.node-type')).toHaveText('Table', { timeout: 30000 })
|
|
await expect(page.locator('.TableVisualization')).toBeVisible({ timeout: 30000 })
|
|
await expect(page.locator('.TableVisualization')).toContainText('Welcome To Enso!')
|
|
|
|
// We can add new node and see suggestions.
|
|
await page.locator('.GraphNode').click()
|
|
await page.keyboard.press('Enter')
|
|
await expect(page.locator('.ComponentBrowser')).toBeVisible()
|
|
const entry = page.locator('.ComponentList .list-variant.selected .component', {
|
|
hasText: 'column_count',
|
|
})
|
|
await expect(entry).toBeVisible()
|
|
await entry.click()
|
|
await expect(page.locator('.GraphNode'), {}).toHaveCount(2)
|
|
await page.locator('.GraphNode', { hasText: 'column_count' }).click()
|
|
await page
|
|
.locator('.GraphNode', { hasText: 'column_count' })
|
|
.getByRole('button', { name: 'Visualization' })
|
|
.click()
|
|
})
|