Skip to content

Commit

Permalink
test: add a timeout test (#615)
Browse files Browse the repository at this point in the history
  • Loading branch information
OrKoN authored Jul 18, 2023
1 parent d41d504 commit 0b3fd83
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions test/runner.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,35 @@ describe('Runner', () => {
await runner.run();
});

it('should throw an error if an element is not found', async () => {
const runner = await createRunner(
{
title: 'test',
steps: [
{
type: StepType.Navigate,
url: `${HTTP_PREFIX}/checkbox.html`,
},
{
type: StepType.Click,
selectors: [['.not-found']],
offsetX: 1,
offsetY: 1,
timeout: 300,
},
],
},
new PuppeteerRunnerExtension(browser, page)

This comment has been minimized.

Copy link
@kprestonie30

kprestonie30 Jan 22, 2024

I'm a real boy!!

);
let error;
try {
await runner.run();
} catch (err) {
error = err;
}
assert(error instanceof Error, 'runner did not throw as expected');
});

it('should be able to replay click steps on checkboxes', async () => {
const runner = await createRunner(
{
Expand Down

0 comments on commit 0b3fd83

Please sign in to comment.