mirror of
https://github.com/enso-org/enso.git
synced 2025-01-03 11:11:50 +03:00
Fix AssetSearchBar
E2E tests (#11377)
- Fix https://github.com/enso-org/enso/issues/11368 - Split "tags" E2E test into two tests to avoid timeout - Fix https://github.com/enso-org/cloud-v2/issues/1551 - Fix other flaky E2E tests # Important Notes None
This commit is contained in:
parent
b99aa668ef
commit
4f556f2882
@ -5,7 +5,7 @@ import * as backend from '#/services/Backend'
|
|||||||
|
|
||||||
import * as actions from './actions'
|
import * as actions from './actions'
|
||||||
|
|
||||||
test.test('tags', async ({ page }) => {
|
test.test('tags (positive)', async ({ page }) => {
|
||||||
await actions.mockAllAndLogin({ page })
|
await actions.mockAllAndLogin({ page })
|
||||||
const searchBarInput = actions.locateSearchBarInput(page)
|
const searchBarInput = actions.locateSearchBarInput(page)
|
||||||
const tags = actions.locateSearchBarTags(page)
|
const tags = actions.locateSearchBarTags(page)
|
||||||
@ -19,7 +19,14 @@ test.test('tags', async ({ page }) => {
|
|||||||
await positiveTag.click()
|
await positiveTag.click()
|
||||||
await test.expect(searchBarInput).toHaveValue(text)
|
await test.expect(searchBarInput).toHaveValue(text)
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
test.test('tags (negative)', async ({ page }) => {
|
||||||
|
await actions.mockAllAndLogin({ page })
|
||||||
|
const searchBarInput = actions.locateSearchBarInput(page)
|
||||||
|
const tags = actions.locateSearchBarTags(page)
|
||||||
|
|
||||||
|
await searchBarInput.click()
|
||||||
await page.keyboard.down('Shift')
|
await page.keyboard.down('Shift')
|
||||||
for (const negativeTag of await tags.all()) {
|
for (const negativeTag of await tags.all()) {
|
||||||
await searchBarInput.selectText()
|
await searchBarInput.selectText()
|
||||||
|
@ -90,6 +90,7 @@ test.test('can drop onto root directory dropzone', ({ page }) =>
|
|||||||
.driveTable.doubleClickRow(0)
|
.driveTable.doubleClickRow(0)
|
||||||
.driveTable.withRows(async (rows, nonAssetRows) => {
|
.driveTable.withRows(async (rows, nonAssetRows) => {
|
||||||
const parentLeft = await actions.getAssetRowLeftPx(rows.nth(0))
|
const parentLeft = await actions.getAssetRowLeftPx(rows.nth(0))
|
||||||
|
await test.expect(nonAssetRows.nth(0)).toHaveText(actions.TEXT.thisFolderIsEmpty)
|
||||||
const childLeft = await actions.getAssetRowLeftPx(nonAssetRows.nth(0))
|
const childLeft = await actions.getAssetRowLeftPx(nonAssetRows.nth(0))
|
||||||
test.expect(childLeft, 'Child is indented further than parent').toBeGreaterThan(parentLeft)
|
test.expect(childLeft, 'Child is indented further than parent').toBeGreaterThan(parentLeft)
|
||||||
})
|
})
|
||||||
|
@ -10,7 +10,7 @@ import { defineConfig } from '@playwright/test'
|
|||||||
import net from 'net'
|
import net from 'net'
|
||||||
|
|
||||||
const DEBUG = process.env.DEBUG_E2E === 'true'
|
const DEBUG = process.env.DEBUG_E2E === 'true'
|
||||||
const TIMEOUT_MS = DEBUG ? 100_000_000 : 30_000
|
const TIMEOUT_MS = DEBUG ? 100_000_000 : 60_000
|
||||||
|
|
||||||
async function findFreePortInRange(min: number, max: number) {
|
async function findFreePortInRange(min: number, max: number) {
|
||||||
for (let i = 0; i < 50; i++) {
|
for (let i = 0; i < 50; i++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user