mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-26 17:16:11 -05:00
use class instead of id for identifying errorMsg in test
This commit is contained in:
parent
6e83c496c8
commit
f713298d37
2 changed files with 3 additions and 3 deletions
|
@ -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', () => {
|
||||||
};
|
};
|
||||||
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', () => {
|
||||||
};
|
};
|
||||||
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);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue