From b31f55d49f401c1abe79d3cec003a1bf3ddcd27e Mon Sep 17 00:00:00 2001 From: Waozi Date: Wed, 28 Oct 2026 12:40:39 -0300 Subject: [PATCH] Verify Play savings in button details --- tests/dew_topup_ui_test.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/dew_topup_ui_test.py b/tests/dew_topup_ui_test.py index 595271f99..0f62fb484 100644 --- a/tests/dew_topup_ui_test.py +++ b/tests/dew_topup_ui_test.py @@ -87,8 +87,12 @@ with contextlib.ExitStack() as stack: else: for amount in (10, 100, 500, 1000, 5000): driver.wait(contains=str(amount) + " Dew", role="button", visible=False) - for percent in (4, 8, 12, 16): - driver.wait(contains="−" + str(percent) + "%", role="button", visible=False) + small = driver.wait(contains="10 Dew", role="button", visible=False) + assert small["detail"] == "$0.72", small + for amount, price, percent in ((100, "$6.90", 4), (500, "$33.00", 8), + (1000, "$63.00", 12), (5000, "$300.00", 16)): + button = driver.wait(contains=f"{amount} Dew", role="button", visible=False) + assert button["detail"] == f"{price} · −{percent}%", button driver.wait(contains="Savings per Dew compared with the 10 Dew pack.", role="text", visible=False) assert not driver.find(contains="Loading Google Play prices", role="text") (OUTPUT / (scene + "-tree.json")).write_text(json.dumps(driver.tree(), indent=2) + "\n")