Skip to content

Commit

Permalink
feat(playwright-test): enabled the ability to CallAnApi for all defau…
Browse files Browse the repository at this point in the history
…lt actors

Related tickets: #1876
  • Loading branch information
jan-molak committed Oct 3, 2023
1 parent 83a6881 commit 436cde5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/playwright-test/src/api/test-api.ts
Expand Up @@ -33,15 +33,15 @@ const serenitySelectorEngines = new SerenitySelectorEngines();
export const fixtures: Fixtures<Omit<SerenityOptions, 'actors'> & SerenityFixtures, object, PlaywrightTestArgs & PlaywrightTestOptions, PlaywrightWorkerArgs & PlaywrightWorkerOptions> = {
actors: [
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
async ({ contextOptions, page }, use): Promise<void> => {
async ({ contextOptions, baseURL, extraHTTPHeaders, page, proxy }, use): Promise<void> => {
await use(Cast.where(actor => actor.whoCan(
BrowseTheWebWithPlaywright.usingPage(page, contextOptions),
TakeNotes.usingAnEmptyNotepad(),
CallAnApi.using({
baseURL: contextOptions.baseURL,
headers: contextOptions.extraHTTPHeaders,
proxy: contextOptions.proxy && contextOptions.proxy?.server
? asProxyConfig(contextOptions.proxy)
baseURL: baseURL,
headers: extraHTTPHeaders,
proxy: proxy && proxy?.server
? asProxyConfig(proxy)
: undefined,
}),
)));
Expand Down

0 comments on commit 436cde5

Please sign in to comment.