Skip to content

Commit

Permalink
test(serenity-bdd): migrated integration tests to use Serenity BDD re…
Browse files Browse the repository at this point in the history
…porter builder

Related tickets: re #1147
  • Loading branch information
jan-molak committed Jan 8, 2024
1 parent c15c366 commit 8fc4f02
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
6 changes: 4 additions & 2 deletions integration/playwright-web/src/serenity.config.ts
@@ -1,6 +1,6 @@
import { TestRunnerTagger } from '@integration/testing-tools';
import { ArtifactArchiver, configure, Duration, NoOpDiffFormatter } from '@serenity-js/core';
import { SerenityBDDReporter } from '@serenity-js/serenity-bdd';
import { default as SerenityBDDReporter } from '@serenity-js/serenity-bdd';
import * as playwright from 'playwright-core';

import { Actors } from './Actors';
Expand All @@ -24,7 +24,9 @@ export const mochaHooks = {
new TestRunnerTagger('playwright'),
ArtifactArchiver.storingArtifactsAt(`${ process.cwd() }/target/site/serenity`),
// Photographer.whoWill(TakePhotosOfFailures),
new SerenityBDDReporter(),
SerenityBDDReporter({
specDirectory: './node_modules/@integration/web-specs/spec'
}),
// ConsoleReporter.forDarkTerminals(),
// new StreamReporter(fs.createWriteStream('./events.ndjson'))
]
Expand Down
6 changes: 4 additions & 2 deletions integration/protractor-web/protractor.conf.js
Expand Up @@ -2,7 +2,7 @@ const { TestRunnerTagger } = require('@integration/testing-tools');
const { ArtifactArchiver, NoOpDiffFormatter } = require('@serenity-js/core');
const { ConsoleReporter } = require('@serenity-js/console-reporter');
const { Photographer, TakePhotosOfFailures } = require('@serenity-js/web');
const { SerenityBDDReporter } = require('@serenity-js/serenity-bdd');
const SerenityBDDReporter = require('@serenity-js/serenity-bdd').default;

Check warning on line 5 in integration/protractor-web/protractor.conf.js

View check run for this annotation

codefactor.io / CodeFactor

integration/protractor-web/protractor.conf.js#L5

Require statement not part of import statement. (@typescript-eslint/no-var-requires)

const port = process.env.PORT || 8080;

Expand Down Expand Up @@ -34,7 +34,9 @@ exports.config = {
ArtifactArchiver.storingArtifactsAt(`${ process.cwd() }/target/site/serenity`),
// Photographer.whoWill(TakePhotosOfInteractions),
Photographer.whoWill(TakePhotosOfFailures),
new SerenityBDDReporter(),
SerenityBDDReporter({
specDirectory: '.'
}),
ConsoleReporter.forDarkTerminals(),
]
.concat(process.env.CI && ConsoleReporter.withDefaultColourSupport())
Expand Down
6 changes: 4 additions & 2 deletions integration/webdriverio-web/wdio.conf.ts
@@ -1,6 +1,6 @@
import { TestRunnerTagger } from '@integration/testing-tools';
import { ArtifactArchiver, Duration, NoOpDiffFormatter } from '@serenity-js/core';
import { SerenityBDDReporter } from '@serenity-js/serenity-bdd';
import { default as SerenityBDDReporter } from '@serenity-js/serenity-bdd';
import { Photographer, TakePhotosOfFailures } from '@serenity-js/web';
import { WebdriverIOConfig } from '@serenity-js/webdriverio';
import { cpus } from 'os';
Expand Down Expand Up @@ -82,7 +82,9 @@ export const config: WebdriverIOConfig = {
new TestRunnerTagger('webdriverio'),
ArtifactArchiver.storingArtifactsAt(`${ process.cwd() }/target/site/serenity`),
Photographer.whoWill(TakePhotosOfFailures),
new SerenityBDDReporter(),
SerenityBDDReporter({
specDirectory: '.'
}),
]
},

Expand Down

0 comments on commit 8fc4f02

Please sign in to comment.