From bdc1658459665d47824c32fdb2de06d523b19f0b Mon Sep 17 00:00:00 2001 From: Rajab Natshah <rajabn@gmail.com> Date: Sun, 28 Mar 2021 15:14:29 +0300 Subject: [PATCH] Issue #3205085: Add a tag release-varbase workflow job for the CircleCI automated testing pipelines --- .circleci/config.yml | 33 ++++++-- tests/README.md | 9 +-- tests/features/bootstrap/VarbaseContext.php | 22 +++--- ...ser-registration_only-admins-login.feature | 7 +- .../01-02-user-roles.feature | 2 +- .../01-04-website-languages_english.feature | 8 +- ...ble-content-types-to-all-languages.feature | 3 +- .../02-04-persistent-login.feature | 4 +- .../03-03-admins-can-disable-users.feature | 4 +- ...d-their-usage-list-page-for-admins.feature | 4 +- ...cks-for-the-interface-and-services.feature | 36 +++------ .../04-01-basic-page-permissions.feature | 6 +- ...add-any-paragraph-type-to-the-page.feature | 14 ++-- ...ragraphs_text-and-image-paragraphs.feature | 4 +- ...ns-and-choose-layouts-for-sections.feature | 2 +- ...yqueue-reverse-order-in-admin-view.feature | 28 +++++++ ...ntityqueue-tasks-for-content-types.feature | 2 +- ...ueue-using-entityqueue-form-widget.feature | 79 +++++++------------ ...05-04-cloning-content-and-entities.feature | 8 +- ...embed-existing-media-image-library.feature | 6 +- 20 files changed, 141 insertions(+), 140 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 41ebad25..d8999ade 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -118,6 +118,7 @@ commands: cd /var/www/html/varbase composer install --no-interaction -vvv git clone --branch 9.0.x https://github.com/vardot/varbase.git /var/www/html/varbase/docroot/profiles/varbase + sudo chmod 777 -R /var/www/html/varbase - save_cache: key: v4-composer-cache paths: @@ -180,9 +181,9 @@ jobs: <<: *defaults steps: - varbase-build - ## Automated Functional Acceptance Testing group - 02 user management + ## Automated Functional Acceptance Testing group - 02 user management - 03 admin management - run: - name: Automated Functional Acceptance Testing group - 02 user management + name: Automated Functional Acceptance Testing group - 02 user management - 03 admin management no_output_timeout: 30m command: | cd /var/www/html/varbase/docroot/profiles/varbase @@ -215,7 +216,27 @@ workflows: version: 2 varbase-workflow: jobs: - - varbase-testing-01-website-base-requirements - - varbase-testing-02-user-management-03-admin-management - - varbase-testing-04-content-structure - - varbase-testing-05-content-management + - varbase-testing-01-website-base-requirements: + filters: + tags: + only: /^9.*/ + branches: + only: /^9.0.x/ + - varbase-testing-02-user-management-03-admin-management: + filters: + tags: + only: /^9.*/ + branches: + only: /^9.0.x/ + - varbase-testing-04-content-structure: + filters: + tags: + only: /^9.*/ + branches: + only: /^9.0.x/ + - varbase-testing-05-content-management: + filters: + tags: + only: /^9.*/ + branches: + only: /^9.0.x/ \ No newline at end of file diff --git a/tests/README.md b/tests/README.md index 67d33b82..3a2b3de1 100644 --- a/tests/README.md +++ b/tests/README.md @@ -213,13 +213,6 @@ $ ../../../bin/behat -di $ ../../../bin/behat tests/features/varbase/step3-cleanup-tests ``` -8. If you want to test the installation process, you will need to use the - varbase Install config file, as you can see in the following command. - - $ ../../../bin/behat --config=behat.varbase-install.yml tools/install-varbase/default-installation.feature - - - # Advanced customized automated testing To run the automated testing with behat you will need to change the [ wd_host and base_url ] settings in the [ behat.varbase.yml ] file to go with your project configuration and the selenium server. @@ -241,7 +234,7 @@ To run the automated testing with behat you will need to change the [ wd_host an # browser_name: 'phantomjs' javascript_session: selenium2 ``` - + Testing scenarios are tagged with the Behat tags of: * **@local = Local** diff --git a/tests/features/bootstrap/VarbaseContext.php b/tests/features/bootstrap/VarbaseContext.php index 73c6e707..99b9d151 100644 --- a/tests/features/bootstrap/VarbaseContext.php +++ b/tests/features/bootstrap/VarbaseContext.php @@ -84,12 +84,11 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext $this->logout(); } - $element = $this->getSession()->getPage(); - $this->getSession()->visit($this->locatePath('/user')); - sleep(2); - $element->fillField('edit-name', $username); - $element->fillField('edit-pass', $password); - $submit = $element->findButton('op'); + $page = $this->getSession()->getPage(); + $this->getSession()->visit($this->locatePath('/user/login')); + $page->fillField('edit-name', $username); + $page->fillField('edit-pass', $password); + $submit = $page->findButton('op'); $submit->click(); } else { @@ -113,12 +112,11 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } // Login with the. - $element = $this->getSession()->getPage(); - $this->getSession()->visit($this->locatePath('/user')); - sleep(2); - $element->fillField('edit-name', $username); - $element->fillField('edit-pass', $password); - $submit = $element->findButton('op'); + $page = $this->getSession()->getPage(); + $this->getSession()->visit($this->locatePath('/user/login')); + $page->fillField('edit-name', $username); + $page->fillField('edit-pass', $password); + $submit = $page->findButton('op'); $submit->click(); } diff --git a/tests/features/varbase/step2-apply-tests/01-website-base-requirements/01-01-user-registration_only-admins-login.feature b/tests/features/varbase/step2-apply-tests/01-website-base-requirements/01-01-user-registration_only-admins-login.feature index 10afdd7d..6a51ff97 100644 --- a/tests/features/varbase/step2-apply-tests/01-website-base-requirements/01-01-user-registration_only-admins-login.feature +++ b/tests/features/varbase/step2-apply-tests/01-website-base-requirements/01-01-user-registration_only-admins-login.feature @@ -5,22 +5,21 @@ So that I will need a site admin or super admin to add me to the website Background: Given I am an anonymous user - + @local @development @staging @production Scenario: Check that create new account options does not appear for anonymous users When I go to "/user" And I wait Then I should not see "Create new account" - + @local @development @staging @production Scenario: Check that only admin can create an account When I go to "/user/register" And I wait Then I should see "Access denied" - + @local @development @staging @production Scenario: Verify that anonymous users cannot access admin pages When I go to "/admin" And I wait Then I should see "Access denied" - diff --git a/tests/features/varbase/step2-apply-tests/01-website-base-requirements/01-02-user-roles.feature b/tests/features/varbase/step2-apply-tests/01-website-base-requirements/01-02-user-roles.feature index db0bdea5..6efb8539 100644 --- a/tests/features/varbase/step2-apply-tests/01-website-base-requirements/01-02-user-roles.feature +++ b/tests/features/varbase/step2-apply-tests/01-website-base-requirements/01-02-user-roles.feature @@ -6,7 +6,7 @@ So that they must be (Editor, Site Admin, Content Admin, Super Admin) @local @development @staging @production Scenario: Check that all default list of roles are present Given I am a logged in user with the "webmaster" user - When I go to "admin/people/roles" + When I go to "/admin/people/roles" And I wait Then I should see "Editor" And I should see "Content Admin" diff --git a/tests/features/varbase/step2-apply-tests/01-website-base-requirements/01-04-website-languages_english.feature b/tests/features/varbase/step2-apply-tests/01-website-base-requirements/01-04-website-languages_english.feature index 9042ac19..c79756fe 100644 --- a/tests/features/varbase/step2-apply-tests/01-website-base-requirements/01-04-website-languages_english.feature +++ b/tests/features/varbase/step2-apply-tests/01-website-base-requirements/01-04-website-languages_english.feature @@ -6,7 +6,7 @@ So that can be sure that the website is using the English language as one of the @javascript @local @development @staging @production Scenario: Check if we can Create Basic page with English for the language of the content Given I am a logged in user with the "test_content_admin" user - And I go to "node/add/page" + And I go to "/node/add/page" And I wait When I select "English" from "Language" Then I should see "Language" @@ -21,7 +21,7 @@ So that can be sure that the website is using the English language as one of the @javascript @local @development @staging @production Scenario: Check if we can Create Landing page with English for the language of the content Given I am a logged in user with the "test_content_admin" user - And I go to "node/add/landing_page" + And I go to "/node/add/landing_page" And I wait When I select "English" from "Language" Then I should see "Language" @@ -35,7 +35,7 @@ So that can be sure that the website is using the English language as one of the @javascript @local @development @staging @production Scenario: Check if we can Create Basic page with English for the language of the content Given I am a logged in user with the "test_site_admin" user - And I go to "node/add/page" + And I go to "/node/add/page" And I wait When I select "English" from "Language" Then I should see "Language" @@ -50,7 +50,7 @@ So that can be sure that the website is using the English language as one of the @javascript @local @development @staging @production Scenario: Check if we can Create Landing page with English for the language of the content Given I am a logged in user with the "test_site_admin" user - And I go to "node/add/landing_page" + And I go to "/node/add/landing_page" And I wait When I select "English" from "Language" Then I should see "Language" diff --git a/tests/features/varbase/step2-apply-tests/01-website-base-requirements/01-05-translatable-content-types-to-all-languages.feature b/tests/features/varbase/step2-apply-tests/01-website-base-requirements/01-05-translatable-content-types-to-all-languages.feature index cb90a47c..f7b25e1f 100644 --- a/tests/features/varbase/step2-apply-tests/01-website-base-requirements/01-05-translatable-content-types-to-all-languages.feature +++ b/tests/features/varbase/step2-apply-tests/01-website-base-requirements/01-05-translatable-content-types-to-all-languages.feature @@ -12,8 +12,7 @@ So that I will be able to create a content then I will have the option to transl # ../../../bin/behat tests/features/varbase/step3-cleanup-tests/2-delete-arabic.feature @javascript @local @development @staging @production - Scenario: Check if site admin can translate an existing English Basic Page - to an Arabic version. + Scenario: Check if site admin can translate an existing English Basic Page to an Arabic version. Given I am a logged in user with the "test_site_admin" user When I go to "/node/add/page" And I wait diff --git a/tests/features/varbase/step2-apply-tests/02-user-management/02-04-persistent-login.feature b/tests/features/varbase/step2-apply-tests/02-user-management/02-04-persistent-login.feature index 8815feb8..5f8f3853 100644 --- a/tests/features/varbase/step2-apply-tests/02-user-management/02-04-persistent-login.feature +++ b/tests/features/varbase/step2-apply-tests/02-user-management/02-04-persistent-login.feature @@ -15,7 +15,7 @@ Feature: User Management - Have persistent login options and configurations @javascript @check @local @development @staging @production Scenario: Check if an authenticated user can login and use the [Remember me] option Given I am not logged in - When I go to "/user" + When I go to "/user/login" And I wait Then I should see "Log in" And I should see "Remember me" @@ -24,4 +24,4 @@ Feature: User Management - Have persistent login options and configurations And I check the box "Remember me" And I press the "edit-submit" button And I wait - Then I should see "test_authenticated" \ No newline at end of file + Then I should see "test_authenticated" diff --git a/tests/features/varbase/step2-apply-tests/03-admin-management/03-03-admins-can-disable-users.feature b/tests/features/varbase/step2-apply-tests/03-admin-management/03-03-admins-can-disable-users.feature index 211df28a..a8275a7f 100644 --- a/tests/features/varbase/step2-apply-tests/03-admin-management/03-03-admins-can-disable-users.feature +++ b/tests/features/varbase/step2-apply-tests/03-admin-management/03-03-admins-can-disable-users.feature @@ -5,7 +5,7 @@ So that they will be disabled and not be able to use the site. @javascript @local @development @staging @production Scenario: Check if the test_authenticated user is not blocked and can login - Given I am on "user/login" + Given I am on "/user/login" And I wait When I fill in "test_authenticated" for "Username" And I fill in "dD.123123ddd" for "Password" @@ -33,7 +33,7 @@ So that they will be disabled and not be able to use the site. @javascript @local @development @staging @production Scenario: Check if the blocked user with user id of Test Blocked User ID can or can not login - Given I am on "user/login" + Given I am on "/user/login" And I wait When I fill in "test_authenticated" for "Username" And I fill in "dD.123123ddd" for "Password" diff --git a/tests/features/varbase/step2-apply-tests/03-admin-management/03-04-image-media-and-their-usage-list-page-for-admins.feature b/tests/features/varbase/step2-apply-tests/03-admin-management/03-04-image-media-and-their-usage-list-page-for-admins.feature index d4332e58..608821f2 100644 --- a/tests/features/varbase/step2-apply-tests/03-admin-management/03-04-image-media-and-their-usage-list-page-for-admins.feature +++ b/tests/features/varbase/step2-apply-tests/03-admin-management/03-04-image-media-and-their-usage-list-page-for-admins.feature @@ -36,7 +36,7 @@ So that I will be able to manage files, see where they have been used in content @javascript @local @development @staging @production Scenario: Check if content admins can edit files - When I go to "admin/content/media" + When I go to "/admin/content/media" And I wait Then I should see "Add media" When I fill in "Flag Earth" for "edit-name" @@ -54,7 +54,7 @@ So that I will be able to manage files, see where they have been used in content @javascript @local @development @staging @production Scenario: Check if content admins can delete files - When I go to "admin/content/media" + When I go to "/admin/content/media" And I wait Then I should see "Add media" When I fill in "Flag Earth after edit" for "edit-name" diff --git a/tests/features/varbase/step2-apply-tests/03-admin-management/03-05-json-api-admin-checks-for-the-interface-and-services.feature b/tests/features/varbase/step2-apply-tests/03-admin-management/03-05-json-api-admin-checks-for-the-interface-and-services.feature index fa92d3b8..eb7ce568 100644 --- a/tests/features/varbase/step2-apply-tests/03-admin-management/03-05-json-api-admin-checks-for-the-interface-and-services.feature +++ b/tests/features/varbase/step2-apply-tests/03-admin-management/03-05-json-api-admin-checks-for-the-interface-and-services.feature @@ -6,61 +6,49 @@ So that I can use them to enable or disable API service for Varbase APIs. Background: Given I am a logged in user with the "webmaster" user - @javascript @check @local @development @staging @production + @check @local @development @staging @production Scenario: Check the Varbase API settings in admin configurations page When I go to "/admin/config" - And I wait max of 5s + And I wait Then I should see "JSON:API" And I should see "Varbase API settings" - @javascript @check @local @development @staging @production + @check @local @development @staging @production Scenario: Check JSON:API configurations When I go to "/admin/config/services/jsonapi" - And I wait max of 5s + And I wait Then I should see "JSON:API" And I should see "Allowed operations" @check @local @development @staging @production Scenario: Check JSON:API Extras configurations When I go to "/admin/config/services/jsonapi/extras" - And I wait max of 5s + And I wait Then I should see "JSON:API Extras" And I should see "api" value in the "edit-path-prefix" input element - @javascript @check @local @development @staging @production + @check @local @development @staging @production Scenario: Check JSON:API Resource overrides When I go to "/admin/config/services/jsonapi/resource_types" - And I wait max of 5s + And I wait Then I should see "JSON:API Resource overrides" And I should see "The following table shows the list of JSON:API resource types available." - @javascript @check @local @development @staging @production + @check @local @development @staging @production Scenario: Check Varbase API settings and Generate keys When I go to "/admin/config/system/varbase/api" - And I wait max of 5s + And I wait Then I should see "Varbase API settings" And the "entity_json" checkbox is checked And the "bundle_docs" checkbox is checked When I go to "/admin/config/system/varbase/api/keys" - And I wait max of 5s + And I wait Then I should see "Path to the directory in which to store the generated keys." - @javascript @check @local @development @staging @production + @check @local @development @staging @production Scenario: Check Open API settings and documentation pages When I go to "/admin/config/services/openapi" - And I wait 5s + And I wait Then I should see "OpenAPI Resources" And I should see "Rest" And I should see "JSON:API" - - When I go to "/admin/config/services/openapi/redoc/rest" - And I wait 5s - Then I should see "The REST API provide by the core REST module" - - When I go to "/admin/config/services/openapi/redoc/jsonapi" - And I wait 5s - Then I should see "This is a JSON API compliant implementation" - - When I go to "/admin/config/services/openapi/swagger/jsonapi" - And I wait 5s - Then I should see "OpenAPI Documentation" \ No newline at end of file diff --git a/tests/features/varbase/step2-apply-tests/04-content-structure/04-01-basic-page-permissions.feature b/tests/features/varbase/step2-apply-tests/04-content-structure/04-01-basic-page-permissions.feature index 76970b65..36e33ba2 100644 --- a/tests/features/varbase/step2-apply-tests/04-content-structure/04-01-basic-page-permissions.feature +++ b/tests/features/varbase/step2-apply-tests/04-content-structure/04-01-basic-page-permissions.feature @@ -61,7 +61,7 @@ So that the "Basic page" will show up in the structured menu under its parent pa @javascript @local @development @staging @production Scenario: Check if we can create a Test Basic page we can see Change layout floating button to change the layout Given I am a logged in user with the "test_super_admin" user - When I go to "node/add/page" + When I go to "/node/add/page" And I wait And I fill in "Test Basic page" for "Title" And I fill in the rich text editor field "Body" with "Test Basic page body" @@ -73,7 +73,7 @@ So that the "Basic page" will show up in the structured menu under its parent pa @javascript @local @development @staging @production Scenario: Check if a user with a permission to manage Basic page content type Given I am a logged in user with the "test_super_admin" user - When I go to "admin/content" + When I go to "/admin/content" And I wait Then I should see "Content" When I fill in "Test Basic page" for "Title" @@ -82,7 +82,7 @@ So that the "Basic page" will show up in the structured menu under its parent pa Then I should see "Test Basic page" When I click "Test Basic page" And I wait - When I go to "admin/content" + When I go to "/admin/content" And I wait Then I should see "Content" When I fill in "Test Basic page" for "Title" diff --git a/tests/features/varbase/step2-apply-tests/04-content-structure/04-03-landing-page-paragraphs_add-any-paragraph-type-to-the-page.feature b/tests/features/varbase/step2-apply-tests/04-content-structure/04-03-landing-page-paragraphs_add-any-paragraph-type-to-the-page.feature index 12cbf23b..75b7b617 100644 --- a/tests/features/varbase/step2-apply-tests/04-content-structure/04-03-landing-page-paragraphs_add-any-paragraph-type-to-the-page.feature +++ b/tests/features/varbase/step2-apply-tests/04-content-structure/04-03-landing-page-paragraphs_add-any-paragraph-type-to-the-page.feature @@ -6,7 +6,7 @@ So that the Landing page (Paragraphs)" will show up having paragrpahs of differe @local @development @staging @production Scenario: Upload the "Embed Flag Earth" file Given I am a logged in user with the "test_site_admin" user - When I go to "media/add/image" + When I go to "/media/add/image" And I wait Then I should see "Allowed types: png gif jpg jpeg." When I attach the file "flag-earth.jpg" to "edit-field-media-image-0-upload" @@ -35,7 +35,7 @@ So that the Landing page (Paragraphs)" will show up having paragrpahs of differe @javascript @local @development @staging @production Scenario: Check if a user with a permission to manage Landing page (Paragraphs) content type can add paragraphs of type Drupal Block Given I am a logged in user with the "test_site_admin" user - When I go to "node/add/landing_page" + When I go to "/node/add/landing_page" And I wait And I fill in "Test Landing page Drupal Block" for "Title" And I fill in "Test Landing page description Drupal Block" for "Page description" @@ -57,7 +57,7 @@ So that the Landing page (Paragraphs)" will show up having paragrpahs of differe @javascript @local @development @staging @production Scenario: Check if a user with a permission to manage Landing page (Paragraphs) content type can add paragraphs of type Columns Equal Given I am a logged in user with the "test_site_admin" user - When I go to "node/add/landing_page" + When I go to "/node/add/landing_page" And I wait And I fill in "Test Landing page Columns (Equal)" for "Title" And I fill in "Test Landing page description Columns (Equal)" for "Page description" @@ -76,7 +76,7 @@ So that the Landing page (Paragraphs)" will show up having paragrpahs of differe @javascript @local @development @staging @production Scenario: Check if a user with a permission to manage Landing page (Paragraphs) content type can add paragraphs of type Columns Two Uneven Given I am a logged in user with the "test_site_admin" user - When I go to "node/add/landing_page" + When I go to "/node/add/landing_page" And I wait And I fill in "Test Landing page Columns (Two Uneven)" for "Title" And I fill in "Test Landing page description Columns (Two Uneven)" for "Page description" @@ -95,7 +95,7 @@ So that the Landing page (Paragraphs)" will show up having paragrpahs of differe @javascript @local @development @staging @production Scenario: Check if a user with a permission to manage Landing page (Paragraphs) content type can add paragraphs of type Modal Given I am a logged in user with the "test_site_admin" user - When I go to "node/add/landing_page" + When I go to "/node/add/landing_page" And I wait And I fill in "Test Landing page Modal" for "Title" And I fill in "Test Landing page description Modal" for "Page description" @@ -128,7 +128,7 @@ So that the Landing page (Paragraphs)" will show up having paragrpahs of differe @javascript @local @development @staging @production Scenario: Check if a user with a permission to manage Landing page (Paragraphs) content type can add paragraphs of type Rich Text Given I am a logged in user with the "test_site_admin" user - When I go to "node/add/landing_page" + When I go to "/node/add/landing_page" And I wait And I fill in "Test Landing page Rich Text" for "Title" And I fill in "Test Landing page description Rich Text" for "Page description" @@ -150,7 +150,7 @@ So that the Landing page (Paragraphs)" will show up having paragrpahs of differe @javascript @local @development @staging @production Scenario: Check if a user with a permission to manage Landing page (Paragraphs) content type can add paragraphs of type WebForm Given I am a logged in user with the "test_site_admin" user - When I go to "node/add/landing_page" + When I go to "/node/add/landing_page" And I wait And I fill in "Test Landing page WebForm" for "Title" And I fill in "Test Landing page description WebForm" for "Page description" diff --git a/tests/features/varbase/step2-apply-tests/04-content-structure/04-04-landing-page-paragraphs_text-and-image-paragraphs.feature b/tests/features/varbase/step2-apply-tests/04-content-structure/04-04-landing-page-paragraphs_text-and-image-paragraphs.feature index e621443e..5d61cd5b 100644 --- a/tests/features/varbase/step2-apply-tests/04-content-structure/04-04-landing-page-paragraphs_text-and-image-paragraphs.feature +++ b/tests/features/varbase/step2-apply-tests/04-content-structure/04-04-landing-page-paragraphs_text-and-image-paragraphs.feature @@ -6,7 +6,7 @@ So that the "Landing page (Paragraphs)" will have text and images in right and l @local @development @staging @production Scenario: Upload the Embed Flag Earth file Given I am a logged in user with the "test_site_admin" user - When I go to "media/add/image" + When I go to "/media/add/image" And I wait Then I should see "Allowed types: png gif jpg jpeg." When I attach the file "flag-earth.jpg" to "edit-field-media-image-0-upload" @@ -26,7 +26,7 @@ So that the "Landing page (Paragraphs)" will have text and images in right and l Scenario: Check if a user with a permission to manage Landing page (Paragraphs) content type create a new Landing page Given I am a logged in user with the "test_site_admin" user - When I go to "node/add/landing_page" + When I go to "/node/add/landing_page" And I wait And I fill in "Test landing page title for text and image paragraphs" for "Title" And I fill in "Test landing page body description." for "Page description" diff --git a/tests/features/varbase/step2-apply-tests/04-content-structure/04-08-landing-page-layout-builder_check-to-add-sections-and-choose-layouts-for-sections.feature b/tests/features/varbase/step2-apply-tests/04-content-structure/04-08-landing-page-layout-builder_check-to-add-sections-and-choose-layouts-for-sections.feature index 1793ecf7..51d283ce 100644 --- a/tests/features/varbase/step2-apply-tests/04-content-structure/04-08-landing-page-layout-builder_check-to-add-sections-and-choose-layouts-for-sections.feature +++ b/tests/features/varbase/step2-apply-tests/04-content-structure/04-08-landing-page-layout-builder_check-to-add-sections-and-choose-layouts-for-sections.feature @@ -6,7 +6,7 @@ So that the "Landing (Layout Builder) page" will show up having the listed secti @javascript @local @development @staging @production Scenario: Check if a user with a permission to manage Landing page (Layout Builder) content type can add sections with any layouts to the page Given I am a logged in user with the "test_site_admin" user - When I go to "node/add/landing_page_lb" + When I go to "/node/add/landing_page_lb" And I wait Then I should see "Create Landing page (Layout Builder)" When I fill in "Full Width - No Background Color - Text only" for "Title" diff --git a/tests/features/varbase/step2-apply-tests/05-content-management/05-01-entityqueue-reverse-order-in-admin-view.feature b/tests/features/varbase/step2-apply-tests/05-content-management/05-01-entityqueue-reverse-order-in-admin-view.feature index 6138bbd9..f2e0e5bd 100644 --- a/tests/features/varbase/step2-apply-tests/05-content-management/05-01-entityqueue-reverse-order-in-admin-view.feature +++ b/tests/features/varbase/step2-apply-tests/05-content-management/05-01-entityqueue-reverse-order-in-admin-view.feature @@ -45,3 +45,31 @@ Scenario: Check that Reverse order in admin view is working And I should see "Test content N3" in the "Test content N3" row And I should see "Test content N2" in the "Test content N2" row And I should see "Test content N1" in the "Test content N1" row + + # Delete test content for subqueue test queue. + When I go to "/admin/content" + And I wait + Then I should see "Content" + When I check the box "Test content N1" + And I check the box "Test content N2" + And I check the box "Test content N3" + And I select "Delete selected entities / translations" from "action" + When I press "Apply to selected items" + And I wait + Then I should see "Items selected:" + And I should see "Test content N1" + And I should see "Test content N2" + And I should see "Test content N3" + When I press "Execute action" + And I wait 10s + Then I should see "Action processing results: Delete entities (3)." + + When I go to "/admin/structure/entityqueue" + And I wait + Then I should see "Test Queue" + When I click "Edit items" in the "Test Queue" row + And I wait + Then I should see "Edit subqueue Test Queue" + And I should not see "Test content N3" + And I should not see "Test content N2" + And I should not see "Test content N1" \ No newline at end of file diff --git a/tests/features/varbase/step2-apply-tests/05-content-management/05-02-entityqueue-tasks-for-content-types.feature b/tests/features/varbase/step2-apply-tests/05-content-management/05-02-entityqueue-tasks-for-content-types.feature index 02022db9..6094e94e 100644 --- a/tests/features/varbase/step2-apply-tests/05-content-management/05-02-entityqueue-tasks-for-content-types.feature +++ b/tests/features/varbase/step2-apply-tests/05-content-management/05-02-entityqueue-tasks-for-content-types.feature @@ -25,4 +25,4 @@ Scenario: Check if queuable content have the Entityqueue tab at the full content Then I should see "Remove from queue" When I click "Remove from queue" And I wait for AJAX to finish - Then I should see "Add to queue" + Then I should see "Add to queue" \ No newline at end of file diff --git a/tests/features/varbase/step2-apply-tests/05-content-management/05-03-add-hero-slider-to-entityqueue-using-entityqueue-form-widget.feature b/tests/features/varbase/step2-apply-tests/05-content-management/05-03-add-hero-slider-to-entityqueue-using-entityqueue-form-widget.feature index 95984c53..388d427b 100644 --- a/tests/features/varbase/step2-apply-tests/05-content-management/05-03-add-hero-slider-to-entityqueue-using-entityqueue-form-widget.feature +++ b/tests/features/varbase/step2-apply-tests/05-content-management/05-03-add-hero-slider-to-entityqueue-using-entityqueue-form-widget.feature @@ -5,7 +5,7 @@ I want to be able to add and remove entities to any allowed entity queue. @local @development @staging @production Scenario: Upload the Flag Earth file Given I am a logged in user with the "test_site_admin" user - When I go to "media/add/image" + When I go to "/media/add/image" And I wait Then I should see "Allowed types: png gif jpg jpeg." When I attach the file "flag-earth.jpg" to "edit-field-media-image-0-upload" @@ -22,9 +22,11 @@ I want to be able to add and remove entities to any allowed entity queue. #----------------------------------------------------------------------------- @javascript @local @development @staging @production - Scenario: Add a Test hero sliders to the heroslider entity queue. + Scenario: Add a Test hero sliders to the heroslider entity queue them remove them Given I am a logged in user with the "test_super_admin" user - When I go to "node/add/varbase_heroslider_media" + + # Add the "Test hero slier #1" content and to the hero slider queue. + When I go to "/node/add/varbase_heroslider_media" And I wait max of 5s for the page to be ready and loaded Then I should see "Create Hero slider" When I fill in "Test hero slider #1" for "Slide title" @@ -40,7 +42,7 @@ I want to be able to add and remove entities to any allowed entity queue. And I wait for AJAX to finish And I press "dialog-submit" And I wait for AJAX to finish - And wait max of 5s + And I wait max of 5s And I expand the field "edit-entityqueue-form-widget" And I wait for AJAX to finish Then I should see "Choose from the available entityqueues below to push this content to." @@ -50,7 +52,8 @@ I want to be able to add and remove entities to any allowed entity queue. And I wait Then I should see "Test hero slider #1" - When I go to "node/add/varbase_heroslider_media" + # Add the "Test hero slier #2" content and to the hero slider queue. + When I go to "/node/add/varbase_heroslider_media" And I wait max of 2s for the page to be ready and loaded Then I should see "Create Hero slider" When I fill in "Test hero slider #2" for "Slide title" @@ -66,7 +69,7 @@ I want to be able to add and remove entities to any allowed entity queue. And I wait for AJAX to finish And I press "dialog-submit" And I wait for AJAX to finish - And wait max of 5s + And I wait max of 5s And I expand the field "edit-entityqueue-form-widget" And I wait for AJAX to finish Then I should see "Choose from the available entityqueues below to push this content to." @@ -76,58 +79,30 @@ I want to be able to add and remove entities to any allowed entity queue. And I wait Then I should see "Test hero slider #2" - When I go to "admin/structure/entityqueue/varbase_heroslider_media/varbase_heroslider_media" + # Check that both hero sliders are listed in the queue. + When I go to "/admin/structure/entityqueue/varbase_heroslider_media/varbase_heroslider_media" And I wait Then I should see "Test hero slider #1" And I should see "Test hero slider #2" - When I go to "admin/content" - And I wait - Then I should see "Content" - When I fill in "Test hero slider #1" for "Title" - And I press the "Filter" button - And I wait - Then I should see "Test hero slider #1" - When I click "Edit" in the "Test hero slider #1" row - And I wait - And I expand the field "edit-entityqueue-form-widget" - Then the "varbase_heroslider_media" checkbox should be checked - When I uncheck the box "varbase_heroslider_media" - And I select "published" from "edit-moderation-state-0-state" - And I press the "Save" button - And I go to "admin/structure/entityqueue/varbase_heroslider_media/varbase_heroslider_media" - And I wait - Then I should not see "Test hero slider #1" - - When I go to "admin/content" + # Delete both sliders. + When I go to "/admin/content" And I wait Then I should see "Content" - When I fill in "Test hero slider #1" for "Title" - And I press the "Filter" button + When I check the box "Test hero slider #1" + And I check the box "Test hero slider #2" + And I select "Delete selected entities / translations" from "action" + When I press "Apply to selected items" And I wait - Then I should see "Test hero slider #1" - When I click "Edit" in the "Test hero slider #1" row - And I wait - Then I should see "Delete" - When I click "edit-delete" - And I wait - Then I should see "This action cannot be undone." - When I press the "Delete" button - And I wait - Then I should see "The Hero slider Test hero slider #1 has been deleted." + Then I should see "Items selected:" + And I should see "Test hero slider #1" + And I should see "Test hero slider #2" + When I press "Execute action" + And I wait 10s + Then I should see "Action processing results: Delete entities (2)." - When I go to "admin/content" + # Check that the 2 hero sliders had beend removed from the queue. + When I go to "/admin/structure/entityqueue/varbase_heroslider_media/varbase_heroslider_media" And I wait - Then I should see "Content" - When I fill in "Test hero slider #2" for "Title" - And I press the "Filter" button - And I wait - Then I should see "Test hero slider #2" - When I click "Edit" in the "Test hero slider #2" row - Then I should see "Delete" - When I click "edit-delete" - And I wait - Then I should see "This action cannot be undone." - When I press the "Delete" button - And I wait - Then I should see "The Hero slider Test hero slider #2 has been deleted." + Then I should not see "Test hero slider #1" + And I should not see "Test hero slider #2" \ No newline at end of file diff --git a/tests/features/varbase/step2-apply-tests/05-content-management/05-04-cloning-content-and-entities.feature b/tests/features/varbase/step2-apply-tests/05-content-management/05-04-cloning-content-and-entities.feature index 1f8a1075..6dcc5b97 100644 --- a/tests/features/varbase/step2-apply-tests/05-content-management/05-04-cloning-content-and-entities.feature +++ b/tests/features/varbase/step2-apply-tests/05-content-management/05-04-cloning-content-and-entities.feature @@ -5,7 +5,7 @@ I want to be able to clone an entity. @javascript @local @development Scenario: Check if a user with a permission can clone a Landing page (Paragraphs) Given I am a logged in user with the "test_site_admin" user - When I go to "node/add/landing_page" + When I go to "/node/add/landing_page" And I wait And I fill in "Test Clone landing page" for "Title" And I fill in "Test landing page description text" for "Page description" @@ -32,7 +32,7 @@ I want to be able to clone an entity. And I press the "Save" button And I wait Then I should see "Modal button" - When I go to "admin/content" + When I go to "/admin/content" And I wait Then I should see "Content" When I fill in "Test Clone landing page" for "Title" @@ -56,7 +56,7 @@ I want to be able to clone an entity. @javascript @local @development Scenario: Check if a user with a permission deleted a cloned entity the original will not affected Given I am a logged in user with the "test_super_admin" user - When I go to "admin/content" + When I go to "/admin/content" And I wait Then I should see "Content" When I fill in "Test Clone landing page - Cloned" for "Title" @@ -71,7 +71,7 @@ I want to be able to clone an entity. When I press "Execute action" And I wait for 5s Then I should see "Action processing results: Delete entities (1)." - When I go to "admin/content" + When I go to "/admin/content" And I wait Then I should see "Content" When I fill in "Test Clone landing page - Cloned" for "Title" diff --git a/tests/features/varbase/step2-apply-tests/05-content-management/05-05-embed-existing-media-image-library.feature b/tests/features/varbase/step2-apply-tests/05-content-management/05-05-embed-existing-media-image-library.feature index 3d811f7a..f7bc6dc8 100644 --- a/tests/features/varbase/step2-apply-tests/05-content-management/05-05-embed-existing-media-image-library.feature +++ b/tests/features/varbase/step2-apply-tests/05-content-management/05-05-embed-existing-media-image-library.feature @@ -10,7 +10,7 @@ So that it will show up under that rich text field without having to upload the # ---------------------------------------------------------------------------- @javascript @local @development @staging @production Scenario: Create the Test Basic page to embed existing files content - When I go to "node/add/page" + When I go to "/node/add/page" And I wait And I fill in "Test Basic page to embed existing files" for "Title" And I fill in the rich text editor field "Body" with "Test Basic page body to embed existing files" @@ -39,7 +39,7 @@ So that it will show up under that rich text field without having to upload the # @javascript @local @development @staging @production # Scenario: Check if we are able to embed existing files library in the rich text editor -# When I go to "admin/content" +# When I go to "/admin/content" # And I wait # Then I should see "Content" # When I fill in "Test Basic page to embed existing files" for "Title" @@ -77,7 +77,7 @@ So that it will show up under that rich text field without having to upload the # And I press the "Save" button # And I wait # Then I should see "Basic page Test Basic page to embed existing files has been updated." -# When I go to "admin/content" +# When I go to "/admin/content" # And I wait # Then I should see "Content" # When I fill in "Test Basic page to embed existing files" for "Title" -- GitLab