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 #17134
This commit is contained in:
manjeet5
2018-05-29 13:47:52 -04:00
committed by Quincy Larson
parent 2a3369aa6b
commit ff8b13b316

View File

@ -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.", "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": [ "solutions": [