Skip to content
Permalink
Browse files
feat(core): Cross-scenario Actors + improved Ability lifecycle manage…
…ment (version bump)

Actors can be used in `beforeAll`/`afterAll`-style hooks of your favourite test framework.
This means that you can, for example, have an actor that spins up a server that keeps running throughout
the entire test suite execution.

You can also share notes between actors instantiated in `beforeAll`, `before` and within a test method using
the ability to [`TakeNotes.usingASharedNotepad`](https://serenity-js.org/modules/core/class/src/screenplay/abilities/TakeNotes.ts~TakeNotes.html)

And [`Discardable`](https://serenity-js.org/modules/core/class/src/screenplay/Discardable.ts~Discardable.html) that an actor has been given will be discarded:
- after test scenario, if the actor was instantiated in `beforeEach`-style hook or within a scenario
- after test run is finished, if the actor was instantiated in `beforeAll`-style hook

This commit also removes several [deprecated APIs](https://serenity-js.org/handbook/integration/versioning.html#deprecated-apis):
- Serenity#setTheStage(...stageCrewMembers: StageCrewMember[]): void - use [`configure`](https://serenity-js.org/modules/core/function/index.html#static-function-configure)
- Serenity#callToStageFor(actors: Cast): Stage - use [`engage`](https://serenity-js.org/modules/core/function/index.html#static-function-engage)
- Stage#callFor(actors: Cast): Stage - use [`actorCalled`](https://serenity-js.org/modules/core/function/index.html#static-function-actorCalled) and [`actorInTheSpotlight`]https://serenity-js.org/modules/core/function/index.html#static-function-actorInTheSpotlight()
- Actor.named(name: string): Actor - use [`actorCalled`](https://serenity-js.org/modules/core/function/index.html#static-function-actorCalled)
  • Loading branch information
jan-molak committed Nov 17, 2020
1 parent cc2b707 commit 5f30cc2583e706f1527f47dee265fe570603e9a6
Show file tree
Hide file tree
Showing 36 changed files with 198 additions and 223 deletions.
@@ -1,6 +1,6 @@
{
"name": "@documentation/esdoc-external-docs-plugin",
"version": "2.17.16",
"version": "2.17.6",
"description": "An ESDoc plugin to make it easier for the docs to be shared across modules",
"author": {
"name": "Jan Molak",
@@ -39,7 +39,7 @@
"rimraf": "^3.0.2"
},
"devDependencies": {
"@integration/testing-tools": "2.17.16",
"@integration/testing-tools": "2.17.6",
"esdoc": "^1.1.0"
},
"main": "src/Plugin.js"
@@ -1,6 +1,6 @@
{
"name": "@documentation/esdoc-template",
"version": "2.17.16",
"version": "2.17.6",
"description": "Serenity/JS API documentation template",
"author": {
"name": "Jan Molak",
@@ -1,6 +1,6 @@
{
"name": "@documentation/esdoc-typescript-plugin",
"version": "2.17.16",
"version": "2.17.6",
"description": "A TypeScript plugin for ESDoc",
"author": {
"name": "Jan Molak",
@@ -39,7 +39,7 @@
"typescript": "^4.0.2"
},
"devDependencies": {
"@integration/testing-tools": "2.17.16",
"@integration/testing-tools": "2.17.6",
"esdoc": "^1.1.0"
},
"main": "src/Plugin.js"
@@ -1,6 +1,6 @@
{
"name": "@documentation/website",
"version": "2.17.16",
"version": "2.17.6",
"description": "Serenity/JS API documentation template",
"author": {
"name": "Jan Molak",
@@ -36,16 +36,16 @@
"npm": ">= 6"
},
"devDependencies": {
"@serenity-js/assertions": "2.17.16",
"@serenity-js/console-reporter": "2.17.16",
"@serenity-js/core": "2.17.16",
"@serenity-js/cucumber": "2.17.16",
"@serenity-js/jasmine": "2.17.16",
"@serenity-js/local-server": "2.17.16",
"@serenity-js/mocha": "2.17.16",
"@serenity-js/protractor": "2.17.16",
"@serenity-js/rest": "2.17.16",
"@serenity-js/serenity-bdd": "2.17.16",
"@serenity-js/assertions": "2.17.6",
"@serenity-js/console-reporter": "2.17.6",
"@serenity-js/core": "2.17.6",
"@serenity-js/cucumber": "2.17.6",
"@serenity-js/jasmine": "2.17.6",
"@serenity-js/local-server": "2.17.6",
"@serenity-js/mocha": "2.17.6",
"@serenity-js/protractor": "2.17.6",
"@serenity-js/rest": "2.17.6",
"@serenity-js/serenity-bdd": "2.17.6",
"cheerio": "^1.0.0-rc.3",
"clean-css": "^4.2.3",
"glob": "^7.1.6",
@@ -1,6 +1,6 @@
{
"name": "@serenity-js-examples/calculator-app",
"version": "2.17.16",
"version": "2.17.6",
"description": "An example of a full-stack app under test",
"author": {
"name": "Jan Molak",
@@ -1,6 +1,6 @@
{
"name": "@serenity-js-examples/cucumber-domain-level-testing",
"version": "2.17.16",
"version": "2.17.6",
"description": "Example implementation",
"author": {
"name": "Jan Molak",
@@ -36,13 +36,13 @@
"npm": ">= 6"
},
"devDependencies": {
"@serenity-js-examples/calculator-app": "2.17.16",
"@serenity-js/assertions": "2.17.16",
"@serenity-js/console-reporter": "2.17.16",
"@serenity-js/core": "2.17.16",
"@serenity-js/cucumber": "2.17.16",
"@serenity-js/rest": "2.17.16",
"@serenity-js/serenity-bdd": "2.17.16",
"@serenity-js-examples/calculator-app": "2.17.6",
"@serenity-js/assertions": "2.17.6",
"@serenity-js/console-reporter": "2.17.6",
"@serenity-js/core": "2.17.6",
"@serenity-js/cucumber": "2.17.6",
"@serenity-js/rest": "2.17.6",
"@serenity-js/serenity-bdd": "2.17.6",
"@types/cucumber": "^6.0.1",
"cucumber": "^6.0.5",
"npm-failsafe": "^0.4.1",
@@ -1,6 +1,6 @@
{
"name": "@serenity-js-examples/cucumber-reporting",
"version": "2.17.16",
"version": "2.17.6",
"description": "Example implementation",
"author": {
"name": "Jan Molak",
@@ -36,11 +36,11 @@
"npm": ">= 6"
},
"devDependencies": {
"@serenity-js/console-reporter": "2.17.16",
"@serenity-js/core": "2.17.16",
"@serenity-js/cucumber": "2.17.16",
"@serenity-js/rest": "2.17.16",
"@serenity-js/serenity-bdd": "2.17.16",
"@serenity-js/console-reporter": "2.17.6",
"@serenity-js/core": "2.17.6",
"@serenity-js/cucumber": "2.17.6",
"@serenity-js/rest": "2.17.6",
"@serenity-js/serenity-bdd": "2.17.6",
"@types/cucumber": "^6.0.1",
"cucumber": "^6.0.5",
"npm-failsafe": "^0.4.1",
@@ -1,6 +1,6 @@
{
"name": "@serenity-js-examples/cucumber-rest-api-level-testing",
"version": "2.17.16",
"version": "2.17.6",
"description": "Example implementation of a test suite exercising a REST interface",
"author": {
"name": "Jan Molak",
@@ -36,14 +36,14 @@
"npm": ">= 6"
},
"devDependencies": {
"@serenity-js-examples/calculator-app": "2.17.16",
"@serenity-js/assertions": "2.17.16",
"@serenity-js/console-reporter": "2.17.16",
"@serenity-js/core": "2.17.16",
"@serenity-js/cucumber": "2.17.16",
"@serenity-js/local-server": "2.17.16",
"@serenity-js/rest": "2.17.16",
"@serenity-js/serenity-bdd": "2.17.16",
"@serenity-js-examples/calculator-app": "2.17.6",
"@serenity-js/assertions": "2.17.6",
"@serenity-js/console-reporter": "2.17.6",
"@serenity-js/core": "2.17.6",
"@serenity-js/cucumber": "2.17.6",
"@serenity-js/local-server": "2.17.6",
"@serenity-js/rest": "2.17.6",
"@serenity-js/serenity-bdd": "2.17.6",
"@types/cucumber": "^6.0.1",
"@types/express": "^4.17.6",
"@types/mocha": "^8.0.0",
@@ -1,6 +1,6 @@
{
"name": "@serenity-js-examples/mocha-rest-api-level-testing",
"version": "2.17.16",
"version": "2.17.6",
"description": "Example implementation of a test suite exercising a REST interface",
"author": {
"name": "Jan Molak",
@@ -36,14 +36,14 @@
"npm": ">= 6"
},
"devDependencies": {
"@serenity-js-examples/calculator-app": "2.17.16",
"@serenity-js/assertions": "2.17.16",
"@serenity-js/console-reporter": "2.17.16",
"@serenity-js/core": "2.17.16",
"@serenity-js/local-server": "2.17.16",
"@serenity-js/mocha": "2.17.16",
"@serenity-js/rest": "2.17.16",
"@serenity-js/serenity-bdd": "2.17.16",
"@serenity-js-examples/calculator-app": "2.17.6",
"@serenity-js/assertions": "2.17.6",
"@serenity-js/console-reporter": "2.17.6",
"@serenity-js/core": "2.17.6",
"@serenity-js/local-server": "2.17.6",
"@serenity-js/mocha": "2.17.6",
"@serenity-js/rest": "2.17.6",
"@serenity-js/serenity-bdd": "2.17.6",
"@types/express": "^4.17.6",
"@types/mocha": "^8.0.0",
"express": "^4.17.1",
@@ -1,6 +1,6 @@
{
"name": "@serenity-js-examples/protractor-cucumber",
"version": "2.17.16",
"version": "2.17.6",
"description": "Example implementation of a test suite using Protractor and Cucumber to exercise a Web interface",
"author": {
"name": "Jan Molak",
@@ -36,14 +36,14 @@
"npm": ">= 6"
},
"devDependencies": {
"@serenity-js/assertions": "2.17.16",
"@serenity-js/console-reporter": "2.17.16",
"@serenity-js/core": "2.17.16",
"@serenity-js/cucumber": "2.17.16",
"@serenity-js/local-server": "2.17.16",
"@serenity-js/protractor": "2.17.16",
"@serenity-js/rest": "2.17.16",
"@serenity-js/serenity-bdd": "2.17.16",
"@serenity-js/assertions": "2.17.6",
"@serenity-js/console-reporter": "2.17.6",
"@serenity-js/core": "2.17.6",
"@serenity-js/cucumber": "2.17.6",
"@serenity-js/local-server": "2.17.6",
"@serenity-js/protractor": "2.17.6",
"@serenity-js/rest": "2.17.6",
"@serenity-js/serenity-bdd": "2.17.6",
"@types/cucumber": "^6.0.1",
"@types/express": "^4.17.6",
"chromedriver": "^86.0.0",
@@ -1,6 +1,6 @@
{
"name": "@serenity-js-examples/protractor-jasmine-todomvc",
"version": "2.17.16",
"version": "2.17.6",
"description": "Example implementation of a test suite using Protractor and Jasmine to exercise a Web interface",
"author": {
"name": "Jan Molak",
@@ -36,13 +36,13 @@
"npm": ">= 6"
},
"devDependencies": {
"@serenity-js/assertions": "2.17.16",
"@serenity-js/console-reporter": "2.17.16",
"@serenity-js/core": "2.17.16",
"@serenity-js/jasmine": "2.17.16",
"@serenity-js/protractor": "2.17.16",
"@serenity-js/rest": "2.17.16",
"@serenity-js/serenity-bdd": "2.17.16",
"@serenity-js/assertions": "2.17.6",
"@serenity-js/console-reporter": "2.17.6",
"@serenity-js/core": "2.17.6",
"@serenity-js/jasmine": "2.17.6",
"@serenity-js/protractor": "2.17.6",
"@serenity-js/rest": "2.17.6",
"@serenity-js/serenity-bdd": "2.17.6",
"@types/jasmine": "^3.5.10",
"chromedriver": "^86.0.0",
"npm-failsafe": "^0.4.1",
@@ -1,6 +1,6 @@
{
"name": "@serenity-js-examples/protractor-jasmine",
"version": "2.17.16",
"version": "2.17.6",
"description": "Example implementation of a test suite using Protractor and Jasmine to exercise a Web interface",
"author": {
"name": "Jan Molak",
@@ -36,14 +36,14 @@
"npm": ">= 6"
},
"devDependencies": {
"@serenity-js/assertions": "2.17.16",
"@serenity-js/console-reporter": "2.17.16",
"@serenity-js/core": "2.17.16",
"@serenity-js/jasmine": "2.17.16",
"@serenity-js/local-server": "2.17.16",
"@serenity-js/protractor": "2.17.16",
"@serenity-js/rest": "2.17.16",
"@serenity-js/serenity-bdd": "2.17.16",
"@serenity-js/assertions": "2.17.6",
"@serenity-js/console-reporter": "2.17.6",
"@serenity-js/core": "2.17.6",
"@serenity-js/jasmine": "2.17.6",
"@serenity-js/local-server": "2.17.6",
"@serenity-js/protractor": "2.17.6",
"@serenity-js/rest": "2.17.6",
"@serenity-js/serenity-bdd": "2.17.6",
"@types/express": "^4.17.6",
"@types/jasmine": "^3.5.10",
"chromedriver": "^86.0.0",
@@ -1,6 +1,6 @@
{
"name": "@serenity-js-examples/protractor-mocha",
"version": "2.17.16",
"version": "2.17.6",
"description": "Example implementation of a test suite using Protractor and Mocha to exercise a Web interface",
"author": {
"name": "Jan Molak",
@@ -36,14 +36,14 @@
"npm": ">= 6"
},
"devDependencies": {
"@serenity-js/assertions": "2.17.16",
"@serenity-js/console-reporter": "2.17.16",
"@serenity-js/core": "2.17.16",
"@serenity-js/local-server": "2.17.16",
"@serenity-js/mocha": "2.17.16",
"@serenity-js/protractor": "2.17.16",
"@serenity-js/rest": "2.17.16",
"@serenity-js/serenity-bdd": "2.17.16",
"@serenity-js/assertions": "2.17.6",
"@serenity-js/console-reporter": "2.17.6",
"@serenity-js/core": "2.17.6",
"@serenity-js/local-server": "2.17.6",
"@serenity-js/mocha": "2.17.6",
"@serenity-js/protractor": "2.17.6",
"@serenity-js/rest": "2.17.6",
"@serenity-js/serenity-bdd": "2.17.6",
"@types/express": "^4.17.6",
"@types/mocha": "^8.0.0",
"chromedriver": "^86.0.0",
@@ -1,6 +1,6 @@
{
"name": "@integration/cucumber-1-runner",
"version": "2.17.16",
"version": "2.17.6",
"description": "Cucumber JS 1.x test runner",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
@@ -33,9 +33,9 @@
"npm": ">= 6"
},
"dependencies": {
"@integration/testing-tools": "2.17.16",
"@serenity-js/core": "2.17.16",
"@serenity-js/cucumber": "2.17.16",
"@integration/testing-tools": "2.17.6",
"@serenity-js/core": "2.17.6",
"@serenity-js/cucumber": "2.17.6",
"cucumber": "1.3.3"
},
"devDependencies": {
@@ -1,6 +1,6 @@
{
"name": "@integration/cucumber-2-runner",
"version": "2.17.16",
"version": "2.17.6",
"description": "Cucumber JS 2.x test runner",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
@@ -33,9 +33,9 @@
"npm": ">= 6"
},
"dependencies": {
"@integration/testing-tools": "2.17.16",
"@serenity-js/core": "2.17.16",
"@serenity-js/cucumber": "2.17.16",
"@integration/testing-tools": "2.17.6",
"@serenity-js/core": "2.17.6",
"@serenity-js/cucumber": "2.17.6",
"cucumber": "2.3.1"
},
"devDependencies": {
@@ -1,6 +1,6 @@
{
"name": "@integration/cucumber-3-runner",
"version": "2.17.16",
"version": "2.17.6",
"description": "Cucumber JS 3.x test runner",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
@@ -33,9 +33,9 @@
"npm": ">= 6"
},
"dependencies": {
"@integration/testing-tools": "2.17.16",
"@serenity-js/core": "2.17.16",
"@serenity-js/cucumber": "2.17.16",
"@integration/testing-tools": "2.17.6",
"@serenity-js/core": "2.17.6",
"@serenity-js/cucumber": "2.17.6",
"cucumber": "3.2.1"
},
"devDependencies": {

0 comments on commit 5f30cc2

Please sign in to comment.