From 0645ed47123f742faa2e110bc6daf1f2320dedd8 Mon Sep 17 00:00:00 2001 From: Khushboo Mehta Date: Fri, 14 Jun 2024 13:34:20 +0200 Subject: [PATCH] fix(@desktop/wallet): solving the issues with SwapInputPanel list in the issue fixes #15162 --- storybook/pages/ErrorTagPage.qml | 5 + storybook/pages/SwapInputPanelPage.qml | 22 +- storybook/qmlTests/tests/tst_ErrorTag.qml | 1 + .../qmlTests/tests/tst_SwapInputPanel.qml | 191 ++++++++++++++++-- storybook/qmlTests/tests/tst_SwapModal.qml | 118 +++++------ .../Wallet/panels/SwapInputPanel.qml | 21 +- .../Wallet/popups/swap/SwapModal.qml | 21 +- ui/imports/shared/controls/ErrorTag.qml | 3 +- .../shared/popups/send/views/AmountToSend.qml | 29 +-- 9 files changed, 288 insertions(+), 123 deletions(-) diff --git a/storybook/pages/ErrorTagPage.qml b/storybook/pages/ErrorTagPage.qml index dabc31820..259012c89 100644 --- a/storybook/pages/ErrorTagPage.qml +++ b/storybook/pages/ErrorTagPage.qml @@ -27,6 +27,7 @@ SplitView { anchors.centerIn: parent text: ctrlText.text buttonText: ctrlButtonText.text + buttonVisible: buttonVisible.checked asset.name: ctrlAssetName.text loading: ctrlLoading.checked onButtonClicked: logs.logEvent("ErrorTag::onButtonClicked", [], arguments) @@ -85,6 +86,10 @@ SplitView { id: ctrlLoading text: "Loading" } + Switch { + id: buttonVisible + text: "Button Visible" + } Item { Layout.fillHeight: true } } } diff --git a/storybook/pages/SwapInputPanelPage.qml b/storybook/pages/SwapInputPanelPage.qml index 51320ffc4..a18d61f0e 100644 --- a/storybook/pages/SwapInputPanelPage.qml +++ b/storybook/pages/SwapInputPanelPage.qml @@ -86,7 +86,8 @@ SplitView { swapSide: SwapInputPanel.SwapSide.Pay fiatInputInteractive: ctrlFiatInputInteractive.checked swapExchangeButtonWidth: swapButton.width - loading: ctrlLoading.checked + mainInputLoading: ctrlMainInputLoading.checked + bottomTextLoading: ctrlBottomTextLoading.checked } SwapInputPanel { @@ -107,7 +108,8 @@ SplitView { swapSide: SwapInputPanel.SwapSide.Receive fiatInputInteractive: ctrlFiatInputInteractive.checked swapExchangeButtonWidth: swapButton.width - loading: ctrlLoading.checked + mainInputLoading: ctrlMainInputLoading.checked + bottomTextLoading: ctrlBottomTextLoading.checked } SwapExchangeButton { @@ -191,8 +193,12 @@ SplitView { checked: false } Switch { - id: ctrlLoading - text: "Loading" + id: ctrlMainInputLoading + text: "mainInputLoading" + } + Switch { + id: ctrlBottomTextLoading + text: "bottomTextLoading" } Label { @@ -200,16 +206,16 @@ SplitView { font.weight: Font.Medium text: "Pay: