This commit is contained in:
parent
1a38cfe5d7
commit
7098ac75cb
2 changed files with 27 additions and 19 deletions
|
|
@ -567,12 +567,22 @@ void DonationLifecycle(TestServer& srv) {
|
|||
"the awaiting page states the confirmation timing");
|
||||
WriteFile(std::filesystem::path(
|
||||
srv.Orders().string() + ".fake-paid.seen"), "");
|
||||
const std::string page =
|
||||
srv.WaitForBody(seenPath, "Your payment is on its way");
|
||||
Check(page.find("Your payment is on its way") != std::string::npos,
|
||||
"an in-flight payment is acknowledged on the order page");
|
||||
Check(page.find("awaiting payment") != std::string::npos,
|
||||
"an in-flight payment is still awaiting, not paid");
|
||||
// The badge is where the buyer looks first, so it carries the
|
||||
// state itself: "awaiting payment" under a wallet that said
|
||||
// success reads as "your money did not arrive". "Detected" and
|
||||
// not "received": the shop has seen the transfer, it does not
|
||||
// yet trust it, and the badge should not outrun the rail. The
|
||||
// waiting half uses the words every exchange deposit screen has
|
||||
// taught buyers: "awaiting network confirmation".
|
||||
const std::string page = srv.WaitForBody(
|
||||
seenPath, ">payment detected, awaiting network confirmation<");
|
||||
Check(page.find(">payment detected, awaiting network confirmation<")
|
||||
!= std::string::npos,
|
||||
"the badge flips to detected-awaiting-confirmation in flight");
|
||||
Check(page.find(">awaiting payment<") == std::string::npos,
|
||||
"the awaiting badge is replaced, not doubled");
|
||||
Check(page.find("Thank you") == std::string::npos,
|
||||
"an in-flight payment is not yet confirmed as paid");
|
||||
std::error_code ec;
|
||||
std::filesystem::remove(std::filesystem::path(
|
||||
srv.Orders().string() + ".fake-paid.seen"), ec);
|
||||
|
|
|
|||
Loading…
Reference in a new issue