-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { delay } from '../../../dist/tests/test-utils.cjs' | ||
import { createMeasure } from '../../../dist/src/performance.cjs' | ||
|
||
export default async function test(analyser) { | ||
const url = 'https://sql.js.org/examples/GUI/' | ||
const page = await analyser.start(url, { headless: true }) | ||
|
||
const buttonLocator = page.locator('#execute') | ||
await buttonLocator.waitFor({ state: 'visible' }) | ||
await buttonLocator.click() | ||
|
||
const resultLocator = page.locator('#output') | ||
await resultLocator.waitFor({ state: 'visible'}) | ||
// finding the output table with test 'designation' only works for the | ||
// initial example. if the executing SQL code is changed, | ||
// the output table should be differently found | ||
const tableLocator = resultLocator.getByText('designation') | ||
await tableLocator.waitFor({state: 'visible'}) | ||
|
||
return await analyser.stop() | ||
} |