mirror of
https://github.com/enso-org/enso.git
synced 2024-12-02 14:22:27 +03:00
1a8b82e237
* `Enter` key accepts the edit in Numeric and Text input * Newly added node are selected * Placement of new nodes takes opened visualizations into account. [Screencast from 2024-02-02 13-02-26.webm](https://github.com/enso-org/enso/assets/3919101/0f328824-1cbc-4b07-988e-dbf17b94dc2f)
14 lines
513 B
TypeScript
14 lines
513 B
TypeScript
import { expect, type Locator } from 'playwright/test'
|
|
|
|
/** Ensures that at least one of the elements that the Locator points to,
|
|
* is an attached and visible DOM node. */
|
|
export function toExist(locator: Locator) {
|
|
// Counter-intuitive, but correct:
|
|
// https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-be-visible
|
|
return expect(locator.first()).toBeVisible()
|
|
}
|
|
|
|
export function toBeSelected(locator: Locator) {
|
|
return expect(locator).toHaveClass(/(?<=^| )selected(?=$| )/)
|
|
}
|