Skip to content

Commit 88739f0

Browse files
committed
Exercise fee preset selection through the dropdown UI
Strengthen the send functional regression so it verifies the fee selector's default state, opens the popup, waits for rendered option estimates, and confirms the selected label/duration/index change after choosing Low. Constraint: The test must validate the user-facing dropdown interaction, not only downstream fee state Rejected: Rely on selectedTarget alone | insufficient proof that the dropdown path was exercised Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep the dropdown assertions aligned with FeeSelection.qml labels and durations if the preset copy changes Tested: python3 -m py_compile test/functional/qml_test_send_receive.py Tested: python3 test/functional/qml_test_send_receive.py Tested: python3 test/functional/qml_test_bridge_sanity.py Not-tested: Non-low presets beyond asserting their estimates render in the popup
1 parent 104d04a commit 88739f0

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

test/functional/qml_test_send_receive.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
SEND_AMOUNT = "1.00000000"
1717
GUI_WALLET_NAME = "send_flow_wallet"
1818
RECEIVER_WALLET_NAME = "send_flow_receiver"
19+
DEFAULT_FEE_LABEL = "Default"
20+
DEFAULT_FEE_DURATION = "(~20 mins)"
21+
LOW_FEE_LABEL = "Low"
22+
LOW_FEE_DURATION = "(~60 mins)"
1923
LOW_FEE_OPTION_INDEX = 2
2024
LOW_FEE_TARGET_BLOCKS = 6
2125

@@ -134,11 +138,22 @@ def run_test():
134138
gui.set_text("sendAmountInput", SEND_AMOUNT)
135139
gui.wait_for_property("sendContinueButton", "enabled", True, timeout_ms=20000)
136140

141+
gui.wait_for_property("feeSelectionControl", "selectedLabel", DEFAULT_FEE_LABEL, timeout_ms=5000)
142+
gui.wait_for_property("feeSelectionControl", "selectedDuration", DEFAULT_FEE_DURATION, timeout_ms=5000)
143+
gui.wait_for_property("feeSelectionControl", "selectedTarget", 2, timeout_ms=5000)
144+
137145
gui.click("feeSelectionDropdownButton")
138146
gui.wait_for_property("feeSelectionPopup", "opened", True, timeout_ms=5000)
147+
high_fee_option_estimate = wait_for_non_empty_text(gui, "feeSelectionOptionEstimate0")
148+
default_fee_option_estimate = wait_for_non_empty_text(gui, "feeSelectionOptionEstimate1")
139149
low_fee_option_estimate = wait_for_non_empty_text(gui, f"feeSelectionOptionEstimate{LOW_FEE_OPTION_INDEX}")
150+
assert high_fee_option_estimate, "Expected High option estimate to render in the dropdown"
151+
assert default_fee_option_estimate, "Expected Default option estimate to render in the dropdown"
140152
gui.click(f"feeSelectionOption{LOW_FEE_OPTION_INDEX}")
141153
gui.wait_for_property("feeSelectionPopup", "opened", False, timeout_ms=5000)
154+
gui.wait_for_property("feeSelectionControl", "selectedIndex", LOW_FEE_OPTION_INDEX, timeout_ms=5000)
155+
gui.wait_for_property("feeSelectionControl", "selectedLabel", LOW_FEE_LABEL, timeout_ms=5000)
156+
gui.wait_for_property("feeSelectionControl", "selectedDuration", LOW_FEE_DURATION, timeout_ms=5000)
142157
gui.wait_for_property("feeSelectionControl", "selectedTarget", LOW_FEE_TARGET_BLOCKS, timeout_ms=5000)
143158
gui.wait_for_property("feeSelectionEstimateLabel", "text", low_fee_option_estimate, timeout_ms=20000)
144159

0 commit comments

Comments
 (0)