diff --git a/tests/online/game-of-life/test.js b/tests/online/game-of-life/test.js index b1a0aa69..351dbe9a 100644 --- a/tests/online/game-of-life/test.js +++ b/tests/online/game-of-life/test.js @@ -10,9 +10,9 @@ export default async function test(analyser) { // await delay(500) // await button.click() - const nextButton = page.locator('#button') - await nextButton.wasabi({state: 'visible'}) - const N = 5 + const nextButton = page.locator('#next') + await nextButton.waitFor({state: 'visible'}) + const N = 10 for (let i = 0; i < N; i++) { await nextButton.click() await delay(1000) diff --git a/tests/online/gotemplate/test.js b/tests/online/gotemplate/test.js new file mode 100644 index 00000000..d2d54c81 --- /dev/null +++ b/tests/online/gotemplate/test.js @@ -0,0 +1,23 @@ +import { delay } from '../../../dist/tests/test-utils.cjs' +import { expect } from 'playwright/test' + +export default async function test(analyser) { + const url = 'https://gotemplate.io/' + const page = await analyser.start(url, { headless: false }) + + const templateText = page.locator('#input-tmpl') + await templateText.waitFor({state: 'visible'}) + + const dataText = page.locator('#input-data') + await dataText.waitFor({state: 'visible'}) + + const outputText = page.locator('#output') + await outputText.waitFor({state: 'visible'}) + + await templateText.fill('what, {{.planet}}') + await expect(outputText).toContainText('what, World', {timeout: 100000}) + + await delay(5000) + + return await analyser.stop() +} diff --git a/tests/online/hnset-bench/test.js b/tests/online/hnset-bench/test.js new file mode 100644 index 00000000..e8d10f33 --- /dev/null +++ b/tests/online/hnset-bench/test.js @@ -0,0 +1,15 @@ +import { delay } from '../../../dist/tests/test-utils.cjs' + +export default async function test(analyser) { + const url = 'https://raw.githack.com/gorhill/uBlock/master/docs/tests/hnset-benchmark.html' + const page = await analyser.start(url, { headless: false }) + + const lookupButton = page.locator('#lookupBenchmark') + await lookupButton.waitFor({state: 'visible'}) + + await lookupButton.click() + + await delay(10000) + + return await analyser.stop() +}