mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-03-23 19:30:34 -04:00
adds modal link click test
This commit is contained in:
parent
e57a60eb08
commit
95f493dae8
1 changed files with 13 additions and 0 deletions
|
@ -31,6 +31,19 @@ describe('Modal', () => {
|
|||
expect(component.find('div.modal-right-content').text()).toContain(testEmail);
|
||||
});
|
||||
|
||||
test('Clicking on Text changes to tips page', () => {
|
||||
const component = mountWithIntl(
|
||||
<EmailConfirmationModal
|
||||
isOpen
|
||||
/>, {email: testEmail, context: {store: defaultStore}}
|
||||
);
|
||||
|
||||
const tipsLinkWrapper = component.find({id: 'registration.emailConfirmationModalHavingTrouble'});
|
||||
const tipsLink = mountWithIntl(tipsLinkWrapper.instance().props.values.TipsLink);
|
||||
tipsLink.simulate('click');
|
||||
expect(component.text()).toContain('emailConfirmationModalHeader2');
|
||||
});
|
||||
|
||||
test('Close button shows correctly', () => {
|
||||
const component = mountWithIntl(
|
||||
<EmailConfirmationModal />, {context: {store: defaultStore}}
|
||||
|
|
Loading…
Add table
Reference in a new issue