From 877921be6efc25bbe03615b3735cd5a2a38d160e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Sat, 20 May 2023 21:03:39 +0200 Subject: [PATCH] Add dropdown cascade test --- tests-behat/dropdown.feature | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests-behat/dropdown.feature diff --git a/tests-behat/dropdown.feature b/tests-behat/dropdown.feature new file mode 100644 index 0000000000..dde9ebc9fe --- /dev/null +++ b/tests-behat/dropdown.feature @@ -0,0 +1,17 @@ +Feature: Dropdown + + Scenario: dropdown cascade + Given I am on "form-control/dropdown-plus.php" + Then I select value "Beverages" in lookup "category_id" + Then I select value "Sugar/Sweetened" in lookup "sub_category_id" + Then I select value "Soda" in lookup "product_id" + When I click using selector "(//div[text()='Save'])[2]" + Then Modal is open with text '{ "category_id": "2", "sub_category_id": "9", "product_id": "4" }' in selector "p" + Then I click close modal + Then I should see "Soda" + Then I select value "Coffee and Tea" in lookup "sub_category_id" + Then I should not see "Soda" + Then I should not see "Cola" + Then I should not see "No results found." + When I click using selector "//div.field[label[text()='Product ID']]//div.ui.dropdown" + Then I should see "No results found."