Skip to content

Commit

Permalink
chore: fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wainola committed Jun 4, 2024
1 parent b317ab0 commit fc726d8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,20 @@ export class FungibleTransferDetail extends BaseComponent {
render(): HTMLTemplateResult {
return html`
<section class="transferDetail">
${when(
this.fee !== null,
() =>
html` <div class="transferDetailContainer">
<div class="transferDetailContainerLabel">Amount to receive:</div>
<div class="transferDetailContainerValue">
${tokenBalanceToNumber(
this.amountToReceive,
this.selectedResource?.decimals as number
)}
${this.selectedResource?.symbol}
</div>
</div>`
)}
${when(
this.fee !== null,
() =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ describe('sygma-fungible-transfer-detail', function () {
.fee=${mockedFee}
.selectedResource=${mockedResource}
.sourceDomainConfig=${mockedSourceDomainConfig}
.amountToReceive=${constants.Zero}
></sygma-fungible-transfer-detail>
`);

Expand All @@ -79,11 +80,12 @@ describe('sygma-fungible-transfer-detail', function () {
.fee=${mockedFee}
.selectedResource=${mockedResource}
.sourceDomainConfig=${mockedSourceDomainConfig}
.amountToReceive=${parseUnits('12', 18)}
></sygma-fungible-transfer-detail>
`);

const transferDetail = el.shadowRoot!.querySelector(
'.transferDetailContainerValue'
'.transferDetail'
) as HTMLElement;

assert.include(transferDetail.innerHTML, value);
Expand All @@ -98,6 +100,7 @@ describe('sygma-fungible-transfer-detail', function () {
.selectedResource=${mockedResource}
.sourceDomainConfig=${mockedSourceDomainConfig}
.estimatedGasFee=${mockedEstimatedGas}
.amountToReceive=${constants.Zero}
></sygma-fungible-transfer-detail>
`);

Expand Down

0 comments on commit fc726d8

Please sign in to comment.