You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/docs/handbook/test-runners/playwright-test.mdx
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,13 +15,11 @@ with **their unique domain**. Seamlessly integrating with Playwright and Playwri
15
15
Serenity/JS also offers **advanced reporting** that provides clear insights into test results,
16
16
aiding both technical teams and business stakeholders in assessing system quality.
17
17
18
-
19
18
**Benefits of integrating Playwright Test with Serenity/JS:**
20
19
21
20
-[Enhanced Reporting](/handbook/reporting/) – Use Serenity/JS to augment [Playwright Test reports](#reporting) and generate living documentation with [Serenity BDD](/handbook/reporting/serenity-bdd-reporter/).
22
21
-[Reusable Code](/handbook/design/screenplay-pattern/) – Leverage the [Screenplay Pattern](/handbook/design/screenplay-pattern/) to write maintainable test code, facilitate collaboration, and implement multi-actor, multi-interface test scenarios.
23
-
-[Integration Libraries](/api/) – Interact seamlessly with [REST APIs](/api/rest/), [local Node.js servers](/api/local-server/), and verify [complex workflows](/api/assertions/) using prebuilt integration libraries.
24
-
22
+
-[Integration Libraries](/api/) – Interact seamlessly with [REST APIs](/api/rest/), [local Node.js servers](/api/local-server/), and verify [complex workflows](/api/assertions/) with ready-to-use integration libraries.
Copy file name to clipboardExpand all lines: src/docs/handbook/test-runners/protractor.mdx
+11-13Lines changed: 11 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -265,7 +265,7 @@ This configuration enables the [`@serenity-js/protractor`](/api/protractor/) tes
265
265
-[Artifact Archiver](/handbook/reporting/artifact-archiver/) - Stores the `json` reports and screenshots captured by the Photographer to disk.
266
266
267
267
Note that the above configuration assumes the following directory structure of your project:
268
-
-`./spec` - stores your test scenarios and is the top-most directory of your [requirements hierarchy](/handbook/reporting/serenity-bdd-reporter/#the-requirements-hierarchy).
268
+
-`./spec`or `./features`- stores your test scenarios and is the top-most directory of your [requirements hierarchy](/handbook/reporting/serenity-bdd-reporter/#the-requirements-hierarchy).
269
269
-`./target/site/serenity` - stores any test report artifacts, like the `.json` files and screenshots.
270
270
271
271
If you'd like to use different locations for your tests or the test reports, adjust the `specDirectory` and `outputDirectory` settings accordingly.
@@ -300,9 +300,10 @@ The most commonly used Screenplay Pattern APIs come from the following modules:
-[`@serenity-js/core`](/api/core) - Provides interface-agnostic interactions, such as [waiting and synchronisation](/handbook/design/waiting-and-synchronisation/), [control flow](/handbook/design/control-flow/), or [logging](/handbook/design/logging/).
302
302
303
-
304
303
### Using actors in test scenarios
305
304
305
+
A test scenario following the Screenplay Pattern models workflows of one or multiple [actors](/api/core/class/Actor/) representing people and external systems interacting with the system under test.
306
+
306
307
When you configure [Serenity/JS Protractor](/api/protractor)
307
308
as the [Protractor `framework`](/handbook/test-runners/protractor#configuring-serenityjs),
308
309
Serenity/JS automatically creates and makes available a default [cast](/api/core/class/Cast) of [actors](/api/core/class/Actor/),
@@ -312,10 +313,13 @@ where every actor has the abilities to:
312
313
-[`CallAnApi`](/api/rest/class/CallAnApi/) - Enables interaction with RESTful APIs using an Axios HTTP client configured
313
314
with configured with `baseUrl`.
314
315
315
-
To use an actor in your Protractor test scenario, refer to it using the
316
-
[`actorCalled`](/api/core/function/actorCalled) function, which returns an instance of the actor with the given name,
317
-
or use the [`actorInTheSpotlight`](/api/core/function/actorInTheSpotlight) function to refer to the last accessed actor.
318
-
All the default actors already have access to the Protractor-managed browser instance.
316
+
:::tip Overriding abilities
317
+
An actor can only have **one instance of each ability** type at a time.
318
+
Therefore, providing a new instance of the same type via the [`actor.whoCan`](/api/core/class/Actor/#whoCan) method overrides any existing ability of that type
319
+
:::
320
+
321
+
To use an actor in your test scenario, refer to it using the [`actorCalled`](/api/core/function/actorCalled/) or [`actorInTheSpotlight`](/api/core/function/actorInTheSpotlight/) functions
322
+
and they'll automatically use the configured cast of actors to create or retrieve the actor you need.
An actor can only have **one instance of each ability** type at a time.
347
-
Therefore, providing a new instance of the same type via the [`actor.whoCan`](/api/core/class/Actor/#whoCan) method overrides any existing ability of that type
348
-
:::
349
-
350
349
Since Protractor uses Jasmine, Mocha, or Cucumber to run your test scenarios, please refer to their
351
350
dedicated guides to learn more about using Serenity/JS actors with:
0 commit comments