Implement graceful shutdown handling in CLI; add cleanup logic to TestRunner and Executor for improved resource management during termination. Update sleep durations in step1.test for consistency.
This commit is contained in:
77
step1_dhl.test
Normal file
77
step1_dhl.test
Normal file
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
PlayWrong Test - Complete E-commerce Flow
|
||||
This test demonstrates the full purchase flow from product selection to order completion
|
||||
with beautiful animations and environment variable support
|
||||
Part 1: Load Growheads, put one item in the cart and go to checkout
|
||||
Part 2: Fill in the checkout form
|
||||
Part 3: Login to the email account
|
||||
*/
|
||||
use "Chrome"
|
||||
|
||||
# Part 1 - Load Growheads, put one item in the cart and go to checkout
|
||||
open "https://dev.seedheads.de"
|
||||
sleep 200 "page load"
|
||||
wait element=a href=/Kategorie/Seeds
|
||||
click element=a href=/Kategorie/Seeds
|
||||
sleep 200 "seed click"
|
||||
wait element=button childText="In den Korb"
|
||||
click element=button childText="In den Korb"
|
||||
sleep 200 "in korb click"
|
||||
wait element=span class="MuiBadge-badge" childText="1"
|
||||
click element=button child=span(class="MuiBadge-badge" childText="1")
|
||||
sleep 200 "korb click"
|
||||
wait element=button childText="Weiter zur Kasse"
|
||||
click element=button childText="Weiter zur Kasse"
|
||||
sleep 200 "weiter click"
|
||||
wait element=input type="email"
|
||||
fill element=input type="email" value="autotest@growheads.de"
|
||||
sleep 200 "email fill"
|
||||
wait element=input type="password"
|
||||
fill element=input type="password" value="$PASSWORD"
|
||||
sleep 200 "password fill"
|
||||
wait element=button childText="ANMELDEN" class="MuiButton-fullWidth"
|
||||
click element=button childText="ANMELDEN" class="MuiButton-fullWidth"
|
||||
sleep 2000 "anmelden click"
|
||||
#dump "isServer"
|
||||
jumpIfNot element=span childText="Server-Warenkorb löschen" jump=2
|
||||
click element=button childText="Weiter"
|
||||
sleep 2000 "anmelden click"
|
||||
|
||||
# Part 2 - Fill in the checkout form
|
||||
|
||||
wait element=input name="firstName"
|
||||
scroll element=span childText="Vorname"
|
||||
fill element=input name="firstName" value="Max"
|
||||
sleep 100 "vorname fill"
|
||||
wait element=input name="lastName"
|
||||
fill element=input name="lastName" value="Muster"
|
||||
sleep 100 "nachname fill"
|
||||
wait element=input name="street"
|
||||
fill element=input name="street" value="Muster"
|
||||
sleep 100 "strasse fill"
|
||||
wait element=input name="houseNumber"
|
||||
fill element=input name="houseNumber" value="420"
|
||||
sleep 100 "hausnummer fill"
|
||||
wait element=input name="postalCode"
|
||||
fill element=input name="postalCode" value="42023"
|
||||
sleep 100 "plz fill"
|
||||
wait element=input name="city"
|
||||
fill element=input name="city" value="Muster"
|
||||
sleep 100 "stadt fill"
|
||||
|
||||
wait element=textarea name="note"
|
||||
scroll element=textarea name="note"
|
||||
fill element=textarea name="note" value="Musteranmerkung"
|
||||
sleep 100 "note fill"
|
||||
wait element=input id="DHL" name="deliveryMethod" value="DHL" type="radio"
|
||||
scroll element=input id="DHL" name="deliveryMethod" value="DHL" type="radio"
|
||||
click element=input id="DHL" name="deliveryMethod" value="DHL" type="radio"
|
||||
sleep 100 "dhl click"
|
||||
wait element=label childText="Bestimmungen"
|
||||
scroll element=button childText="Bestellung abschließen"
|
||||
click element=label childText="Bestimmungen"
|
||||
sleep 100 "checkbox checked"
|
||||
wait element=button childText="Bestellung abschließen"
|
||||
click element=button childText="Bestellung abschließen"
|
||||
sleep 3000 "order completion"
|
||||
|
||||
Reference in New Issue
Block a user