Skip to content

Commit

Permalink
✅ Add test to check if followDropdown is being opened
Browse files Browse the repository at this point in the history
  • Loading branch information
massao committed Feb 21, 2019
1 parent c0b6810 commit 608c2e7
Showing 1 changed file with 22 additions and 0 deletions.
Expand Up @@ -73,4 +73,26 @@ describe('Transactions Overview Header', () => {
expect(wrapper.find('.requestContainer')).to.not.have.descendants('.show');
});
});

describe('Another user wallet', () => {
const anotherUserProps = {
...props,
address: accounts.delegate.address,
match: { urls: `${routes.accounts.pathPrefix}${routes.accounts.path}/${accounts.delegate.address}` },
};

beforeEach(() => {
wrapper = mount(<MemoryRouter>
<TransactionHeader {...anotherUserProps} />
</MemoryRouter>, options);
});

it('Should toggle bookmark dropdown', () => {
expect(wrapper.find('.follow-account')).to.not.have.descendants('.show');
wrapper.find('.follow-account button').first().simulate('click');
expect(wrapper.find('.follow-account')).to.have.descendants('.show');
wrapper.find('.follow-account button').first().simulate('click');
expect(wrapper.find('.follow-account')).to.not.have.descendants('.show');
});
});
});

0 comments on commit 608c2e7

Please sign in to comment.