File tree Expand file tree Collapse file tree 4 files changed +9
-8
lines changed
Expand file tree Collapse file tree 4 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 1- import { Before } from '@cucumber/cucumber' ;
2- import { engage } from '@serenity-js/core' ;
1+ import { setDefaultTimeout } from '@cucumber/cucumber' ;
32
4- import { Actors } from '../../../test/actors' ;
53import { TIME } from '../../../test/constants/datetime.ts' ;
64
7- Before ( { timeout : TIME . oneMinuteInMs } , ( ) => engage ( new Actors ( ) ) ) ;
5+ setDefaultTimeout ( TIME . tenSecsInMs ) ;
Original file line number Diff line number Diff line change @@ -31,4 +31,4 @@ Feature: Percy Visual Testing
3131 Perfect to have error logs and not loose yourself 😎
3232 Run the ```npm run test:visual``` command to see it in action.
3333
34- Then Percy ensures the fake element looks like the baseline "the-internet-login-form-element"
34+ Then Percy ensures the fake element looks like the baseline "the-internet-login-form-fake- element"
Original file line number Diff line number Diff line change 1- import { Actor , Cast } from '@serenity-js/core' ;
2- import { BrowseTheWeb } from '@serenity-js/web ' ;
1+ import { Actor , Cast } from '@serenity-js/core' ;
2+ import { BrowseTheWebWithWebdriverIO } from '@serenity-js/webdriverio ' ;
33
44import { TakePercyScreenshot } from '../abilities/percy-screenshot.ts' ;
55import { ACTOR_NAMES } from '../constants/actors.ts' ;
@@ -9,12 +9,13 @@ export class Actors implements Cast {
99 switch ( actor . name ) {
1010 case ACTOR_NAMES . Percy : {
1111 return actor . whoCan (
12+ BrowseTheWebWithWebdriverIO . using ( browser ) ,
1213 TakePercyScreenshot . using ( )
1314 ) ;
1415 }
1516 case ACTOR_NAMES . User : {
1617 return actor . whoCan (
17- BrowseTheWeb . as ( actor )
18+ BrowseTheWebWithWebdriverIO . using ( browser )
1819 ) ;
1920 }
2021 default : {
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import process from 'node:process';
33import { WebdriverIOConfig } from '@serenity-js/webdriverio' ;
44
55import { wdioConfigVariables } from './config/wdio/wdio-config-variables' ;
6+ import { Actors } from './test/actors' ;
67
78const configValues = wdioConfigVariables [ process . env . EXEC_MODE ] ;
89
@@ -17,6 +18,7 @@ export const config: WebdriverIOConfig = {
1718 framework : '@serenity-js/webdriverio' ,
1819
1920 serenity : {
21+ actors : new Actors ( ) ,
2022 // Use Cucumber.js test runner adapter
2123 // see: https://serenity-js.org/api/cucumber/
2224 runner : 'cucumber' ,
You can’t perform that action at this time.
0 commit comments