Skip to content

Commit 5208f08

Browse files
committed
fix(serenity-js): updated to Serenity/JS 3.32
1 parent 5ff73ab commit 5208f08

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

features/support/serenity.config.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,16 @@ BeforeAll(async () => {
3434
configure({
3535

3636
// Configure Serenity/JS actors to use Playwright browser
37-
actors: new Actors(browser, {
38-
baseURL: 'https://the-internet.herokuapp.com/',
39-
defaultNavigationTimeout: timeouts.playwright.defaultNavigationTimeout.inMilliseconds(),
40-
defaultTimeout: timeouts.playwright.defaultTimeout.inMilliseconds(),
41-
}),
37+
actors: new Actors(
38+
browser,
39+
{
40+
baseURL: 'https://the-internet.herokuapp.com/',
41+
},
42+
{
43+
defaultNavigationTimeout: timeouts.playwright.defaultNavigationTimeout.inMilliseconds(),
44+
defaultTimeout: timeouts.playwright.defaultTimeout.inMilliseconds(),
45+
}
46+
),
4247

4348
// Configure Serenity/JS reporting services
4449
crew: [

test/Actors.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
import { Actor, Cast, TakeNotes } from '@serenity-js/core';
2-
import { BrowseTheWebWithPlaywright, PlaywrightOptions } from '@serenity-js/playwright';
2+
import { BrowseTheWebWithPlaywright, ExtraBrowserContextOptions } from '@serenity-js/playwright';
33
import { CallAnApi } from '@serenity-js/rest';
44
import * as playwright from 'playwright';
55

66
export class Actors implements Cast {
77
constructor(
88
private readonly browser: playwright.Browser,
9-
private readonly options: PlaywrightOptions,
9+
private readonly browserContextOptions: playwright.BrowserContextOptions,
10+
private readonly extraBrowserContextOptions: ExtraBrowserContextOptions,
1011
) {
1112
}
1213

1314
prepare(actor: Actor): Actor {
1415
return actor.whoCan(
15-
BrowseTheWebWithPlaywright.using(this.browser, this.options),
16-
CallAnApi.at(this.options.baseURL),
16+
BrowseTheWebWithPlaywright.using(this.browser, this.browserContextOptions, this.extraBrowserContextOptions),
17+
CallAnApi.at(this.browserContextOptions.baseURL),
1718
TakeNotes.usingAnEmptyNotepad(),
1819
);
1920
}

0 commit comments

Comments
 (0)