Skip to content

Commit ba85349

Browse files
authored
Merge pull request #9694 from asirvadAbrahamVarghese/enhance-expect-alerts-command
Enhance expect alerts command
2 parents 076cc7a + 7f4ae52 commit ba85349

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

cypress/support/assertions/expect_alerts.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,5 +164,8 @@ Cypress.Commands.add('expect_inline_field_errors', ({ containsText }) => {
164164
if (!containsText) {
165165
cy.logAndThrowError('containsText is required');
166166
}
167-
return cy.contains('#name-error-msg', containsText);
168-
});
167+
return cy
168+
.contains('#name-error-msg', containsText)
169+
.scrollIntoView()
170+
.should('be.visible');
171+
});

0 commit comments

Comments
 (0)