fix(challenges): Corrected a test case for challenge (#17162)
For the last test case in 'Access Props using this.props' challenge, I updated the test condition to check that the value of the tempPassword prop is the same as the content within the <strong/> tags. This test case will ensure that there is text present in the strong tag and its value is as expected. BREAKING CHANGE: none Closes #17134pull/17269/head
parent
6315c6eae0
commit
7bde8f266e
|
@ -1325,7 +1325,7 @@
|
|||
},
|
||||
{
|
||||
"text": "The <code>ReturnTempPassword</code> component should display the password you create as the <code>tempPassword</code> prop within <code>strong</code> tags.",
|
||||
"testString": "assert((function() { const mockedComponent = Enzyme.mount(React.createElement(ResetPassword)); return mockedComponent.find('strong').text() && mockedComponent.find('ReturnTempPassword').props().tempPassword; })(), 'The <code>ReturnTempPassword</code> component should display the password you create as the <code>tempPassword</code> prop within <code>strong</code> tags.');"
|
||||
"testString": "assert((function() { const mockedComponent = Enzyme.mount(React.createElement(ResetPassword)); return mockedComponent.find('strong').text() === mockedComponent.find('ReturnTempPassword').props().tempPassword; })(), 'The <code>ReturnTempPassword</code> component should display the password you create as the <code>tempPassword</code> prop within <code>strong</code> tags.');"
|
||||
}
|
||||
],
|
||||
"solutions": [
|
||||
|
|
Loading…
Reference in New Issue