Refactor test execution and linter to support new 'follow' command for window switching, enhance status tracking with visual indicators, and update extraction syntax for improved clarity

This commit is contained in:
seb
2025-07-17 13:13:48 +02:00
parent fe4ce936c6
commit a69911e874
5 changed files with 390 additions and 110 deletions

View File

@@ -9,7 +9,7 @@ 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://growheads.de"
open "https://dev.seedheads.de"
sleep 2000 "page load"
wait element=a href=/Kategorie/Seeds
click element=a href=/Kategorie/Seeds
@@ -63,7 +63,7 @@ sleep 1000 "checkbox checked"
wait element=button childText="Bestellung abschließen"
click element=button childText="Bestellung abschließen"
sleep 3000 "order completion"
*/
# Part 3 - Login to the email account
open "https://mail.growbnb.de/"
sleep 100 "page load"
@@ -89,33 +89,38 @@ sleep 300 "mehr button click"
# Click on "In neuem Fenster öffnen" link
wait element=a id="rcmbtn134"
click element=a id="rcmbtn134"
sleep 3000 "new window open"
# Switch to the new window that was opened
switch to new window
# Wait a bit more for the new window to fully load
sleep 2000 "new window load"
follow
# Verify that "Musteranmerkung" exists in the content
wait element=p childText="Musteranmerkung"
# Extract the order URL from the link
extract href from element=a childText="https://growheads.de/profile#W-" to variable="ORDER_URL"
extract href from element=a childText="https://dev.seedheads.de/profile#W-" to "ORDER_URL"
sleep 300 "bestellbestätigung click"
dump "after_bestellbestaetigung_click"
sleep 3000 "bestellbestätigung click"
# Delete the email by clicking "Löschen"
wait element=a id="rcmbtn105"
click element=a id="rcmbtn105"
sleep 1000 "email deleted"
sleep 300 "email deleted"
# Now open the extracted URL
open "$ORDER_URL"
sleep 2000 "order page load"
dump "order_page_from_extracted_url"
dump "after_new_window_click"
sleep 30000 "login submit"
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 300 "anmelden click"
wait element=button childText="Schließen"
click element=button childText="Schließen"
sleep 100 "schließen click"
wait element=button class="MuiIconButton-colorError"
click element=button class="MuiIconButton-colorError"
sleep 100 "stornieren click"
wait element=button childText="Stornieren"
click element=button childText="Stornieren"
sleep 100 "stornieren click"
sleep 10000 "completed"