diff --git a/storybook/qmlTests/tests/tst_DAppsWorkflow.qml b/storybook/qmlTests/tests/tst_DAppsWorkflow.qml index 47fd6d79f6..2f72c43dc3 100644 --- a/storybook/qmlTests/tests/tst_DAppsWorkflow.qml +++ b/storybook/qmlTests/tests/tst_DAppsWorkflow.qml @@ -1129,6 +1129,12 @@ Item { waitForRendering(controlUnderTest) const popup = findChild(controlUnderTest, "dappsRequestModal") verify(popup.opened) + + const acceptButton = findChild(popup, "signButton") + const rejectButton = findChild(popup, "rejectButton") + // Workaround for the buttons not being aligned yet + // Removing this could cause the wrong button to be clicked + tryVerify(() => acceptButton.x > rejectButton.x + rejectButton.width) return popup } @@ -1136,11 +1142,10 @@ Item { const topic = "abcd" const requestId = "12345" let popup = showRequestModal(topic, requestId) - let rejectButton = findChild(popup, "rejectButton") + verify(!!rejectButton) mouseClick(rejectButton) - waitForRendering(controlUnderTest) compare(signRequestRejectedSpy.count, 1, "expected signRequestRejected signal to be emitted") compare(signRequestAcceptedSpy.count, 0, "expected signRequestAccepted signal to not be emitted") compare(signRequestRejectedSpy.signalArguments[0][0], topic, "expected id to be set") diff --git a/ui/app/AppLayouts/Wallet/panels/DAppsWorkflow.qml b/ui/app/AppLayouts/Wallet/panels/DAppsWorkflow.qml index 497c4f271c..17f39805dd 100644 --- a/ui/app/AppLayouts/Wallet/panels/DAppsWorkflow.qml +++ b/ui/app/AppLayouts/Wallet/panels/DAppsWorkflow.qml @@ -294,7 +294,6 @@ DappsComboBox { return } requestHandled = true - let userRejected = true root.signRequestRejected(request.topic, request.id) }