Skip to content
Snippets Groups Projects
Commit 21cb5aba authored by Rajab Natshah's avatar Rajab Natshah
Browse files

Issue #3256661 by Alaa Jwiehan, RajabNatshah: Add Automated Testing Gherkin...

Issue #3256661 by Alaa Jwiehan, RajabNatshah: Add Automated Testing Gherkin features for the Varbase Landing (Layout Builder) content type
parent 62ff9c6e
No related branches found
No related tags found
3 merge requests!24Issue #3301451: Composer is fixed to docroot folder Primary tabs View(active tab),!10Issue #3269421: Add exception messages for VLB automated testing step definitions,!9Issue #3266504: Update Automated Functional Testing Readme File
......@@ -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/
......@@ -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'
......
......@@ -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"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment