Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(serenity-bdd): upgraded Serenity BDD to 4.0.44
Serenity BDD 4.0.44 brings improved support for nested requirements reporting
- Loading branch information
Showing
9 changed files
with
70 additions
and
14 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
...gration/playwright-test/examples/my_super_theme/my_theme/my_capability/my_feature.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { describe, it } from '@serenity-js/playwright-test'; | ||
|
||
describe('My feature', () => { | ||
|
||
describe('A scenario', () => { | ||
|
||
it('passes', async ({ actorCalled }) => { | ||
// no-op, passing | ||
}); | ||
}); | ||
}); |
40 changes: 40 additions & 0 deletions
40
integration/playwright-test/spec/requirement_tag_reporting.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { expect, ifExitCodeIsOtherThan, logOutput, PickEvent } from '@integration/testing-tools'; | ||
import { Timestamp } from '@serenity-js/core'; | ||
import { SceneFinished, SceneFinishes, SceneStarts, SceneTagged, TestRunFinished, TestRunFinishes, TestRunnerDetected, TestRunStarts } from '@serenity-js/core/lib/events'; | ||
import { CorrelationId, ExecutionSuccessful, FeatureTag, Name } from '@serenity-js/core/lib/model'; | ||
import { describe, it } from 'mocha'; | ||
|
||
import { playwrightTest } from '../src/playwright-test'; | ||
|
||
describe('@serenity-js/playwright-test', function () { | ||
|
||
it('recognises a passing scenario', () => playwrightTest('--project=default', 'passing.spec.ts') | ||
.then(ifExitCodeIsOtherThan(0, logOutput)) | ||
.then(result => { | ||
|
||
expect(result.exitCode).to.equal(0); | ||
|
||
let currentSceneId: CorrelationId; | ||
|
||
PickEvent.from(result.events) | ||
.next(TestRunStarts, event => expect(event.timestamp).to.be.instanceof(Timestamp)) | ||
.next(SceneStarts, event => { | ||
expect(event.details.name).to.equal(new Name('A scenario passes')); | ||
currentSceneId = event.sceneId; | ||
}) | ||
.next(SceneTagged, event => expect(event.tag).to.equal(new FeatureTag('Playwright Test reporting'))) | ||
.next(TestRunnerDetected, event => expect(event.name).to.equal(new Name('Playwright'))) | ||
|
||
// triggered by requiring actorCalled | ||
.next(SceneFinishes, event => { | ||
expect(event.sceneId).to.equal(currentSceneId); | ||
}) | ||
.next(SceneFinished, event => { | ||
expect(event.sceneId).to.equal(currentSceneId); | ||
expect(event.outcome).to.equal(new ExecutionSuccessful()); | ||
}) | ||
.next(TestRunFinishes, event => expect(event.timestamp).to.be.instanceof(Timestamp)) | ||
.next(TestRunFinished, event => expect(event.timestamp).to.be.instanceof(Timestamp)) | ||
; | ||
})); | ||
}); |
5 changes: 2 additions & 3 deletions
5
...bdd/spec/stage/crew/SpecDirectory.spec.ts → packages/core/spec/io/SpecDirectory.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...ew/serenity-bdd-reporter/SpecDirectory.ts → packages/core/src/io/SpecDirectory.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters