Skip to content

Commit 72b1d1f

Browse files
committed
docs(blog): 3.32 release announement
1 parent 77b2fa0 commit 72b1d1f

File tree

10 files changed

+391
-22
lines changed

10 files changed

+391
-22
lines changed

docusaurus.config.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,10 @@ const config: Config = {
7272
and produce comprehensive test reports that build trust between delivery teams and the business.
7373
`,
7474
banner: {
75-
text: 'New Playwright Test guide is out!',
76-
link: '/handbook/test-runners/playwright-test',
75+
// text: 'Get started with Serenity/JS and Playwright Test',
76+
// link: '/handbook/test-runners/playwright-test',
77+
text: 'Serenity/JS 3.32 powers up Playwright',
78+
link: '/blog/playwright-reporting-and-worker-scope-actors/',
7779
}
7880
},
7981

src/blog/2025-06-20-playwright-worker-scope-actors/index.mdx

Lines changed: 366 additions & 0 deletions
Large diffs are not rendered by default.
590 KB
Loading
697 KB
Loading
1.26 MB
Loading
963 KB
Loading
1.28 MB
Loading

src/docs/handbook/design/screenplay-pattern.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ Serenity/JS test runner adapters use your test runner's configuration to set up
277277
And so, Serenity/JS adapters for the following test runners will automatically give every actor you retrieve via [`actorCalled`](/api/core/function/actorCalled) the below abilities so that you don't have to configure them yourself:
278278
- [Playwright Test](/handbook/test-runners/playwright-test):
279279
- [`BrowseTheWebWithPlaywright`](/api/playwright/class/BrowseTheWebWithPlaywright/),
280-
- [`CallAnApi`](/api/rest/class/CallAnApi) at [`baseURL`](/api/playwright/interface/PlaywrightOptions/#baseURL) configured in the [Playwright Test config file](https://playwright.dev/docs/test-configuration),
280+
- [`CallAnApi`](/api/rest/class/CallAnApi) at [`baseURL`](https://playwright.dev/docs/api/class-testoptions#test-options-base-url) configured in the [Playwright Test config file](https://playwright.dev/docs/test-configuration),
281281
- [`TakeNotes`](/api/core/class/TakeNotes)
282282
- [WebdriverIO](/handbook/test-runners/webdriverio/) (with [Cucumber](/handbook/test-runners/cucumber), [Jasmine](/handbook/test-runners/jasmine), or [Mocha](/handbook/test-runners/mocha)):
283283
- [`BrowseTheWebWithWebdriverIO`](/api/webdriverio/class/BrowseTheWebWithWebdriverIO/),

src/docs/handbook/test-runners/playwright-test.mdx

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ To integrate [Serenity/JS reporting](/handbook/reporting/), modify the `playwrig
115115

116116
```typescript title="playwright.config.ts"
117117
import { defineConfig, devices } from '@playwright/test'
118-
import type { SerenityOptions } from '@serenity-js/playwright-test'
118+
import type { SerenityFixtures, SerenityWorkerFixtures } from '@serenity-js/playwright-test'
119119

120-
export default defineConfig<SerenityOptions>({
120+
export default defineConfig<SerenityFixtures, SerenityWorkerFixtures>({
121121
reporter: [
122122
// Serenity/JS reporting services
123123
[ '@serenity-js/playwright-test', {
@@ -156,7 +156,7 @@ If you'd like to use different locations for your tests or the test reports, adj
156156
Serenity/JS offers automatic screenshot capture for test scenarios using the [Screenplay Pattern](/handbook/design/screenplay-pattern/).
157157
This is handled by the [Photographer service](/handbook/reporting/photographer/), which takes screenshots based on interactions and assertion failures performed by the Serenity/JS actors.
158158

159-
To enable automatic screenshot capture, add the `@serenity-js/web:Photographer` service to the [`crew`](/api/playwright-test/interface/SerenityOptions/#crew) array
159+
To enable automatic screenshot capture, add the `@serenity-js/web:Photographer` service to the [`crew`](/api/playwright-test/interface/SerenityFixtures/#crew) array
160160
in the appropriate `use` section of your [`playwright.config.ts`](https://playwright.dev/docs/test-configuration) configuration file.
161161

162162
There are three available scopes for configuring the Photographer:
@@ -168,9 +168,9 @@ For example, to take screenshots only **on assertion failures by default**, but
168168

169169
```ts title="playwright.config.ts"
170170
import { defineConfig, devices } from '@playwright/test'
171-
import type { SerenityOptions } from '@serenity-js/playwright-test'
171+
import type { SerenityFixtures, SerenityWorkerFixtures } from '@serenity-js/playwright-test'
172172

173-
export default defineConfig<SerenityOptions>({
173+
export default defineConfig<SerenityFixtures, SerenityWorkerFixtures>({
174174
reporter: [
175175
// ...
176176
],
@@ -225,7 +225,8 @@ describe('Checkout', () => {
225225
```
226226
227227
Learn more about:
228-
- [Serenity/JS configuration options](/api/playwright-test/interface/SerenityOptions)
228+
- [Serenity/JS test fixtures and configuration options](/api/playwright-test/interface/SerenityFixtures)
229+
- [Serenity/JS test fixtures and configuration options](/api/playwright-test/interface/SerenityWorkerFixtures)
229230
- [Playwright Test configuration options](https://playwright.dev/docs/test-configuration)
230231
231232
## Writing tests
@@ -454,13 +455,13 @@ To try this example out, check out the [Serenity/JS Playwright Test Template](ht
454455
455456
### Changing the default actor name
456457
457-
You can change the name of the default `actor` by setting the [`defaultActorName`](/api/playwright-test/interface/SerenityOptions/#defaultActorName) configuration option in your [`playwright.config.ts`](https://playwright.dev/docs/test-configuration) file:
458+
You can change the name of the default `actor` by setting the [`defaultActorName`](/api/playwright-test/interface/SerenityFixtures/#defaultActorName) configuration option in your [`playwright.config.ts`](https://playwright.dev/docs/test-configuration) file:
458459
459460
```ts title="playwright.config.ts"
460461
import { defineConfig, devices } from '@playwright/test'
461-
import type { SerenityOptions } from '@serenity-js/playwright-test'
462+
import type { SerenityFixtures, SerenityWorkerFixtures } from '@serenity-js/playwright-test'
462463

463-
export default defineConfig<SerenityOptions>({
464+
export default defineConfig<SerenityFixtures, SerenityWorkerFixtures>({
464465
// Global configuration for all test scenarios
465466
use: {
466467
defaultActorName: 'Alice',
@@ -868,9 +869,9 @@ To enable integration with the Playwright HTML reporter, you need to:
868869
869870
```ts title="playwright.config.ts"
870871
import { defineConfig, devices } from '@playwright/test'
871-
import type { SerenityOptions } from '@serenity-js/playwright-test'
872+
import type { SerenityFixtures, SerenityWorkerFixtures } from '@serenity-js/playwright-test'
872873

873-
export default defineConfig<SerenityOptions>({
874+
export default defineConfig<SerenityFixtures, SerenityWorkerFixtures>({
874875
reporter: [
875876
// Enable Serenity/JS reporting services
876877
[ '@serenity-js/playwright-test', {
@@ -924,9 +925,9 @@ To use this feature, you need to:
924925
925926
```ts title="playwright.config.ts"
926927
import { defineConfig, devices } from '@playwright/test'
927-
import type { SerenityOptions } from '@serenity-js/playwright-test'
928+
import type { SerenityFixtures, SerenityWorkerFixtures } from '@serenity-js/playwright-test'
928929

929-
export default defineConfig<SerenityOptions>({
930+
export default defineConfig<SerenityFixtures, SerenityWorkerFixtures>({
930931
use: {
931932
trace: 'on-first-retry', // or 'on', 'retain-on-failure'
932933
},

src/docs/handbook/tutorials/your-first-web-scenario.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ In addition to the functionality offered by Playwright [`test`](https://playwrig
9090
wrapper offers [Serenity/JS-specific test fixtures](/api/playwright-test/interface/SerenityFixtures),
9191
such as [`actor`](/api/playwright-test/interface/SerenityFixtures#actor),
9292
[`actorCalled`](/api/playwright-test/interface/SerenityFixtures#actorCalled),
93-
or [`crew`](/api/playwright-test/interface/SerenityOptions/#crew).
93+
or [`crew`](/api/playwright-test/interface/SerenityFixtures/#crew).
9494
I'll tell you about them in a moment, but first, let's run the scenarios.
9595

9696

@@ -188,9 +188,9 @@ in non-headless mode by setting the `headless` flag to `false` in [Playwright Te
188188

189189
```typescript title="playwright.config.ts"
190190
import { defineConfig, devices } from '@playwright/test';
191-
import type { SerenityOptions } from '@serenity-js/playwright-test';
191+
import type { SerenityFixtures, SerenityWorkerFixtures } from '@serenity-js/playwright-test';
192192

193-
export default defineConfig<SerenityOptions>({
193+
export default defineConfig<SerenityFixtures, SerenityWorkerFixtures>({
194194
use: {
195195
headless: false,
196196
// ...
@@ -720,15 +720,15 @@ or on demand using the interaction to [`TakeScreenshot`](/api/web/class/TakeScre
720720
#### Automatic screenshots
721721

722722
To enable automatic screenshots, use your `playwright.config.ts` file to add the [`Photographer`](/api/web/class/Photographer/) to the Serenity/JS
723-
stage [`crew`](/api/playwright-test/interface/SerenityOptions/#crew) available in Playwright Test [worker processes](https://playwright.dev/docs/test-parallel),
723+
stage [`crew`](/api/playwright-test/interface/SerenityFixtures/#crew) available in Playwright Test [worker processes](https://playwright.dev/docs/test-parallel),
724724
and add the [`SerenityBDDReporter`](/api/serenity-bdd/class/SerenityBDDReporter/) and
725725
[`ArtifactArchiver`](/api/core/class/ArtifactArchiver/) to your reporter process:
726726

727727
```typescript title="playwright.config.ts"
728728
import { defineConfig, devices } from '@playwright/test';
729-
import type { SerenityOptions } from '@serenity-js/playwright-test';
729+
import type { SerenityFixtures, SerenityWorkerFixtures } from '@serenity-js/playwright-test';
730730

731-
export default defineConfig<SerenityOptions>({
731+
export default defineConfig<SerenityFixtures, SerenityWorkerFixtures>({
732732
reporter: [
733733
[ '@serenity-js/playwright-test', {
734734
crew: [

0 commit comments

Comments
 (0)