-
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.
Added tests: jqkungfu, livesplit(failing), mandelbrot.
- Loading branch information
Showing
4 changed files
with
62 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,29 @@ | ||
import { delay } from '../../../dist/tests/test-utils.cjs' | ||
|
||
export default async function test(analyser) { | ||
const url = 'http://jqkungfu.com/' | ||
const page = await analyser.start(url, { headless: true}) | ||
|
||
const queryBox = page.locator('#query') | ||
await queryBox.waitFor({state: 'visible'}) | ||
|
||
const goButton = page.locator('#btnRun') | ||
await goButton.waitFor({state: 'visible'}) | ||
|
||
|
||
await queryBox.fill('') | ||
await queryBox.press('.') | ||
await queryBox.press('[') | ||
await queryBox.press('1') | ||
await queryBox.press(']') | ||
await goButton.click() | ||
|
||
await queryBox.fill('') | ||
await queryBox.press('.') | ||
await queryBox.press('[') | ||
await queryBox.press('2') | ||
await queryBox.press(']') | ||
await goButton.click() | ||
|
||
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,10 @@ | ||
import { delay } from '../../../dist/tests/test-utils.cjs' | ||
|
||
export default async function test(analyser) { | ||
const url = 'https://one.livesplit.org/' | ||
const page = await analyser.start(url, { headless: false }) | ||
|
||
await delay(10000) | ||
|
||
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,22 @@ | ||
import { delay } from '../../../dist/tests/test-utils.cjs' | ||
|
||
export default async function test(analyser) { | ||
const url = 'http://whealy.com/Rust/mandelbrot.html' | ||
const page = await analyser.start(url, { headless: true }) | ||
|
||
const canvas = page.locator('#mandelImage') | ||
await canvas.waitFor({state: 'visible' }) | ||
|
||
for (let i = 0; i < 10; i++){ | ||
await canvas.click({ | ||
button: 'left', | ||
position: {x: 400, y: 200}, | ||
}) | ||
await delay(1000) | ||
} | ||
|
||
|
||
await delay(1000) | ||
|
||
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