-
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.
Modified gol, added gotemplate, hnset-bench
- Loading branch information
Showing
3 changed files
with
41 additions
and
3 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
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,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() | ||
} |
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,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() | ||
} |