You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add tests to verify error messages thrown by commands
* Remove jest/valid-expect from eslintConfig
Cypress uses chai for assertion causing the lint to fail
* Add contributor
* Update dom-testing-library to 3.12.4
* Lock cypress version to 3.1.1
* Update failing snapshot due to dom-testing-library upgrade
it('getByTestId only throws the error message',()=>{
51
+
consttestId='Some random id'
52
+
consterrorMessage=`Unable to find an element by: [data-testid="${testId}"]`
53
+
cy.on('fail',err=>{
54
+
expect(err.message).to.eq(errorMessage)
55
+
})
56
+
57
+
cy.getByTestId(testId).click()
58
+
})
59
+
60
+
it('getByText only throws the error message',()=>{
61
+
consttext='Some random text'
62
+
consterrorMessage=`Unable to find an element with the text: ${text}. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.`
0 commit comments