From c0507521850581ce2d4459b45dd5195971f20b58 Mon Sep 17 00:00:00 2001 From: Sabina Talipova Date: Wed, 25 Oct 2023 09:09:24 +1300 Subject: [PATCH] MNT Behat test - removing implicitly added files --- .../behat/features/populate-campaigns.feature | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/tests/behat/features/populate-campaigns.feature b/tests/behat/features/populate-campaigns.feature index 9c9acd8e..1f23a6c5 100644 --- a/tests/behat/features/populate-campaigns.feature +++ b/tests/behat/features/populate-campaigns.feature @@ -84,3 +84,36 @@ Feature: Populate campaigns Then I should see a "Published "Full Campaign" successfully." success toast When I press the "Campaigns" button Then I should see "Published" in column 3 of the "Full Campaign" campaign + +Scenario: I can remove a campaign item with implicitly added items + When I go to "admin/pages" + And I click on "About Us" in the tree + Then I should see an edit page form + When I fill in "About us changed" for "Title" + And I fill in the "Content" HTML field with "

my new content

" + And I press the "Save" button + And I press the "Insert from Files" HTML field button + And I click the "folder1" gallery item + And I click the "file2" gallery item + And I press the "Insert file" button + Then the "Content" HTML field should contain "file2.jpg" + And I press the "Save" button + Then I should see the "Saved" button + And I click "More options" in the "#ActionMenus" element + And I press the "Add to Campaign" button + Then I should see a modal titled "Add to campaign" + When I select "Campaign" from "Campaign" + And I press the "Add" button + When I close the modal + When I go to "admin/campaigns" + And I view the campaign "Campaign" + Then I should see the "About Us" campaign item + And I should see the "file2" campaign item + When I press the "Publish campaign" button, confirming the dialog + Then I should see a "Published "Full Campaign" successfully." success toast + And I select the "About Us" campaign item + And I wait until I see the ".campaign-admin__campaign-preview .action-menu__toggle" element + And I click on the ".campaign-admin__campaign-preview .action-menu__toggle" element + And I press the "Remove" button, confirming the dialog + Then I should not see the "About Us" campaign item + And I should not see the "file2" campaign item