Commit f713298d authored by Ben Wheeler's avatar Ben Wheeler

use class instead of id for identifying errorMsg in test

parent 6e83c496
...@@ -38,7 +38,7 @@ class RegistrationErrorStep extends React.Component { ...@@ -38,7 +38,7 @@ class RegistrationErrorStep extends React.Component {
<FormattedMessage id="registration.cantCreateAccount" /> <FormattedMessage id="registration.cantCreateAccount" />
</p> </p>
{this.props.errorMsg && ( {this.props.errorMsg && (
<p className="join-flow-instructions" id="registration-error-msg"> <p className="join-flow-instructions registration-error-msg">
{this.props.errorMsg} {this.props.errorMsg}
</p> </p>
)} )}
......
...@@ -33,7 +33,7 @@ describe('RegistrationErrorStep', () => { ...@@ -33,7 +33,7 @@ describe('RegistrationErrorStep', () => {
}; };
const joinFlowStepWrapper = getRegistrationErrorStepWrapper(props).find(JoinFlowStep); const joinFlowStepWrapper = getRegistrationErrorStepWrapper(props).find(JoinFlowStep);
const joinFlowStepInstance = joinFlowStepWrapper.dive(); const joinFlowStepInstance = joinFlowStepWrapper.dive();
const errMsgElement = joinFlowStepInstance.find('#registration-error-msg'); const errMsgElement = joinFlowStepInstance.find('.registration-error-msg');
expect(errMsgElement).toHaveLength(1); expect(errMsgElement).toHaveLength(1);
expect(errMsgElement.text()).toEqual('halp there is a errors!!'); expect(errMsgElement.text()).toEqual('halp there is a errors!!');
}); });
...@@ -45,7 +45,7 @@ describe('RegistrationErrorStep', () => { ...@@ -45,7 +45,7 @@ describe('RegistrationErrorStep', () => {
}; };
const joinFlowStepWrapper = getRegistrationErrorStepWrapper(props).find(JoinFlowStep); const joinFlowStepWrapper = getRegistrationErrorStepWrapper(props).find(JoinFlowStep);
const joinFlowStepInstance = joinFlowStepWrapper.dive(); const joinFlowStepInstance = joinFlowStepWrapper.dive();
const errMsgElement = joinFlowStepInstance.find('#registration-error-msg'); const errMsgElement = joinFlowStepInstance.find('.registration-error-msg');
expect(errMsgElement).toHaveLength(0); expect(errMsgElement).toHaveLength(0);
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment