From ad9872c548116c9392e4e2cde5cc7c6fad58989d Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Mon, 7 Oct 2024 16:09:22 +1300 Subject: [PATCH 1/3] Make sure the product page is loaded --- .../build_validation/reposync/srv_sync_all_products.feature | 1 + testsuite/features/step_definitions/navigation_steps.rb | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/testsuite/features/build_validation/reposync/srv_sync_all_products.feature b/testsuite/features/build_validation/reposync/srv_sync_all_products.feature index e9c91c54f347..e5c2aed435fa 100644 --- a/testsuite/features/build_validation/reposync/srv_sync_all_products.feature +++ b/testsuite/features/build_validation/reposync/srv_sync_all_products.feature @@ -817,5 +817,6 @@ Feature: Synchronize products in the products page of the Setup Wizard Scenario: Detect product loading issues from the UI in Build Validation Given I am authorized for the "Admin" section When I follow the left menu "Admin > Setup Wizard > Products" + And I wait until I do not see "Loading" text Then I should not see a "Operation not successful" text And I should not see a warning nor an error sign diff --git a/testsuite/features/step_definitions/navigation_steps.rb b/testsuite/features/step_definitions/navigation_steps.rb index c3aa4014d7fc..1aacd4bddcb9 100644 --- a/testsuite/features/step_definitions/navigation_steps.rb +++ b/testsuite/features/step_definitions/navigation_steps.rb @@ -800,8 +800,9 @@ end Then(/^I should not see a warning nor an error sign$/) do - raise ScriptError, 'Warning detected' unless page.has_no_xpath?('//*[contains(@class, \'fa-exclamation-triangle\')]') - raise ScriptError, 'Error detected' unless page.has_no_xpath?('//*[contains(@class, \'fa-exclamation-circle\')]') + raise ScriptError, 'No products synchronized' if page.has_no_xpath?('//*[contains(@class, \'fa-check-circle\')]') + raise ScriptError, 'Warning detected' if page.has_xpath?('//*[contains(@class, \'fa-exclamation-triangle\')]') + raise ScriptError, 'Error detected' if page.has_xpath?('//*[contains(@class, \'fa-exclamation-circle\')]') end Then(/^I select the "([^"]*)" repo$/) do |repo| From 9c943351c5c0b5400ec97458a5e9c6bd6c29a782 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Mon, 7 Oct 2024 16:09:22 +1300 Subject: [PATCH 2/3] Make sure the product page is loaded --- testsuite/features/step_definitions/navigation_steps.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/features/step_definitions/navigation_steps.rb b/testsuite/features/step_definitions/navigation_steps.rb index 1aacd4bddcb9..439191d74c8a 100644 --- a/testsuite/features/step_definitions/navigation_steps.rb +++ b/testsuite/features/step_definitions/navigation_steps.rb @@ -800,7 +800,7 @@ end Then(/^I should not see a warning nor an error sign$/) do - raise ScriptError, 'No products synchronized' if page.has_no_xpath?('//*[contains(@class, \'fa-check-circle\')]') + raise ScriptError, 'No product synchronized' if page.has_no_xpath?('//*[contains(@class, \'fa-check-circle\')]') raise ScriptError, 'Warning detected' if page.has_xpath?('//*[contains(@class, \'fa-exclamation-triangle\')]') raise ScriptError, 'Error detected' if page.has_xpath?('//*[contains(@class, \'fa-exclamation-circle\')]') end From c22c3b0f940fc49e3f2e8deaef70acc09abfbe53 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Tue, 8 Oct 2024 09:50:26 +1300 Subject: [PATCH 3/3] Add an extra check to make sure we don't have a spinning sign. --- testsuite/features/step_definitions/navigation_steps.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/testsuite/features/step_definitions/navigation_steps.rb b/testsuite/features/step_definitions/navigation_steps.rb index 439191d74c8a..22bf65abc5f4 100644 --- a/testsuite/features/step_definitions/navigation_steps.rb +++ b/testsuite/features/step_definitions/navigation_steps.rb @@ -801,6 +801,7 @@ Then(/^I should not see a warning nor an error sign$/) do raise ScriptError, 'No product synchronized' if page.has_no_xpath?('//*[contains(@class, \'fa-check-circle\')]') + raise ScriptError, 'At least one product is not fully synchronized' if page.has_ xpath?('//*[contains(@class, \'fa-spinner\')]') raise ScriptError, 'Warning detected' if page.has_xpath?('//*[contains(@class, \'fa-exclamation-triangle\')]') raise ScriptError, 'Error detected' if page.has_xpath?('//*[contains(@class, \'fa-exclamation-circle\')]') end