From 6f640d34f8d993788ced145f1dd939f60b98b2a9 Mon Sep 17 00:00:00 2001 From: Peter Ondrejka Date: Wed, 11 Sep 2024 11:08:29 +0200 Subject: [PATCH] validations with warnings too (#1543) (cherry picked from commit 55033894e22d17ce77221aa2b1434008a32f8023) --- airgun/views/sync_templates.py | 2 +- airgun/widgets.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/airgun/views/sync_templates.py b/airgun/views/sync_templates.py index ef83842f8..a18e3007f 100644 --- a/airgun/views/sync_templates.py +++ b/airgun/views/sync_templates.py @@ -17,7 +17,7 @@ class SyncTemplatesView(BaseLoggedInView): breadcrumb = BreadCrumb() title = Text("//h2[contains(., 'Import or Export Templates')]") sync_type = RadioGroup("//div[label[contains(., 'Action type')]]") - submit = Text("//button[@type='submit']") + submit = Text(".//button[contains(.,'Submit')]") template = ConditionalSwitchableView(reference='sync_type') diff --git a/airgun/widgets.py b/airgun/widgets.py index 101d418a8..9acce6a53 100644 --- a/airgun/widgets.py +++ b/airgun/widgets.py @@ -1046,7 +1046,8 @@ class ValidationErrors(Widget): ERROR_ELEMENTS = ".//*[contains(@class,'has-error') and not(contains(@style,'display:none'))]" ERROR_MESSAGES = ( - ".//*[(contains(@class, 'alert base in fade alert-danger')" + ".//*[(contains(@class, 'alert base in fade alert-danger') " + "or contains(@class, 'alert base in fade alert-warning') " "or contains(@class,'error-msg') " "or contains(@class,'error-msg-block')" "or contains(@class,'error-message') "