File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ const clickOnFlow = createFlow<ClickAction>({
5252
5353 onError : ( _ , step ) => {
5454 const targetDescription = clickOnDescription ( step ) ;
55- throw new ElementNotFoundError ( `Element missing: ${ targetDescription } ` ) ;
55+ return new ElementNotFoundError ( `Element missing: ${ targetDescription } ` ) ;
5656 } ,
5757} ) ;
5858
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ const isDisabledFlow = createFlow<IsDisabledAction>({
5151 } ,
5252 onError ( _ , step ) {
5353 const targetDescription = isDisableDescription ( step ) ;
54- throw new FailedAssertionError ( `Assertion failed: ${ targetDescription } ` ) ;
54+ return new FailedAssertionError ( `Assertion failed: ${ targetDescription } ` ) ;
5555 } ,
5656} ) ;
5757
Original file line number Diff line number Diff line change @@ -36,6 +36,6 @@ export default async function isNotVisibleFlow({
3636 isNotVisibleSpiner . stop (
3737 `${ chalk . red ( "✖" ) } isNotVisible: Element is visible with ${ targetDescription } ` ,
3838 ) ;
39- throw new FailedAssertionError ( `Assertion failed: ${ targetDescription } ` ) ;
39+ return new FailedAssertionError ( `Assertion failed: ${ targetDescription } ` ) ;
4040 }
4141}
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ const isTitleFlow = createFlow<IsTitleAction>({
2626 } ,
2727 onError ( _ , step ) {
2828 const { value : titleOrRegex } = regexOrStringMaker ( step . isTitle ) ;
29- throw new FailedAssertionError ( `Assertion failed: ${ titleOrRegex } ` ) ;
29+ return new FailedAssertionError ( `Assertion failed: ${ titleOrRegex } ` ) ;
3030 } ,
3131} ) ;
3232export default isTitleFlow ;
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ const isURLFlow = createFlow<IsURLAction>({
3232
3333 onError ( _ , step ) {
3434 const { value : titleOrRegex } = regexOrStringMaker ( step . isURL ) ;
35- throw new FailedAssertionError ( `Assertion failed: ${ titleOrRegex } ` ) ;
35+ return new FailedAssertionError ( `Assertion failed: ${ titleOrRegex } ` ) ;
3636 } ,
3737} ) ;
3838
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ const isVisibleFlow = createFlow<IsVisibleAction>({
5050 } ,
5151 onError ( _ , step ) {
5252 const targetDescription = isVisisbleDescription ( step ) ;
53- throw new FailedAssertionError ( `Assertion failed: ${ targetDescription } ` ) ;
53+ return new FailedAssertionError ( `Assertion failed: ${ targetDescription } ` ) ;
5454 } ,
5555} ) ;
5656
You can’t perform that action at this time.
0 commit comments