Skip to content

Commit

Permalink
feat(frontend): review adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
DenysKarmazynDFINITY committed Nov 19, 2024
1 parent e410133 commit a0c1c0d
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
err
});
dispatch('icBack');
back();
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { WizardStepsConvert } from '$lib/enums/wizard-steps';
import { CONVERT_CONTEXT_KEY } from '$lib/stores/convert.store';
import type { Token } from '$lib/types/token';
import { mockBtcAddress, mockUtxosFee } from '$tests/mocks/btc.mock';
import en from '$tests/mocks/i18n.mock';
import { mockIdentity } from '$tests/mocks/identity.mock';
import { mockPage } from '$tests/mocks/page.store.mock';
import type { Identity } from '@dfinity/agent';
Expand Down Expand Up @@ -190,4 +191,34 @@ describe('BtcConvertTokenWizard', () => {

expect(spy).not.toHaveBeenCalled();
});

it('should render convert form if currentStep is CONVERT', () => {
const { getByTestId } = render(BtcConvertTokenWizard, {
props: {
...props,
currentStep: {
name: WizardStepsConvert.CONVERT,
title: 'test'
}
},
context: mockContext()
});

expect(getByTestId('convert-form-button-next')).toBeInTheDocument();
});

it('should render convert progress if currentStep is CONVERTING', () => {
const { container } = render(BtcConvertTokenWizard, {
props: {
...props,
currentStep: {
name: WizardStepsConvert.CONVERTING,
title: 'test'
}
},
context: mockContext()
});

expect(container).toHaveTextContent(en.core.warning.do_not_close);
});
});

0 comments on commit a0c1c0d

Please sign in to comment.