From dd79cf5a23077fc6ede6d55eab6121a0d404b7d1 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Mon, 9 Jan 2023 13:01:49 +1300 Subject: [PATCH] MNT Fix behat test for inserting WYSIWYG links The selectors for TreeDropdownField's markup changed when we updated react-select. --- tests/behat/features/insert-a-link.feature | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/behat/features/insert-a-link.feature b/tests/behat/features/insert-a-link.feature index 3ad24611..94d69f48 100644 --- a/tests/behat/features/insert-a-link.feature +++ b/tests/behat/features/insert-a-link.feature @@ -18,8 +18,7 @@ So that I can link to a external website or a page on my site And I press the "Insert link" HTML field button And I click "Page on this site" in the ".tox-collection__group" element Then I should see an "form#Form_editorInternalLink" element - When I click "(Search or choose Page)" in the ".Select-multi-value-wrapper" element - And I click "About Us" in the ".treedropdownfield__menu" element + When I select "About Us" in the "#Form_editorInternalLink_PageID_Holder" tree dropdown And I fill in "my desc" for "Link description" And I press the "Insert link" button Then the "Content" HTML field should contain "awesome" @@ -32,11 +31,10 @@ So that I can link to a external website or a page on my site And I press the "Insert link" HTML field button And I click "Page on this site" in the ".tox-collection__group" element And I should see an "form#Form_editorInternalLink" element - Then I should see "About Us" in the ".Select-value" element + Then I should see "About Us" in the ".treedropdownfield__value-container" element And the "Link description" field should contain "my desc" # This doesn't seem to suffer from that issue - When I click "About Us" in the ".Select-value" element - And I click "Home" in the ".treedropdownfield__menu" element + When I select "Home" in the "#Form_editorInternalLink_PageID_Holder" tree dropdown And I fill in "my new desc" for "Link description" And I press the "Insert link" button Then the "Content" HTML field should contain "awesome"