File tree Expand file tree Collapse file tree
test/e2e/helpers/pageObjectModels Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -691,7 +691,7 @@ export class BasePage extends BuiltInsPage {
691691
692692 this . _page . on ( 'response' , response => {
693693 const status = response . status ( )
694- if ( status >= 400 && status < 500 ) {
694+ if ( status === 404 ) {
695695 const method = response . request ( ) . method ( )
696696 const responseUrl = response . url ( )
697697 this . errors404 . push ( `${ status } ${ method } ${ responseUrl } ` )
@@ -916,11 +916,16 @@ export class BasePage extends BuiltInsPage {
916916 * Verify submit button is present and contains text
917917 */
918918 async expectSubmitButton ( text ?: string ) : Promise < void > {
919- const submitButton = this . _page . locator ( 'button[type="submit"]' )
920- await expect ( submitButton ) . toBeVisible ( )
919+ const submitButtons = this . _page . locator ( 'button[type="submit"]' )
920+
921921 if ( text ) {
922+ const submitButton = submitButtons . filter ( { hasText : text } ) . first ( )
923+ await expect ( submitButton ) . toBeVisible ( )
922924 await expect ( submitButton ) . toContainText ( text )
925+ return
923926 }
927+
928+ await expect ( submitButtons . first ( ) ) . toBeVisible ( )
924929 }
925930
926931 /**
You can’t perform that action at this time.
0 commit comments