diff --git a/.circleci/config.yml b/.circleci/config.yml index 3f70f68736c88553f5189c03bb17b47e4d7c765e..642974e85513cf2a7d095bfe50e93a40f0dda455 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -26,7 +26,14 @@ commands: command: | sudo apt -qq update sudo apt -qqy upgrade - sudo apt -yqq install vim links lynx git diffutils htop curl wget p7zip-full unzip zip sed gcc g++ make libfreetype6-dev libaio1 libaio-dev libonig-dev libpng-dev xvfb mysql-client default-mysql-client + sudo apt -yqq install vim links lynx git diffutils htop curl wget p7zip-full unzip zip sed gcc g++ make libfreetype6-dev libaio1 libaio-dev libonig-dev libpng-dev mysql-client default-mysql-client + sudo apt -yqq install xvfb libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 libnss3 + + ## Configure and run the virtual display. + - run: + name: Configure and run the virtual display. + command: Xvfb -ac :99 -screen 0 1600x1200x24 > /dev/null 2>&1 + background: true ## Setup Apache2 and PHP7.4 - run: @@ -138,10 +145,12 @@ commands: cd /var/www/html/test/ sudo chmod 775 . sudo chown www-data:circleci . - composer create-project vardot/varbase:9.1.x varbase --stability dev --no-interaction -vvv + git clone --branch '9.1.x' https://github.com/vardot/varbase.git /var/www/html/test/varbase-code + cp -r /var/www/html/test/varbase-code /var/www/html/test/varbase cd /var/www/html/test/varbase + composer install --no-interaction -vvv composer require drupal/drush_language:~1.0 - cp -r /home/circleci/project /var/www/html/test/varbase/docroot/profiles/varbase + cp -r /var/www/html/test/varbase-code /var/www/html/test/varbase/docroot/profiles/varbase cd /var/www/html/test/varbase sudo rm -rf config configbit css images libraries scripts src tests traslations varbase.info.yml varbase.install varbase.libraries.yml varbase.profile varbase.services.yml yarn.lock sudo chmod 775 -R . @@ -198,12 +207,6 @@ commands: ../bin/drush config:set system.logging error_level all --yes ../bin/drush cr - ## Configure and run the virtual display. - - run: - name: Configure and run the virtual display. - command: Xvfb -ac :99 -screen 0 1024x768x24 > /dev/null 2>&1 - background: true - ## Run selenium standalone server. - run: name: Run selenium standalone server @@ -249,7 +252,7 @@ jobs: no_output_timeout: 30m command: | cd /var/www/html/test/varbase/docroot/profiles/varbase - ../../../bin/behat --strict --no-snippets -f pretty -o std tests/features/varbase/01-website-base-requirements/ + ../../../bin/behat tests/features/varbase/01-website-base-requirements/ varbase-testing-02-user-management-03-admin-management: <<: *defaults steps: @@ -260,8 +263,8 @@ jobs: no_output_timeout: 30m command: | cd /var/www/html/test/varbase/docroot/profiles/varbase - ../../../bin/behat --strict --no-snippets -f pretty -o std tests/features/varbase/02-user-management/ - ../../../bin/behat --strict --no-snippets -f pretty -o std tests/features/varbase/03-admin-management/ + ../../../bin/behat tests/features/varbase/02-user-management/ + ../../../bin/behat tests/features/varbase/03-admin-management/ varbase-testing-04-content-structure: <<: *defaults steps: @@ -272,7 +275,7 @@ jobs: no_output_timeout: 30m command: | cd /var/www/html/test/varbase/docroot/profiles/varbase - ../../../bin/behat --strict --no-snippets -f pretty -o std tests/features/varbase/04-content-structure/ + ../../../bin/behat tests/features/varbase/04-content-structure/ varbase-testing-05-content-management: <<: *defaults steps: @@ -283,7 +286,7 @@ jobs: no_output_timeout: 30m command: | cd /var/www/html/test/varbase/docroot/profiles/varbase - ../../../bin/behat --strict --no-snippets -f pretty -o std tests/features/varbase/05-content-management/ + ../../../bin/behat tests/features/varbase/05-content-management/ workflows: version: 2 @@ -292,24 +295,24 @@ workflows: - varbase-testing-01-website-base-requirements: filters: tags: - only: /^9.*/ + only: /^9.1.*/ branches: only: /^9.1.x/ - varbase-testing-02-user-management-03-admin-management: filters: tags: - only: /^9.*/ + only: /^9.1.*/ branches: only: /^9.1.x/ - varbase-testing-04-content-structure: filters: tags: - only: /^9.*/ + only: /^9.1.*/ branches: only: /^9.1.x/ - varbase-testing-05-content-management: filters: tags: - only: /^9.*/ + only: /^9.1.*/ branches: only: /^9.1.x/ diff --git a/behat.yml b/behat.yml index 1d6fb5ca05d88bb28154d79a2f4e6fd987f7c040..288a95632a9dc2fb8c805d79d1f9a9497d678c08 100644 --- a/behat.yml +++ b/behat.yml @@ -66,29 +66,30 @@ default: chromeOptions: args: - "--disable-gpu" - - "--window-size=1920,1080" + - "--window-size=1600,1200" + - "--no-sandbox" + - "--disable-dev-shm-usage" + - "--disable-setuid-sandbox" w3c: false chrome: switches: - "--headless" - - "no-sandbox" + - "--start-maximized" + - "--disable-gpu" + - "--window-size=1600,1200" - "--no-sandbox" + - "--disable-dev-shm-usage" + - "--disable-setuid-sandbox" - "--disable-web-security" - "--DNS-prefetch-disable" - "--whitelisted-ips" - - "--start-maximized" - "--disable-translate" - "--ignore-certificate-errors" - "--test-type" - - "--disable-dev-shm-usage" - "--disable-extensions" - - "incognito" - - "enable-precise-memory-info" - - "ignore-certificate-errors" - - "disable-infobars" - - "js-flags=--expose-gc" - - "--profile-directory=Default" - - "--user-data-dir=~/.config/google-chrome" + - "--incognito" + - "--ignore-certificate-errors" + - "--disable-infobars" base_url: 'http://varbase.test' # browser_name: 'firefox' browser_name: 'chrome' diff --git a/tests/features/varbase/04-content-structure/04-08-landing-page-layout-builder_check-to-add-sections-and-choose-layouts-for-sections.feature b/tests/features/varbase/04-content-structure/04-08-landing-page-layout-builder_check-to-add-sections-and-choose-layouts-for-sections.feature index 1129fe2b742269d752d74b883d267117fe253aeb..1aac5004c0448f6cc6bb0b5f25087540be811d3c 100644 --- a/tests/features/varbase/04-content-structure/04-08-landing-page-layout-builder_check-to-add-sections-and-choose-layouts-for-sections.feature +++ b/tests/features/varbase/04-content-structure/04-08-landing-page-layout-builder_check-to-add-sections-and-choose-layouts-for-sections.feature @@ -3,21 +3,21 @@ As a logged in user with a permission to mange Landing (Layout Builder) pages I want to be able to add sections with any layouts to the page So that the "Landing (Layout Builder) page" will show up having the listed section with their content - @javascript @local @development @staging @production +@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 "Site admin" user + Given I am a logged in user with the "Site admin" user 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 "Automated test landing page" for "Title" + When I fill in "Test Landing page (Layout Builder)" for "Title" And I fill in "Test Landing page (Layout Builder) description" for "Page description" And I select "published" from "Save as" And I press the "Save" button And I wait - Then I should see "Landing page (Layout Builder) Automated test landing page has been created" + Then I should see "Landing page (Layout Builder) Test Landing page (Layout Builder) has been created" And I should see "This layout builder tool allows you to configure the layout of the main content area." When I scroll to the bottom of the page - And I wait 1s + And I wait 2s Then I should see "Add section at end of layout" When I click "Add section at end of layout" And I wait for AJAX to finish @@ -26,235 +26,500 @@ So that the "Landing (Layout Builder) page" will show up having the listed secti And I should see "Bootstrap 2 Cols" And I should see "Bootstrap 3 Cols" And I should see "Bootstrap 4 Cols" + And I should not see "Bootstrap 5 Cols" And I should see "Bootstrap 6 Cols" + And I should not see "Bootstrap 7 Cols" + And I should not see "Bootstrap 8 Cols" + And I should not see "Bootstrap 9 Cols" + And I should not see "Bootstrap 10 Cols" + And I should not see "Bootstrap 11 Cols" + And I should not see "Bootstrap 12 Cols" + And I scroll to the top of the page + And I wait 1s + Then I should see "Save layout" + When I press the "Save layout" button + And I wait + Then I should see "The layout override has been saved." + And I should see "Test Landing page (Layout Builder)" - Then I click "Bootstrap 1 Col" + @javascript @local @development + Scenario: Check that Site admins can add a one coloumn section and add a Rech text block in the section + Given I am a logged in user with the "Site admin" user + When I go to "/admin/content" + And I wait + Then I should see "Content" + When I fill in "Test Landing page (Layout Builder)" for "Title" + And I press the "Filter" button + And I wait + Then I should see "Test Landing page (Layout Builder)" + When I click "Test Landing page (Layout Builder)" + And I wait + Then I should see "Test Landing page (Layout Builder)" + When I click "Tasks" + And I wait for AJAX to finish + And I should see "Layout" + When I click "Layout" + And I wait + Then I should see "This layout builder tool allows you to configure the layout of the main content area." + When I scroll to the bottom of the page + And I wait 2s + Then I should see "Add section at end of layout" + When I click "Add section at end of layout" + And I wait for AJAX to finish + Then I should see "Choose a layout for this section" + And I should see "Bootstrap 1 Col" + When I click "Bootstrap 1 Col" And I wait for AJAX to finish - Then I press the "Add section" button + And I press the "Add section" button And I wait for AJAX to finish - Then I click "in Section 2, Col 1 region" + Then I should see "Add block in Section 2, Col 1 region" + + When I click "Add block in Section 2, Col 1 region" And I wait for AJAX to finish - Then I click "Create custom block" + Then I should see "Create custom block" + When I click "Create custom block" And I wait for AJAX to finish - Then I click "Rich text" + Then I should see "Rich text" + When I click "Rich text" And I wait for AJAX to finish + Then I should see "Configure block" When I check the box "Display title" - Then I fill in "Rich text in 1 col section" for "Title" + And I fill in "Rich text in 1 col section" for "Title" And I fill in the rich text editor field "Body" with "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean lacinia sapien quis tempor placerat. Nulla faucibus rhoncus est, vel malesuada nisl pulvinar ut. Sed vulputate est nec dui finibus, tempus lobortis quam mattis. Fusce facilisis ut nunc ut scelerisque. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed aliquet purus vitae augue lobortis accumsan ut nec nulla. Cras nisi mauris, gravida ac" - When I press the "Add block" button - Then I wait for AJAX to finish - And I scroll to the bottom of the page - And I wait 1s - Then I click "Add section at end of layout" + And I press the "Add block" button And I wait for AJAX to finish - - Then I click "Bootstrap 2 Cols" + Then I should see "Rich text in 1 col section" + + When I scroll to the top of the page + And I wait 2s + Then I should see "Save layout" + When I press the "Save layout" button + And I wait + Then I should see "The layout override has been saved." + And I should see "Test Landing page (Layout Builder)" + And I should see "Rich text in 1 col section" + + @javascript @local @development + Scenario: Check that Site admins can add a two coloumns section and add a Rech text blocks in each coloumns + Given I am a logged in user with the "Site admin" user + When I go to "/admin/content" + And I wait + Then I should see "Content" + When I fill in "Test Landing page (Layout Builder)" for "Title" + And I press the "Filter" button + And I wait + Then I should see "Test Landing page (Layout Builder)" + When I click "Test Landing page (Layout Builder)" + And I wait + Then I should see "Test Landing page (Layout Builder)" + When I click "Tasks" + And I wait for AJAX to finish + And I should see "Layout" + When I click "Layout" + And I wait + Then I should see "This layout builder tool allows you to configure the layout of the main content area." + When I scroll to the bottom of the page + And I wait 2s + Then I should see "Add section at end of layout" + When I click "Add section at end of layout" + And I wait for AJAX to finish + Then I should see "Choose a layout for this section" + And I should see "Bootstrap 2 Cols" + When I click "Bootstrap 2 Cols" + And I wait for AJAX to finish + And I press the "Add section" button + Then I should see "Add block in Section 3, Col 1 region" + And I should see "Add block in Section 3, Col 2 region" + + When I click "Add block in Section 3, Col 1 region" And I wait for AJAX to finish - Then I press the "Add section" button - And I click "in Section 3, Col 1 region" - Then I wait for AJAX to finish - Then I click "Create custom block" + Then I should see "Create custom block" + When I click "Create custom block" And I wait for AJAX to finish + Then I should see "Rich text" When I click "Rich text" And I wait for AJAX to finish - Then I check the box "Display title" - Then I fill in "Rich text in 2 cols section, col 1" for "Title" + Then I should see "Configure block" + When I check the box "Display title" + And I fill in "Rich text in 2 cols section, col 1" for "Title" And I fill in the rich text editor field "Body" with "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean lacinia sapien quis tempor placerat. Nulla faucibus rhoncus est, vel malesuada nisl pulvinar ut. Sed vulputate est nec dui finibus, tempus lobortis quam mattis. Fusce facilisis ut nunc ut scelerisque. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed aliquet purus vitae augue lobortis accumsan ut nec nulla. Cras nisi mauris, gravida ac" And I press the "Add block" button + And I wait for AJAX to finish + Then I should see "Rich text in 2 cols section, col 1" - When I click "in Section 3, Col 2 region" + When I click "Add block in Section 3, Col 2 region" And I wait for AJAX to finish - Then I click "Create custom block" + Then I should see "Create custom block" + When I click "Create custom block" And I wait for AJAX to finish + Then I should see "Rich text" When I click "Rich text" And I wait for AJAX to finish - Then I check the box "Display title" - Then I fill in "Rich text in 2 cols section, col 2" for "Title" + Then I should see "Configure block" + When I check the box "Display title" + And I fill in "Rich text in 2 cols section, col 2" for "Title" And I fill in the rich text editor field "Body" with "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean lacinia sapien quis tempor placerat. Nulla faucibus rhoncus est, vel malesuada nisl pulvinar ut. Sed vulputate est nec dui finibus, tempus lobortis quam mattis. Fusce facilisis ut nunc ut scelerisque. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed aliquet purus vitae augue lobortis accumsan ut nec nulla. Cras nisi mauris, gravida ac" - Then I press the "Add block" button + And I press the "Add block" button And I wait for AJAX to finish + Then I should see "Rich text in 2 cols section, col 2" - And I scroll to the bottom of the page - And I wait 1s - Then I click "Add section at end of layout" + When I scroll to the top of the page + And I wait 2s + Then I should see "Save layout" + When I press the "Save layout" button + And I wait + Then I should see "The layout override has been saved." + And I should see "Test Landing page (Layout Builder)" + And I should see "Rich text in 2 cols section, col 1" + And I should see "Rich text in 2 cols section, col 2" + + @javascript @local @development + Scenario: Check that Site admins can add a three coloumns section and add a Rech text blocks in each coloumns + Given I am a logged in user with the "Site admin" user + When I go to "/admin/content" + And I wait + Then I should see "Content" + When I fill in "Test Landing page (Layout Builder)" for "Title" + And I press the "Filter" button + And I wait + Then I should see "Test Landing page (Layout Builder)" + When I click "Test Landing page (Layout Builder)" + And I wait + Then I should see "Test Landing page (Layout Builder)" + When I click "Tasks" + And I wait for AJAX to finish + And I should see "Layout" + When I click "Layout" + And I wait + Then I should see "This layout builder tool allows you to configure the layout of the main content area." + When I scroll to the bottom of the page + And I wait 2s + Then I should see "Add section at end of layout" + When I click "Add section at end of layout" And I wait for AJAX to finish - Then I click "Bootstrap 3 Cols" + Then I should see "Choose a layout for this section" + And I should see "Bootstrap 3 Cols" + When I click "Bootstrap 3 Cols" And I wait for AJAX to finish - Then I press the "Add section" button + And I press the "Add section" button And I wait for AJAX to finish - Then I click "in Section 4, Col 1 region" + Then I should see "Add block in Section 4, Col 1 region" + And I should see "Add block in Section 4, Col 2 region" + And I should see "Add block in Section 4, Col 3 region" + + When I click "Add block in Section 4, Col 1 region" And I wait for AJAX to finish - Then I click "Create custom block" + Then I should see "Create custom block" + When I click "Create custom block" And I wait for AJAX to finish - Then I click "Rich text" + Then I should see "Rich text" + When I click "Rich text" And I wait for AJAX to finish - And I check the box "Display title" - Then I fill in "Rich text in 3 cols section, col 1" for "Title" + Then I should see "Configure block" + When I check the box "Display title" + And I fill in "Rich text in 3 cols section, col 1" for "Title" And I fill in the rich text editor field "Body" with "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean lacinia sapien quis tempor placerat. Nulla faucibus rhoncus est, vel malesuada nisl pulvinar ut. Sed vulputate est nec dui finibus, tempus lobortis quam mattis. Fusce facilisis ut nunc ut scelerisque." - Then I press the "Add block" button + And I press the "Add block" button And I wait for AJAX to finish - - Then I click "in Section 4, Col 2 region" + Then I should see "Rich text in 3 cols section, col 1" + + Then I click "Add block in Section 4, Col 2 region" And I wait for AJAX to finish - Then I click "Create custom block" + Then I should see "Create custom block" + When I click "Create custom block" And I wait for AJAX to finish - Then I click "Rich text" + Then I should see "Rich text" + When I click "Rich text" And I wait for AJAX to finish - And I check the box "Display title" - Then I fill in "Rich text in 3 cols section, col 2" for "Title" + Then I should see "Configure block" + When I check the box "Display title" + And I fill in "Rich text in 3 cols section, col 2" for "Title" And I fill in the rich text editor field "Body" with "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean lacinia sapien quis tempor placerat. Nulla faucibus rhoncus est, vel malesuada nisl pulvinar ut. Sed vulputate est nec dui finibus, tempus lobortis quam mattis. Fusce facilisis ut nunc ut scelerisque." - Then I press the "Add block" button + And I press the "Add block" button And I wait for AJAX to finish + Then I should see "Rich text in 3 cols section, col 2" - Then I click "in Section 4, Col 3 region" + Then I click "Add block in Section 4, Col 3 region" And I wait for AJAX to finish - Then I click "Create custom block" + Then I should see "Create custom block" + When I click "Create custom block" And I wait for AJAX to finish - Then I click "Rich text" + Then I should see "Rich text" + When I click "Rich text" And I wait for AJAX to finish - And I check the box "Display title" - Then I fill in "Rich text in 3 cols section, col 3" for "Title" + Then I should see "Configure block" + When I check the box "Display title" + And I fill in "Rich text in 3 cols section, col 3" for "Title" And I fill in the rich text editor field "Body" with "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean lacinia sapien quis tempor placerat. Nulla faucibus rhoncus est, vel malesuada nisl pulvinar ut. Sed vulputate est nec dui finibus, tempus lobortis quam mattis. Fusce facilisis ut nunc ut scelerisque." - Then I press the "Add block" button + And I press the "Add block" button And I wait for AJAX to finish + Then I should see "Rich text in 3 cols section, col 3" - And I scroll to the bottom of the page - And I wait 1s - Then I click "Add section at end of layout" + When I scroll to the top of the page + And I wait 2s + Then I should see "Save layout" + When I press the "Save layout" button + And I wait + Then I should see "The layout override has been saved." + And I should see "Test Landing page (Layout Builder)" + And I should see "Rich text in 3 cols section, col 1" + And I should see "Rich text in 3 cols section, col 2" + And I should see "Rich text in 3 cols section, col 3" + + @javascript @local @development + Scenario: Check that Site admins can add a foure coloumns section and add a Rech text blocks in each coloumns + Given I am a logged in user with the "Site admin" user + When I go to "/admin/content" + And I wait + Then I should see "Content" + When I fill in "Test Landing page (Layout Builder)" for "Title" + And I press the "Filter" button + And I wait + Then I should see "Test Landing page (Layout Builder)" + When I click "Test Landing page (Layout Builder)" + And I wait + Then I should see "Test Landing page (Layout Builder)" + When I click "Tasks" + And I wait for AJAX to finish + Then I should see "Layout" + When I click "Layout" + And I wait + Then I should see "This layout builder tool allows you to configure the layout of the main content area." + When I scroll to the bottom of the page + And I wait 2s + Then I should see "Add section at end of layout" + When I click "Add section at end of layout" And I wait for AJAX to finish - Then I click "Bootstrap 4 Cols" + Then I should see "Choose a layout for this section" + And I should see "Bootstrap 4 Cols" + When I click "Bootstrap 4 Cols" And I wait for AJAX to finish - Then I press the "Add section" button + And I press the "Add section" button And I wait for AJAX to finish - And I click "in Section 5, Col 1 region" - Then I wait for AJAX to finish - Then I click "Create custom block" + Then I should see "Add block in Section 5, Col 1 region" + And I should see "Add block in Section 5, Col 2 region" + And I should see "Add block in Section 5, Col 3 region" + And I should see "Add block in Section 5, Col 4 region" + + When I click "Add block in Section 5, Col 1 region" And I wait for AJAX to finish - Then I click "Rich text" + Then I should see "Create custom block" + When I click "Create custom block" And I wait for AJAX to finish - And I check the box "Display title" - Then I fill in "Rich text in 4 cols section, col 1" for "Title" + Then I should see "Rich text" + When I click "Rich text" + And I wait for AJAX to finish + Then I should see "Configure block" + When I check the box "Display title" + Then I fill in "Rich text in 4 cols section, col 1" for "Title" And I fill in the rich text editor field "Body" with "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean lacinia sapien quis tempor placerat. Nulla faucibus rhoncus est, vel malesuada nisl pulvinar ut. Sed vulputate est nec dui finibus, tempus lobortis quam mattis. Fusce facilisis ut nunc ut scelerisque." - Then I press the "Add block" button + And I press the "Add block" button And I wait for AJAX to finish - - Then I click "in Section 5, Col 2 region" + Then I should see "Rich text in 4 cols section, col 1" + + When I click "Add block in Section 5, Col 2 region" And I wait for AJAX to finish - Then I click "Create custom block" + Then I should see "Create custom block" + When I click "Create custom block" And I wait for AJAX to finish - Then I click "Rich text" + Then I should see "Rich text" + When I click "Rich text" And I wait for AJAX to finish - And I check the box "Display title" - Then I fill in "Rich text in 4 cols section, col 2" for "Title" + Then I should see "Configure block" + When I check the box "Display title" + And I fill in "Rich text in 4 cols section, col 2" for "Title" And I fill in the rich text editor field "Body" with "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean lacinia sapien quis tempor placerat. Nulla faucibus rhoncus est, vel malesuada nisl pulvinar ut. Sed vulputate est nec dui finibus, tempus lobortis quam mattis. Fusce facilisis ut nunc ut scelerisque." - Then I press the "Add block" button + And I press the "Add block" button And I wait for AJAX to finish + Then I should see "Rich text in 4 cols section, col 2" - Then I click "in Section 5, Col 3 region" + Then I click "Add block in Section 5, Col 3 region" And I wait for AJAX to finish - Then I click "Create custom block" + Then I should see "Create custom block" + When I click "Create custom block" And I wait for AJAX to finish - Then I click "Rich text" + Then I should see "Rich text" + When I click "Rich text" And I wait for AJAX to finish - And I check the box "Display title" - Then I fill in "Rich text in 4 cols section, col 3" for "Title" + Then I should see "Configure block" + When I check the box "Display title" + And I fill in "Rich text in 4 cols section, col 3" for "Title" And I fill in the rich text editor field "Body" with "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean lacinia sapien quis tempor placerat. Nulla faucibus rhoncus est, vel malesuada nisl pulvinar ut. Sed vulputate est nec dui finibus, tempus lobortis quam mattis. Fusce facilisis ut nunc ut scelerisque." - Then I press the "Add block" button + And I press the "Add block" button And I wait for AJAX to finish + Then I should see "Rich text in 4 cols section, col 3" - Then I click "in Section 5, Col 4 region" + Then I click "Add block in Section 5, Col 4 region" And I wait for AJAX to finish - Then I click "Create custom block" + Then I should see "Create custom block" + When I click "Create custom block" And I wait for AJAX to finish - Then I click "Rich text" + Then I should see "Rich text" + When I click "Rich text" And I wait for AJAX to finish - And I check the box "Display title" - Then I fill in "Rich text in 4 cols section, col 4" for "Title" + Then I should see "Configure block" + When I check the box "Display title" + And I fill in "Rich text in 4 cols section, col 4" for "Title" And I fill in the rich text editor field "Body" with "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean lacinia sapien quis tempor placerat. Nulla faucibus rhoncus est, vel malesuada nisl pulvinar ut. Sed vulputate est nec dui finibus, tempus lobortis quam mattis. Fusce facilisis ut nunc ut scelerisque." - Then I press the "Add block" button + And I press the "Add block" button And I wait for AJAX to finish - - And I scroll to the bottom of the page - And I wait 1s - Then I click "Add section at end of layout" + Then I should see "Rich text in 4 cols section, col 4" + + When I scroll to the top of the page + And I wait 2s + Then I should see "Save layout" + When I press the "Save layout" button + And I wait + Then I should see "The layout override has been saved." + And I should see "Test Landing page (Layout Builder)" + And I should see "Rich text in 4 cols section, col 1" + And I should see "Rich text in 4 cols section, col 2" + And I should see "Rich text in 4 cols section, col 3" + And I should see "Rich text in 4 cols section, col 4" + + @javascript @local @development + Scenario: Check that Site admins can add a six coloumns section and add a Rech text blocks in each coloumns + Given I am a logged in user with the "Site admin" user + When I go to "/admin/content" + And I wait + Then I should see "Content" + When I fill in "Test Landing page (Layout Builder)" for "Title" + And I press the "Filter" button + And I wait + Then I should see "Test Landing page (Layout Builder)" + When I click "Test Landing page (Layout Builder)" + And I wait + Then I should see "Test Landing page (Layout Builder)" + When I click "Tasks" + And I wait for AJAX to finish + And I should see "Layout" + When I click "Layout" + And I wait + Then I should see "This layout builder tool allows you to configure the layout of the main content area." + When I scroll to the bottom of the page + And I wait 2s + Then I should see "Add section at end of layout" + When I click "Add section at end of layout" And I wait for AJAX to finish - Then I click "Bootstrap 6 Cols" + Then I should see "Choose a layout for this section" + And I should see "Bootstrap 6 Cols" + When I click "Bootstrap 6 Cols" And I wait for AJAX to finish - Then I press the "Add section" button - And I wait for AJAX to finish - Then I click "in Section 6, Col 1 region" + And I press the "Add section" button And I wait for AJAX to finish - Then I click "Create custom block" + Then I should see "Add block in Section 6, Col 1 region" + And I should see "Add block in Section 6, Col 2 region" + And I should see "Add block in Section 6, Col 3 region" + And I should see "Add block in Section 6, Col 5 region" + And I should see "Add block in Section 6, Col 6 region" + + + When I click "Add block in Section 6, Col 1 region" And I wait for AJAX to finish - Then I click "Rich text" + Then I should see "Create custom block" + When I click "Create custom block" + And I wait for AJAX to finish + Then I should see "Rich text" + When I click "Rich text" And I wait for AJAX to finish - And I check the box "Display title" - Then I fill in "Rich text in 6 cols section, col 1" for "Title" + Then I should see "Configure block" + When I check the box "Display title" + And I fill in "Rich text in 6 cols section, col 1" for "Title" And I fill in the rich text editor field "Body" with "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean lacinia sapien quis tempor placerat. Nulla faucibus rhoncus est" - Then I press the "Add block" button + And I press the "Add block" button And I wait for AJAX to finish - - Then I click "in Section 6, Col 2 region" + Then I should see "Rich text in 6 cols section, col 1" + + Then I click "Add block in Section 6, Col 2 region" And I wait for AJAX to finish - Then I click "Create custom block" + Then I should see "Create custom block" + When I click "Create custom block" And I wait for AJAX to finish - Then I click "Rich text" + Then I should see "Rich text" + When I click "Rich text" And I wait for AJAX to finish - And I check the box "Display title" - Then I fill in "Rich text in 6 cols section, col 2" for "Title" + Then I should see "Configure block" + When I check the box "Display title" + And I fill in "Rich text in 6 cols section, col 2" for "Title" And I fill in the rich text editor field "Body" with "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean lacinia sapien quis tempor placerat. Nulla faucibus rhoncus est" - Then I press the "Add block" button + And I press the "Add block" button And I wait for AJAX to finish - - Then I click "in Section 6, Col 3 region" + Then I should see "Rich text in 6 cols section, col 2" + + Then I click "Add block in Section 6, Col 3 region" And I wait for AJAX to finish - Then I click "Create custom block" + Then I should see "Create custom block" + When I click "Create custom block" And I wait for AJAX to finish - Then I click "Rich text" + Then I should see "Rich text" + When I click "Rich text" And I wait for AJAX to finish - And I check the box "Display title" - Then I fill in "Rich text in 6 cols section, col 3" for "Title" + Then I should see "Configure block" + When I check the box "Display title" + And I fill in "Rich text in 6 cols section, col 3" for "Title" And I fill in the rich text editor field "Body" with "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean lacinia sapien quis tempor placerat. Nulla faucibus rhoncus est" - Then I press the "Add block" button + And I press the "Add block" button And I wait for AJAX to finish + Then I should see "Rich text in 6 cols section, col 3" - Then I click "in Section 6, Col 4 region" + Then I click "Add block in Section 6, Col 4 region" And I wait for AJAX to finish - Then I click "Create custom block" + Then I should see "Create custom block" + When I click "Create custom block" And I wait for AJAX to finish - Then I click "Rich text" + Then I should see "Rich text" + When I click "Rich text" And I wait for AJAX to finish - And I check the box "Display title" - Then I fill in "Rich text in 6 cols section, col 4" for "Title" + Then I should see "Configure block" + When I check the box "Display title" + And I fill in "Rich text in 6 cols section, col 4" for "Title" And I fill in the rich text editor field "Body" with "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean lacinia sapien quis tempor placerat. Nulla faucibus rhoncus est" - Then I press the "Add block" button + And I press the "Add block" button And I wait for AJAX to finish + Then I should see "Rich text in 6 cols section, col 4" - Then I click "in Section 6, Col 5 region" + Then I click "Add block in Section 6, Col 5 region" And I wait for AJAX to finish - Then I click "Create custom block" + Then I should see "Create custom block" + When I click "Create custom block" And I wait for AJAX to finish - Then I click "Rich text" + Then I should see "Rich text" + When I click "Rich text" And I wait for AJAX to finish - And I check the box "Display title" - Then I fill in "Rich text in 6 cols section, col 5" for "Title" + Then I should see "Configure block" + When I check the box "Display title" + And I fill in "Rich text in 6 cols section, col 5" for "Title" And I fill in the rich text editor field "Body" with "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean lacinia sapien quis tempor placerat. Nulla faucibus rhoncus est" - Then I press the "Add block" button + And I press the "Add block" button And I wait for AJAX to finish + Then I should see "Rich text in 6 cols section, col 5" - Then I click "in Section 6, Col 6 region" + When I click "Add block in Section 6, Col 6 region" And I wait for AJAX to finish - Then I click "Create custom block" + Then I should see "Create custom block" + When I click "Create custom block" And I wait for AJAX to finish - Then I click "Rich text" + Then I should see "Rich text" + When I click "Rich text" And I wait for AJAX to finish - And I check the box "Display title" - Then I fill in "Rich text in 6 cols section, col 6" for "Title" + Then I should see "Configure block" + When I check the box "Display title" + And I fill in "Rich text in 6 cols section, col 6" for "Title" And I fill in the rich text editor field "Body" with "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean lacinia sapien quis tempor placerat. Nulla faucibus rhoncus est" - Then I press the "Add block" button + And I press the "Add block" button And I wait for AJAX to finish - + Then I should see "Rich text in 6 cols section, col 6" + When I scroll to the top of the page - And I wait 5s + And I wait 2s Then I should see "Save layout" - Then I press the "Save layout" button + When I press the "Save layout" button + And I wait + Then I should see "The layout override has been saved." + And I should see "Rich text in 6 cols section, col 1" + And I should see "Rich text in 6 cols section, col 2" + And I should see "Rich text in 6 cols section, col 3" + And I should see "Rich text in 6 cols section, col 4" + And I should see "Rich text in 6 cols section, col 5" + And I should see "Rich text in 6 cols section, col 6" + diff --git a/tests/features/varbase/04-content-structure/04-10-landing-page-section-configurations.feature b/tests/features/varbase/04-content-structure/04-10-landing-page-section-configurations.feature index 46de4d3407a84dc2845c15d5e13ed58e364c5c7d..9611eac2c491eda2229c9d2391760722e78d6d66 100644 --- a/tests/features/varbase/04-content-structure/04-10-landing-page-section-configurations.feature +++ b/tests/features/varbase/04-content-structure/04-10-landing-page-section-configurations.feature @@ -7,60 +7,74 @@ As a site admin, I will create a new landing page, add a section with different 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 "Automated landing page by site admin" for "Title" + When I fill in "Test Landing page (Layout Builder) by Site Admin" for "Title" And I fill in "Test Landing page (Layout Builder) description" for "Page description" And I select "published" from "Save as" And I press the "Save" button And I wait - Then I should see "Landing page (Layout Builder) Automated landing page by site admin has been created" + Then I should see "Landing page (Layout Builder) Test Landing page (Layout Builder) by Site Admin has been created" And I should see "This layout builder tool allows you to configure the layout of the main content area." - And I scroll to the bottom of the page + When I scroll to the bottom of the page And I wait 1s - Then I click "Add section at end of layout" + Then I should see "Add section at end of layout" + + When I click "Add section at end of layout" And I wait for AJAX to finish - - Then I click "Bootstrap 2 Cols" + Then I should see "Bootstrap 2 Cols" + When I click "Bootstrap 2 Cols" And I wait for AJAX to finish - Then I select the "Boxed" container type + And I select the "Boxed" container type And I wait for AJAX to finish - Then I select the "Tiny" container width - Then I select the "md" "33% 67%" breakpoint + Then I should see "Container width" + When I select the "Tiny" container width + And I select the "md" "33% 67%" breakpoint And I add gutters + Then I should not see "Keep gutters between columns" + When I move to the styles tab And I wait for AJAX to finish - Then I open the "Background" settings menu + And I open the "Background" settings menu And I wait for AJAX to finish - Then I select the "Primary" background color - Then I uncheck the Edge to Edge Background - When I open the "Typography" settings menu + And I select the "Primary" background color + And I uncheck the Edge to Edge Background + And I open the "Typography" settings menu And I select the "White" text color - Then I set the alignment to "End" - Then I press the "Add section" button - And I click "in Section 2, Col 1 region" - Then I wait for AJAX to finish - Then I click "Create custom block" + And I set the alignment to "End" + And I press the "Add section" button + Then I should see "Add block in Section 2, Col 1 region" + + When I scroll to the bottom of the page + And I wait 2s + Then I should see "Add section at end of layout" + + When I click "Add block in Section 2, Col 1 region" + And I wait for AJAX to finish + And I click "Create custom block" And I wait for AJAX to finish - When I click "Rich text" + And I click "Rich text" And I wait for AJAX to finish - Then I check the box "Display title" - Then I fill in "Test Rich text in 2 cols section, col 1" for "Title" + And I check the box "Display title" + And I fill in "Test Rich text in 2 cols section, col 1" for "Title" And I fill in the rich text editor field "Body" with "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer aliquet diam nunc, ac dictum velit tincidunt quis. Integer ut imperdiet dui, sit amet tempus est. Curabitur molestie sem non purus dignissim pulvinar. Pellentesque id sapien consequat" And I press the "Add block" button - - When I click "in Section 2, Col 2 region" + Then I should see "Test Rich text in 2 cols section, col 1" + + When I click "Add block in Section 2, Col 2 region" And I wait for AJAX to finish - Then I click "Create custom block" + And I click "Create custom block" And I wait for AJAX to finish - When I click "Rich text" + And I click "Rich text" And I wait for AJAX to finish - Then I check the box "Display title" - Then I fill in "Test Rich text in 2 cols section, col 2" for "Title" + And I check the box "Display title" + And I fill in "Test Rich text in 2 cols section, col 2" for "Title" And I fill in the rich text editor field "Body" with "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer aliquet diam nunc, ac dictum velit tincidunt quis. Integer ut imperdiet dui, sit amet tempus est. Curabitur molestie sem non purus dignissim pulvinar. Pellentesque id sapien consequat" - Then I press the "Add block" button - And I wait for AJAX to finish - + And I press the "Add block" button + And I wait for AJAX to finish + Then I should see "Test Rich text in 2 cols section, col 2" + When I scroll to the top of the page Then I should see "Save layout" And I press the "Save layout" button - - + And I wait + And I should see "Test Rich text in 2 cols section, col 1" + And I should see "Test Rich text in 2 cols section, col 2"