Skip to content

Commit e902fb9

Browse files
Improve assertion for field inline error messages
1 parent 712ba21 commit e902fb9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cypress/support/assertions/expect_alerts.js

Lines changed: 4 additions & 1 deletion
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);
167+
return cy
168+
.contains('#name-error-msg', containsText)
169+
.scrollIntoView()
170+
.should('be.visible');
168171
});

0 commit comments

Comments
 (0)