Fix Ethereum tests (#796)
This commit is contained in:
parent
b9e7c37944
commit
f9154379eb
@ -58,15 +58,16 @@ describe('Account component', () => {
|
||||
expect(wrapper.find('.genesisSelection').exists()).toBe(true);
|
||||
});
|
||||
|
||||
it('does not show Derive option if account is of ethereum type', async () => {
|
||||
it('shows Derive option if account is of ethereum type', async () => {
|
||||
wrapper = mountAccountComponent({ isExternal: false, type: 'ethereum' });
|
||||
wrapper.find('.settings').first().simulate('click');
|
||||
await act(flushAllPromises);
|
||||
|
||||
expect(wrapper.find('a.menuItem').length).toBe(3);
|
||||
expect(wrapper.find('a.menuItem').length).toBe(4);
|
||||
expect(wrapper.find('a.menuItem').at(0).text()).toBe('Rename');
|
||||
expect(wrapper.find('a.menuItem').at(1).text()).toBe('Export Account');
|
||||
expect(wrapper.find('a.menuItem').at(2).text()).toBe('Forget Account');
|
||||
expect(wrapper.find('a.menuItem').at(1).text()).toBe('Derive New Account');
|
||||
expect(wrapper.find('a.menuItem').at(2).text()).toBe('Export Account');
|
||||
expect(wrapper.find('a.menuItem').at(3).text()).toBe('Forget Account');
|
||||
expect(wrapper.find('.genesisSelection').exists()).toBe(true);
|
||||
});
|
||||
|
||||
|
||||
@ -238,7 +238,7 @@ describe('Derive', () => {
|
||||
it('selects internal root accounts as other options, no external and no Ethereum account', () => {
|
||||
const options = wrapper.find('[data-parent-option] [data-field="name"]').map((el) => el.text());
|
||||
|
||||
expect(options).toEqual(['A', 'B', 'D']);
|
||||
expect(options).toEqual(['A', 'B', 'D', 'Ethereum']);
|
||||
});
|
||||
|
||||
it('redirects to derive from next account when other option is selected', () => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user