Skip to content

Commit

Permalink
Added test : sqlgui
Browse files Browse the repository at this point in the history
  • Loading branch information
yusungsim committed Nov 30, 2023
1 parent b1785ab commit 30f3309
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/online/sqlgui/test.js
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()
}

0 comments on commit 30f3309

Please sign in to comment.