diff --git a/.circleci/config.yml b/.circleci/config.yml index f4047eee92ceea8a43316a8fa2b6996e35c0bb58..733099bb2d0595f68cc2bacc3be90720138eee8e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -139,6 +139,8 @@ commands: sudo chmod 775 . sudo chown www-data:circleci . composer create-project vardot/varbase:9.1.x varbase --stability dev --no-interaction -vvv + cd /var/www/html/test/varbase + composer require drupal/drush_language:~1.0 cp -r /home/circleci/project /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 @@ -180,20 +182,20 @@ commands: mysql -h 127.0.0.1 -uroot -prootpw --execute="CREATE DATABASE test_varbase;" -vvv cd /var/www/html/test/varbase/docroot ../bin/drush site-install varbase --yes --account-name="webmaster" --account-pass="dD.123123ddd" --account-mail="webmaster@vardot.com" --db-url="mysql://root:rootpw@127.0.0.1/test_varbase" --locale="en" varbase_multilingual_configuration.enable_multilingual=true varbase_extra_components.vmi=true varbase_extra_components.varbase_heroslider_media=true varbase_extra_components.varbase_carousels=true varbase_extra_components.varbase_search=true varbase_extra_components.varbase_blog=true varbase_extra_components.varbase_auth=true install_configure_form.enable_update_status_emails=NULL -vvv - ../bin/drush pm-enable varbase_development --yes - ../bin/drush pm-enable varbase_styleguide --yes - ../bin/drush pm-enable varbase_landing --yes - ../bin/drush pm-enable varbase_api --yes - ../bin/drush pm-enable varbase_content_planner --yes - ../bin/drush pm-enable varbase_media_instagram --yes - ../bin/drush pm-enable varbase_media_twitter --yes - ../bin/drush pm-enable social_auth_google --yes - ../bin/drush pm-enable social_auth_facebook --yes - ../bin/drush pm-enable social_auth_twitter --yes - ../bin/drush pm-enable social_auth_linkedin --yes - ../bin/drush config-set system.performance css.preprocess 0 --yes - ../bin/drush config-set system.performance js.preprocess 0 --yes - ../bin/drush config-set system.logging error_level all --yes + ../bin/drush pm:enable varbase_development --yes + ../bin/drush pm:enable varbase_styleguide --yes + ../bin/drush pm:enable varbase_landing --yes + ../bin/drush pm:enable varbase_api --yes + ../bin/drush pm:enable varbase_content_planner --yes + ../bin/drush pm:enable varbase_media_instagram --yes + ../bin/drush pm:enable varbase_media_twitter --yes + ../bin/drush pm:enable social_auth_google --yes + ../bin/drush pm:enable social_auth_facebook --yes + ../bin/drush pm:enable social_auth_twitter --yes + ../bin/drush pm:enable social_auth_linkedin --yes + ../bin/drush config:set system.performance css.preprocess 0 --yes + ../bin/drush config:set system.performance js.preprocess 0 --yes + ../bin/drush config:set system.logging error_level all --yes ../bin/drush cr ## Configure and run the virtual display. @@ -211,13 +213,31 @@ commands: java -jar selenium-server-standalone-2.53.1.jar -port 4445 background: true - ## Automated Functional Acceptance Testing - Step 1 init tests. + ## Add testing users. - run: - name: Automated Functional Acceptance Testing - Step 1 init tests - no_output_timeout: 30m + name: Add testing users. command: | - cd /var/www/html/test/varbase/docroot/profiles/varbase - ../../../bin/behat --strict --no-snippets -f pretty -o std tests/features/varbase/step1-init-tests/ + cd /var/www/html/test/varbase/docroot/profiles/varbase/scripts + bash add-testing-users.sh + + ## Enable the Drush Language Command module and add RTL language + - run: + name: Enable the Drush Language Command module and add RTL language + command: | + cd /var/www/html/test/varbase/docroot + ../bin/drush pm:enable drush_language --yes + ../bin/drush language-add ar + ../bin/drush language-info + ../bin/drush cr + + ## Uninstall Antibot module to let the selenium bot work + - run: + name: Uninstall Antibot module to let the selenium bot work + command: | + cd /var/www/html/test/varbase/docroot + ../bin/drush pm:uninstall antibot --yes + ../bin/drush cr + jobs: varbase-testing-01-website-base-requirements: <<: *defaults @@ -229,7 +249,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/step2-apply-tests/01-website-base-requirements/ + ../../../bin/behat --strict --no-snippets -f pretty -o std tests/features/varbase/01-website-base-requirements/ varbase-testing-02-user-management-03-admin-management: <<: *defaults steps: @@ -240,8 +260,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/step2-apply-tests/02-user-management/ - ../../../bin/behat --strict --no-snippets -f pretty -o std tests/features/varbase/step2-apply-tests/03-admin-management/ + ../../../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/ varbase-testing-04-content-structure: <<: *defaults steps: @@ -252,7 +272,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/step2-apply-tests/04-content-structure/ + ../../../bin/behat --strict --no-snippets -f pretty -o std tests/features/varbase/04-content-structure/ varbase-testing-05-content-management: <<: *defaults steps: @@ -263,7 +283,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/step2-apply-tests/05-content-management/ + ../../../bin/behat --strict --no-snippets -f pretty -o std tests/features/varbase/05-content-management/ workflows: version: 2 diff --git a/behat.varbase.yml b/behat.varbase.yml deleted file mode 100644 index 4dfaed109286780a4709afdf201de7b7ef63992d..0000000000000000000000000000000000000000 --- a/behat.varbase.yml +++ /dev/null @@ -1,118 +0,0 @@ -default: - autoload: - '': "%paths.base%/tests/features/bootstrap" - suites: - default: - paths: - - "%paths.base%/tests/features" - contexts: - - VarbaseContext: - parameters: - varbase_users: - webmaster: { email: 'webmaster@vardot.com', password: 'dD.123123ddd' } - test_authenticated: { email: 'authenticated.test@vardot.com', password: 'dD.123123ddd' } - test_editor: { email: 'editor.test@vardot.com', password: 'dD.123123ddd' } - test_content_admin: { email: 'content.admin.test@vardot.com', password: 'dD.123123ddd' } - test_seo_admin: { email: 'seo.admin.test@vardot.com', password: 'dD.123123ddd' } - test_site_admin: { email: 'site.admin.test@vardot.com', password: 'dD.123123ddd' } - test_super_admin: { email: 'super.admin.test@vardot.com', password: 'dD.123123ddd' } - - VarbaseSelectorsContext: - parameters: - selectors: - ## Add all css selectors which you will use in most features. - css: - breadcrumb: ".breadcrumb" - breadcrumb first link: ".breadcrumb li:nth-child(1) a" - image button in rich text editor body field: "#cke_edit-body-und-0-value .cke_button__image" - - ## Add all XPath selectors which you will use in most features. - xpath: - page title: '//h1[contains(@class, "page-header")' - textarea for body field: '//*[@id="edit-body-und-0-value"]' - rich text editor for body field: '//iframe[@title="Rich Text Editor, edit-body-und-0-value"]' - HTML editor for body field: '//*[@id="edit-body-und-0-value-aced"]' - - ## You can add list of selectorrs which you will use in most features. - # But by loading them from files. - files_path: "%paths.base%/tests/selectors/" - files: - - "varbase/front-end-selectors.yml" - - "varbase/back-end-selectors.yml" - - Drupal\DrupalExtension\Context\DrupalContext - - Drupal\DrupalExtension\Context\DrushContext - - Drupal\DrupalExtension\Context\MessageContext - - Drupal\DrupalExtension\Context\MinkContext - - Drupal\DrupalExtension\Context\MarkupContext - formatters: - pretty: - html: - output_path: "%paths.base%/tests/reports/" - extensions: - Drupal\MinkExtension: - ajax_timeout: 60 - files_path: "%paths.base%/tests/assets/" - goutte: ~ - selenium2: - wd_host: 127.0.0.1:4445/wd/hub - capabilities: - # browser: 'firefox' - browser: 'chrome' - # browser: 'phantomjs' - nativeEvents: true - marionette: true - browserName: chrome - version: "*" - extra_capabilities: - chromeOptions: - args: - - "--disable-gpu" - - "--window-size=1920,1080" - w3c: false - chrome: - switches: - - "--headless" - - "no-sandbox" - - "--no-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" - base_url: 'http://varbase.test' - # browser_name: 'firefox' - browser_name: 'chrome' - # browser_name: 'phantomjs' - javascript_session: selenium2 - Drupal\DrupalExtension: - blackbox: ~ - api_driver: 'drupal' - region_map: - content: ".main-container" - footer: "#footer" - left header: "#header-left" - right header: "#header-right" - right sidebar: "#aside-region" - field body: "#edit-body-wrapper" - selectors: - message_selector: '.messages' - error_message_selector: '.messages.error' - success_message_selector: '.messages.status' - warning_message_selector: '.messages.warning' - emuse\BehatHTMLFormatter\BehatHTMLFormatterExtension: - name: html - renderer: Twig,Behat2 - file_name: index - print_args: false - print_outp: false - loop_break: false diff --git a/behat.yml b/behat.yml index ea42d69963452f150e94238b7641ee708f78d893..1d6fb5ca05d88bb28154d79a2f4e6fd987f7c040 100644 --- a/behat.yml +++ b/behat.yml @@ -1,2 +1,118 @@ -imports: - - behat.varbase.yml +default: + autoload: + '': "%paths.base%/tests/features/bootstrap" + suites: + default: + paths: + - "%paths.base%/tests/features" + contexts: + - VarbaseContext: + parameters: + varbase_users: + webmaster: { email: 'webmaster@vardot.com', password: 'dD.123123ddd' } + Normal user: { email: 'test.authenticated@vardot.com', password: 'dD.123123ddd' } + Editor: { email: 'test.editor@vardot.com', password: 'dD.123123ddd' } + Content admin: { email: 'test.content_admin@vardot.com', password: 'dD.123123ddd' } + SEO admin: { email: 'test.seo_admin@vardot.com', password: 'dD.123123ddd' } + Site admin: { email: 'test.site_admin@vardot.com', password: 'dD.123123ddd' } + Super admin: { email: 'test.super_admin@vardot.com', password: 'dD.123123ddd' } + - VarbaseSelectorsContext: + parameters: + selectors: + ## Add all css selectors which you will use in most features. + css: + breadcrumb: ".breadcrumb" + breadcrumb first link: ".breadcrumb li:nth-child(1) a" + image button in rich text editor body field: "#cke_edit-body-und-0-value .cke_button__image" + + ## Add all XPath selectors which you will use in most features. + xpath: + page title: '//h1[contains(@class, "page-header")' + textarea for body field: '//*[@id="edit-body-und-0-value"]' + rich text editor for body field: '//iframe[@title="Rich Text Editor, edit-body-und-0-value"]' + HTML editor for body field: '//*[@id="edit-body-und-0-value-aced"]' + + ## You can add list of selectorrs which you will use in most features. + # But by loading them from files. + files_path: "%paths.base%/tests/selectors/" + files: + - "varbase/front-end-selectors.yml" + - "varbase/back-end-selectors.yml" + - Drupal\DrupalExtension\Context\DrupalContext + - Drupal\DrupalExtension\Context\DrushContext + - Drupal\DrupalExtension\Context\MessageContext + - Drupal\DrupalExtension\Context\MinkContext + - Drupal\DrupalExtension\Context\MarkupContext + formatters: + pretty: + html: + output_path: "%paths.base%/tests/reports/" + extensions: + Drupal\MinkExtension: + ajax_timeout: 60 + files_path: "%paths.base%/tests/assets/" + goutte: ~ + selenium2: + wd_host: 127.0.0.1:4445/wd/hub + capabilities: + # browser: 'firefox' + browser: 'chrome' + # browser: 'phantomjs' + nativeEvents: true + marionette: true + browserName: chrome + version: "*" + extra_capabilities: + chromeOptions: + args: + - "--disable-gpu" + - "--window-size=1920,1080" + w3c: false + chrome: + switches: + - "--headless" + - "no-sandbox" + - "--no-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" + base_url: 'http://varbase.test' + # browser_name: 'firefox' + browser_name: 'chrome' + # browser_name: 'phantomjs' + javascript_session: selenium2 + Drupal\DrupalExtension: + blackbox: ~ + api_driver: 'drupal' + region_map: + content: ".main-container" + footer: "#footer" + left header: "#header-left" + right header: "#header-right" + right sidebar: "#aside-region" + field body: "#edit-body-wrapper" + selectors: + message_selector: '.messages' + error_message_selector: '.messages.error' + success_message_selector: '.messages.status' + warning_message_selector: '.messages.warning' + emuse\BehatHTMLFormatter\BehatHTMLFormatterExtension: + name: html + renderer: Twig,Behat2 + file_name: index + print_args: false + print_outp: false + loop_break: false diff --git a/composer.json b/composer.json index fdd0427ff385f3e5e9550033060bb1e40313ecd1..c345c61d27079172b8108c740a683cd870909065 100644 --- a/composer.json +++ b/composer.json @@ -94,8 +94,7 @@ "Varbase\\composer\\ScriptHandler::createRequiredFiles", "Varbase\\composer\\ScriptHandler::removeGitDirectories" ], - "post-drupal-scaffold-cmd": ["Varbase\\composer\\ScriptHandler::postDrupalScaffoldProcedure"], - "create-new-vartheme": "scripts/create-new-vartheme.sh" + "post-drupal-scaffold-cmd": ["Varbase\\composer\\ScriptHandler::postDrupalScaffoldProcedure"] }, "extra": { "drupal-scaffold": { diff --git a/scripts/add-testing-users.sh b/scripts/add-testing-users.sh new file mode 100644 index 0000000000000000000000000000000000000000..9e55767b237f21b700a994d338cef9df866a954d --- /dev/null +++ b/scripts/add-testing-users.sh @@ -0,0 +1,37 @@ +#!/bin/usr/env bash + + +## cd PROJECT_DIR_NAME/docroot/profiles/varbase/scripts +## bash add-testing-users.sh + + +current_path=$(pwd); + +# Include the Bash YAML library. +source ${current_path}/libs/bash-yaml.sh || exit 1 ; + +# Load the list of default users for Varbase. +eval $(parse_yaml ${current_path}/varbase.users.yml); + +cd ../../../ ; +for user in ${users[@]} +do + user_name="user_${user}_name"; + user_mail="user_${user}_mail"; + user_password="user_${user}_password"; + user_role="user_${user}_role"; + + echo " ---------------------------------------------------------------- "; + echo " User name: ${!user_name}"; + echo " User mail: ${!user_mail}"; + echo " User password: ${!user_password}"; + echo " User role: ${!user_role}"; + echo " ================================================================= "; + + ../vendor/drush/drush/drush user:create "${!user_name}" --mail="${!user_mail}" --password="${!user_password}" ; + if [ ! -z "${!user_role}" ]; then + ../vendor/drush/drush/drush user:role:add "${!user_role}" "${!user_name}" ; + fi + +done +cd ${current_path}; diff --git a/scripts/create-new-vartheme-bs4.sh b/scripts/create-new-vartheme-bs4.sh deleted file mode 100644 index 04b2d0f784f6eeb6d61e692396343ddb08a46c41..0000000000000000000000000000000000000000 --- a/scripts/create-new-vartheme-bs4.sh +++ /dev/null @@ -1,175 +0,0 @@ -#!/bin/usr/env bash - -################################################################################ -## Create new Vartheme BS4 Sub-Theme. -################################################################################ -## -## Quick tip on how to use this script command file. -## -## Create new Vartheme BS4 sub theme for a project. -## By Bash: -## ----------------------------------------------------------------------------- -## cd PROJECT_DIR_NAME/docroot/themes/contrib/vartheme_bs4/scripts -## bash ./create-new-vartheme-bs4.sh "THEME_NAME" -##------------------------------------------------------------------------------ -## -## -################################################################################ - -# Basic yaml parser. -parse_yaml() { - local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034') - sed -ne "s|^\($s\)\($w\)$s:$s\"\(.*\)\"$s\$|\1$fs\2$fs\3|p" \ - -e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 | - awk -F$fs '{ - indent = length($1)/2; - vname[indent] = $2; - for (i in vname) {if (i > indent) {delete vname[i]}} - if (length($3) > 0) { - vn=""; for (i=0; i<indent; i++) {vn=(vn)(vname[i])("_")} - printf("%s%s%s=\"%s\"\n", "",vn, $2, $3); - } - }' -} - -current_path=$(pwd); -drupal_root="$current_path"; - -if [[ "${drupal_root: -1}" == "/" ]]; then - drupal_root="${drupal_root:0:${#drupal_root}-1}"; -fi - -if [[ "${drupal_root: -24}" == "profiles/varbase/scripts" ]]; then - drupal_root="${drupal_root:0:${#drupal_root}-24}"; -fi - -if [[ "${drupal_root: -16}" == "profiles/varbase" ]]; then - drupal_root="${drupal_root:0:${#drupal_root}-16}"; -fi - -if [[ "${drupal_root: -8}" == "profiles" ]]; then - drupal_root="${drupal_root:0:${#drupal_root}-8}"; -fi - -if [[ "${drupal_root: -1}" == "/" ]]; then - drupal_root="${drupal_root:0:${#drupal_root}-1}"; -fi - -echo "Current path: $current_path"; -echo "Drupal root: $drupal_root"; - -# Read scripts.settings.yml file -eval $(parse_yaml $drupal_root/profiles/varbase/scripts/scripts.settings.yml); - -# Default theme name. -theme_name=$default_theme_name; - -# Grape the theme name argument. -if [ ! -z "$1" ]; then - arg1="$1"; - if [[ $arg1 =~ ^[A-Za-z][A-Za-z0-9_]*$ ]]; then - theme_name="$arg1"; - else - echo "---------------------------------------------------------------------------"; - echo " Theme name is not a valid theme name! "; - echo "---------------------------------------------------------------------------"; - exit 1; - fi -else - echo "---------------------------------------------------------------------------"; - echo " Please add the name of your theme! "; - echo "---------------------------------------------------------------------------"; - exit 1; -fi - - -# Default themes creation path. -theme_path=$drupal_root/$default_themes_creation_path; -mkdir -p ${theme_path}; - -# Create the new Vartheme BS4 subtheme if we do not have a folder with that name yet. -if [[ ! -d "$theme_path/$theme_name" ]]; then - - # 1. Copy the VARTHEME_BS4_SUBTHEME folder to your custom theme location. - cp -r ${drupal_root}/themes/contrib/vartheme_bs4/VARTHEME_BS4_SUBTHEME ${theme_path}/${theme_name}; - - # 2. Rename VARTHEME_BS4_SUBTHEME.starterkit.yml your_subtheme_name.info.yml - mv ${theme_path}/${theme_name}/VARTHEME_BS4_SUBTHEME.starterkit.yml ${theme_path}/${theme_name}/VARTHEME_BS4_SUBTHEME.info.yml ; - mv ${theme_path}/${theme_name}/VARTHEME_BS4_SUBTHEME.info.yml ${theme_path}/${theme_name}/${theme_name}.info.yml ; - - # 3. Rename VARTHEME_BS4_SUBTHEME.libraries.yml your_subtheme_name.libraries.yml - mv ${theme_path}/${theme_name}/VARTHEME_BS4_SUBTHEME.libraries.yml ${theme_path}/${theme_name}/${theme_name}.libraries.yml ; - - # 4. Rename VARTHEME_BS4_SUBTHEME.theme your_subtheme_name.theme - mv ${theme_path}/${theme_name}/VARTHEME_BS4_SUBTHEME.theme ${theme_path}/${theme_name}/${theme_name}.theme ; - - # 5. Rename VARTHEME_BS4_SUBTHEME.settings.yml - mv ${theme_path}/${theme_name}/config/install/VARTHEME_BS4_SUBTHEME.settings.yml ${theme_path}/${theme_name}/config/install/${theme_name}.settings.yml ; - - # 6. Rename VARTHEME_BS4_SUBTHEME.schema.yml - mv ${theme_path}/${theme_name}/config/schema/VARTHEME_BS4_SUBTHEME.schema.yml ${theme_path}/${theme_name}/config/schema/${theme_name}.schema.yml ; - - # 7. Rename VARTHEME_BS4_SUBTHEME.base.scss and VARTHEME_BS4_SUBTHEME.base.css - mv ${theme_path}/${theme_name}/scss/base/VARTHEME_BS4_SUBTHEME.base.scss ${theme_path}/${theme_name}/scss/base/${theme_name}.base.scss ; - mv ${theme_path}/${theme_name}/css/base/VARTHEME_BS4_SUBTHEME.base.css ${theme_path}/${theme_name}/css/base/${theme_name}.base.css ; - - # 8. Rename VARTHEME_BS4_SUBTHEME-rtl.base.scss and VARTHEME_BS4_SUBTHEME-rtl.base.css - mv ${theme_path}/${theme_name}/scss/rtl/base/VARTHEME_BS4_SUBTHEME-rtl.base.scss ${theme_path}/${theme_name}/scss/rtl/base/${theme_name}-rtl.base.scss ; - mv ${theme_path}/${theme_name}/css/rtl/base/VARTHEME_BS4_SUBTHEME-rtl.base.css ${theme_path}/${theme_name}/css/rtl/base/${theme_name}-rtl.base.css ; - - - - # 9 Rename TWIG template files. - mv ${theme_path}/${theme_name}/templates/system/html.html.twig-VARTHEME_BS4_SUBTHEME ${theme_path}/${theme_name}/templates/system/html.html.twig - mv ${theme_path}/${theme_name}/templates/system/page.html.twig-VARTHEME_BS4_SUBTHEME ${theme_path}/${theme_name}/templates/system/page.html.twig - mv ${theme_path}/${theme_name}/templates/system/maintenance-page.html.twig-VARTHEME_BS4_SUBTHEME ${theme_path}/${theme_name}/templates/system/maintenance-page.html.twig - mv ${theme_path}/${theme_name}/templates/betterlogin/page--user--edit.html.twig-VARTHEME_BS4_SUBTHEME ${theme_path}/${theme_name}/templates/betterlogin/page--user--edit.html.twig - mv ${theme_path}/${theme_name}/templates/betterlogin/page--user--login.html.twig-VARTHEME_BS4_SUBTHEME ${theme_path}/${theme_name}/templates/betterlogin/page--user--login.html.twig - mv ${theme_path}/${theme_name}/templates/betterlogin/page--user--password.html.twig-VARTHEME_BS4_SUBTHEME ${theme_path}/${theme_name}/templates/betterlogin/page--user--password.html.twig - mv ${theme_path}/${theme_name}/templates/betterlogin/page--user--register.html.twig-VARTHEME_BS4_SUBTHEME ${theme_path}/${theme_name}/templates/betterlogin/page--user--register.html.twig - mv ${theme_path}/${theme_name}/templates/betterlogin/page--user--reset.html.twig-VARTHEME_BS4_SUBTHEME ${theme_path}/${theme_name}/templates/betterlogin/page--user--reset.html.twig - mv ${theme_path}/${theme_name}/templates/betterlogin/block--social-auth.html.twig-VARTHEME_BS4_SUBTHEME ${theme_path}/${theme_name}/templates/betterlogin/block--social-auth.html.twig - mv ${theme_path}/${theme_name}/templates/entity-embed/entity-embed-container.html.twig-VARTHEME_BS4_SUBTHEME ${theme_path}/${theme_name}/templates/entity-embed/entity-embed-container.html.twig - mv ${theme_path}/${theme_name}/templates/media/media.html.twig-VARTHEME_BS4_SUBTHEME ${theme_path}/${theme_name}/templates/media/media.html.twig - mv ${theme_path}/${theme_name}/templates/media/media--image.html.twig-VARTHEME_BS4_SUBTHEME ${theme_path}/${theme_name}/templates/media/media--image.html.twig - mv ${theme_path}/${theme_name}/templates/media/media-oembed-iframe.html.twig-VARTHEME_BS4_SUBTHEME ${theme_path}/${theme_name}/templates/media/media-oembed-iframe.html.twig - mv ${theme_path}/${theme_name}/templates/video-embed-field/video-embed-iframe.html.twig-VARTHEME_BS4_SUBTHEME ${theme_path}/${theme_name}/templates/video-embed-field/video-embed-iframe.html.twig - - # 10 Rename config files. - mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_BS4_SUBTHEME_branding.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_branding.yml - mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_BS4_SUBTHEME_breadcrumbs.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_breadcrumbs.yml - mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_BS4_SUBTHEME_content.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_content.yml - mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_BS4_SUBTHEME_copyright.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_copyright.yml - mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_BS4_SUBTHEME_footer.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_footer.yml - mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_BS4_SUBTHEME_help.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_help.yml - mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_BS4_SUBTHEME_local_actions.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_local_actions.yml - mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_BS4_SUBTHEME_local_tasks.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_local_tasks.yml - mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_BS4_SUBTHEME_main_menu.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_main_menu.yml - mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_BS4_SUBTHEME_messages.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_messages.yml - mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_BS4_SUBTHEME_page_title.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_page_title.yml - mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_BS4_SUBTHEME_socialauthlogin.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_socialauthlogin.yml - - # 11. Replace all VARTHEME_BS4_SUBTHEME with the machine name of your theme. - grep -rl 'VARTHEME_BS4_SUBTHEME' ${theme_path}/${theme_name} | xargs sed -i "s/VARTHEME_BS4_SUBTHEME/${theme_name}/g" ; - - - # 12. Install needed libraries - cd ${theme_path}/${theme_name}; - npm install -g yarn ; - yarn install ; - - generated_datetime="$(date '+%Y/%m/%d - %H:%M:%S')"; - generated_log=" Generated by -- create-new-vartheme ${theme_name} ${direction} ${theme_path} -- on ${generated_datetime}"; - echo "${generated_log}" >> ${theme_path}/${theme_name}/README.md; - - echo "---------------------------------------------------------------------------"; - echo " The new Vartheme BS4 Sub-Theme were created at \"${theme_path}/${theme_name} :)\" "; - echo "---------------------------------------------------------------------------"; - exit 0; - -else - echo "---------------------------------------------------------------------------"; - echo " The folder \"${theme_path}/${theme_name}\" is already in the site!"; - echo "---------------------------------------------------------------------------"; - exit 1; -fi diff --git a/scripts/create-new-vartheme-bs5.sh b/scripts/create-new-vartheme-bs5.sh index e3782774bfa884efe5f0a535a0d85571a3d9577c..b1d1a3a0223b430bba8d4172641c3802f35b24ee 100644 --- a/scripts/create-new-vartheme-bs5.sh +++ b/scripts/create-new-vartheme-bs5.sh @@ -16,23 +16,11 @@ ## ################################################################################ -# Basic yaml parser. -parse_yaml() { - local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034') - sed -ne "s|^\($s\)\($w\)$s:$s\"\(.*\)\"$s\$|\1$fs\2$fs\3|p" \ - -e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 | - awk -F$fs '{ - indent = length($1)/2; - vname[indent] = $2; - for (i in vname) {if (i > indent) {delete vname[i]}} - if (length($3) > 0) { - vn=""; for (i=0; i<indent; i++) {vn=(vn)(vname[i])("_")} - printf("%s%s%s=\"%s\"\n", "",vn, $2, $3); - } - }' -} - current_path=$(pwd); + +# Include the Bash YAML library. +source ${current_path}/libs/bash-yaml.sh || exit 1 ; + drupal_root="$current_path"; if [[ "${drupal_root: -1}" == "/" ]]; then @@ -58,9 +46,6 @@ fi echo "Current path: $current_path"; echo "Drupal root: $drupal_root"; -# Read scripts.settings.yml file -eval $(parse_yaml $drupal_root/profiles/varbase/scripts/scripts.settings.yml); - # Default theme name. theme_name=$default_theme_name; diff --git a/scripts/create-new-vartheme.sh b/scripts/create-new-vartheme.sh deleted file mode 100644 index 96bb93090641539bbe78778570b66ac29257ea98..0000000000000000000000000000000000000000 --- a/scripts/create-new-vartheme.sh +++ /dev/null @@ -1,234 +0,0 @@ -#!//bin/bash -################################################################################ -## Create new vartheme subtheme. -################################################################################ -## -## Quick tip on how to use this script command file. -## -## Create new Vartheme sub theme for a project. -## By Bash: -## ----------------------------------------------------------------------------- -## cd PROJECT_DIR_NAME/docroot/profiles/varbase/scripts -## bash ./create-new-vartheme.sh "THEME_NAME" "ltr" -##------------------------------------------------------------------------------ -## -## For right to left themes. -## By Bash: -## ----------------------------------------------------------------------------- -## cd PROJECT_DIR_NAME/docroot/profiles/varbase/scripts -## bash ./create-new-vartheme.sh "THEME_NAME" "rtl" -## ----------------------------------------------------------------------------- -## -## To create a new theme in the PROJECT_DIR_NAME/docroot/themes/custom -## By Bash: -## ----------------------------------------------------------------------------- -## cd PROJECT_DIR_NAME/docroot/profiles/varbase/scripts -## bash ./create-new-vartheme.sh "THEME_NAME" -## ----------------------------------------------------------------------------- -## -################################################################################ - -# Basic yaml parser. -parse_yaml() { - local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034') - sed -ne "s|^\($s\)\($w\)$s:$s\"\(.*\)\"$s\$|\1$fs\2$fs\3|p" \ - -e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 | - awk -F$fs '{ - indent = length($1)/2; - vname[indent] = $2; - for (i in vname) {if (i > indent) {delete vname[i]}} - if (length($3) > 0) { - vn=""; for (i=0; i<indent; i++) {vn=(vn)(vname[i])("_")} - printf("%s%s%s=\"%s\"\n", "",vn, $2, $3); - } - }' -} - -current_path=$(pwd); -drupal_root="$current_path"; - -if [[ "${drupal_root: -1}" == "/" ]]; then - drupal_root="${drupal_root:0:${#drupal_root}-1}"; -fi - -if [[ "${drupal_root: -24}" == "profiles/varbase/scripts" ]]; then - drupal_root="${drupal_root:0:${#drupal_root}-24}"; -fi - -if [[ "${drupal_root: -16}" == "profiles/varbase" ]]; then - drupal_root="${drupal_root:0:${#drupal_root}-16}"; -fi - -if [[ "${drupal_root: -8}" == "profiles" ]]; then - drupal_root="${drupal_root:0:${#drupal_root}-8}"; -fi - -if [[ "${drupal_root: -1}" == "/" ]]; then - drupal_root="${drupal_root:0:${#drupal_root}-1}"; -fi - -echo "Current path: $current_path"; -echo "Drupal root: $drupal_root"; - -# Read scripts.settings.yml file -eval $(parse_yaml $drupal_root/profiles/varbase/scripts/scripts.settings.yml); - -# Default theme name. -theme_name=$default_theme_name; - -# Grape the theme name argument. -if [ ! -z "$1" ]; then - arg1="$1"; - if [[ $arg1 =~ ^[A-Za-z][A-Za-z0-9_]*$ ]]; then - theme_name="$arg1"; - else - echo "---------------------------------------------------------------------------"; - echo " Theme name is not a valid theme name! "; - echo "---------------------------------------------------------------------------"; - exit 1; - fi -else - echo "---------------------------------------------------------------------------"; - echo " Please add the name of your theme! "; - echo "---------------------------------------------------------------------------"; - exit 1; -fi - -# Default direction. -direction=$default_direction; - -# Grape the direction argument. only if we have arg #2. -if [ ! -z "$2" ]; then - arg2="$2"; - if [[ "$arg2" == "rtl" || "$arg2" == "RTL" ]]; then - direction=$arg2; - elif [[ "$arg2" == "ltr" || "$arg2" == "LTR" ]]; then - direction=$arg2; - else - echo "---------------------------------------------------------------------------"; - echo " Direction of language is not valid! "; - echo " ltr - for (left to right) languages. "; - echo " rtl - for (right to left) languages. "; - echo "---------------------------------------------------------------------------"; - exit 1; - fi -fi - -# Default themes creation path. -theme_path=$drupal_root/$default_themes_creation_path; -mkdir -p ${theme_path}; -cp ${current_path}/README.md ${theme_path}/README.md - - -# Create the new Vartheme subtheme if we do not have a folder with that name yet. -if [[ ! -d "$theme_path/$theme_name" ]]; then - - # 1. Copy the VARTHEME_SUBTHEME folder to your custom theme location. - cp -r ${drupal_root}/themes/contrib/vartheme/VARTHEME_SUBTHEME ${theme_path}/${theme_name}; - - # 2. Rename VARTHEME_SUBTHEME.starterkit.yml your_subtheme_name.info.yml - mv ${theme_path}/${theme_name}/VARTHEME_SUBTHEME.starterkit.yml ${theme_path}/${theme_name}/VARTHEME_SUBTHEME.info.yml ; - mv ${theme_path}/${theme_name}/VARTHEME_SUBTHEME.info.yml ${theme_path}/${theme_name}/${theme_name}.info.yml ; - - # 3. Rename VARTHEME_SUBTHEME.libraries.yml your_subtheme_name.libraries.yml - mv ${theme_path}/${theme_name}/VARTHEME_SUBTHEME.libraries.yml ${theme_path}/${theme_name}/${theme_name}.libraries.yml ; - - # 4. Rename VARTHEME_SUBTHEME.theme your_subtheme_name.theme - mv ${theme_path}/${theme_name}/VARTHEME_SUBTHEME.theme ${theme_path}/${theme_name}/${theme_name}.theme ; - - # 5. Rename VARTHEME_SUBTHEME.settings.yml - mv ${theme_path}/${theme_name}/config/install/VARTHEME_SUBTHEME.settings.yml ${theme_path}/${theme_name}/config/install/${theme_name}.settings.yml ; - - # 6. Rename VARTHEME_SUBTHEME.schema.yml - mv ${theme_path}/${theme_name}/config/schema/VARTHEME_SUBTHEME.schema.yml ${theme_path}/${theme_name}/config/schema/${theme_name}.schema.yml ; - - # 7.1 Rename VARTHEME_SUBTHEME optional blocks. - mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_SUBTHEME_branding.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_branding.yml - mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_SUBTHEME_breadcrumbs.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_breadcrumbs.yml - mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_SUBTHEME_content.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_content.yml - mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_SUBTHEME_copyright.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_copyright.yml - mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_SUBTHEME_footer.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_footer.yml - mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_SUBTHEME_help.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_help.yml - mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_SUBTHEME_local_actions.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_local_actions.yml - mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_SUBTHEME_local_tasks.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_local_tasks.yml - mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_SUBTHEME_main_menu.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_main_menu.yml - mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_SUBTHEME_messages.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_messages.yml - mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_SUBTHEME_page_title.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_page_title.yml - mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_SUBTHEME_socialauthlogin.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_socialauthlogin.yml - mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_SUBTHEME_views_block__varbase_heroslider_media_varbase_heroslider_media.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_views_block__varbase_heroslider_media_varbase_heroslider_media.yml - - # 7.2 Rename the extentions of TWIG template files. - # html.html.twig is very important and needed file for RTL websites. - mv ${theme_path}/${theme_name}/templates/system/html.html.twig-VARTHEME_SUBTHEME ${theme_path}/${theme_name}/templates/system/html.html.twig - - # Custom Better Login templates for edit, login, rest password, and register template files. - mv ${theme_path}/${theme_name}/templates/betterlogin/page--user--edit.html.twig-VARTHEME_SUBTHEME ${theme_path}/${theme_name}/templates/betterlogin/page--user--edit.html.twig - mv ${theme_path}/${theme_name}/templates/betterlogin/page--user--login.html.twig-VARTHEME_SUBTHEME ${theme_path}/${theme_name}/templates/betterlogin/page--user--login.html.twig - mv ${theme_path}/${theme_name}/templates/betterlogin/page--user--password.html.twig-VARTHEME_SUBTHEME ${theme_path}/${theme_name}/templates/betterlogin/page--user--password.html.twig - mv ${theme_path}/${theme_name}/templates/betterlogin/page--user--register.html.twig-VARTHEME_SUBTHEME ${theme_path}/${theme_name}/templates/betterlogin/page--user--register.html.twig - mv ${theme_path}/${theme_name}/templates/betterlogin/page--user--reset.html.twig-VARTHEME_SUBTHEME ${theme_path}/${theme_name}/templates/betterlogin/page--user--reset.html.twig - - # 8. Rename VARTHEME_SUBTHEME.base.css files. - mv ${theme_path}/${theme_name}/css/base/VARTHEME_SUBTHEME.base.css ${theme_path}/${theme_name}/css/base/${theme_name}.base.css - - # 9. Rename VARTHEME_SUBTHEME-rtl.base.css files. - mv ${theme_path}/${theme_name}/css/rtl/base/VARTHEME_SUBTHEME-rtl.base.css ${theme_path}/${theme_name}/css/rtl/base/${theme_name}-rtl.base.css - - # 10. Rename VARTHEME_SUBTHEME.base.less file. - mv ${theme_path}/${theme_name}/less/base/VARTHEME_SUBTHEME.base.less ${theme_path}/${theme_name}/less/base/${theme_name}.base.less - - # 11. Rename VARTHEME_SUBTHEME-rtl.base.less file. - mv ${theme_path}/${theme_name}/less/rtl/base/VARTHEME_SUBTHEME-rtl.base.less ${theme_path}/${theme_name}/less/rtl/base/${theme_name}-rtl.base.less - - # 12. Replace all VARTHEME_SUBTHEME with the machine name of your theme. - grep -rl 'VARTHEME_SUBTHEME' ${theme_path}/${theme_name} | xargs sed -i "s/VARTHEME_SUBTHEME/${theme_name}/g" ; - - # 13. Replace the name: 'Vartheme Sub-Theme (LESS)' to the name of your theme. - grep -rl 'Vartheme Sub-Theme (LESS)' ${theme_path}/${theme_name} | xargs sed -i "s/Vartheme Sub-Theme (LESS)/${theme_name}/g" ; - - - # 14. If we want to use the RTL (right to left) bootstrap. - # 15.1 Delete the template folder bootstrap. - rm -rf ${theme_path}/${theme_name}/bootstrap ; - - # 15.2 Download the bootstrap library. change the version as you need. - wget -P ${theme_path}/${theme_name} https://github.com/twbs/bootstrap/archive/v${bootstrap_library_version}.tar.gz -vvv - - # 15.3 Extract the bootstrap library. - mkdir ${theme_path}/${theme_name}/bootstrap - tar -xzvf ${theme_path}/${theme_name}/v${bootstrap_library_version}.tar.gz --strip-components=1 -C ${theme_path}/${theme_name}/bootstrap -vvv - - # 15.4 Delete the archived bootstrap library. - rm ${theme_path}/${theme_name}/v${bootstrap_library_version}.tar.gz - - # 16. If we want to use the RTL (right to left) bootstrap. - if [[ $direction == "rtl" || $direction == "RTL" ]]; then - # 16.1. Delete the template folder bootstrap-rtl. - rm -rf ${theme_path}/${theme_name}/bootstrap-rtl ; - - # 16.2. Download the bootstrap library. change the version as you need. - wget -P ${theme_path}/${theme_name} https://github.com/morteza/bootstrap-rtl/archive/v${bootstrap_rtl_library_version}.tar.gz -vvv - - # 16.3. Extract the bootstrap library. - mkdir ${theme_path}/${theme_name}/bootstrap-rtl - tar -xzvf ${theme_path}/${theme_name}/v${bootstrap_rtl_library_version}.tar.gz --strip-components=1 -C ${theme_path}/${theme_name}/bootstrap-rtl -vvv - - # 16.4. Delete the archived bootstrap library. - rm ${theme_path}/${theme_name}/v${bootstrap_rtl_library_version}.tar.gz - fi - - generated_datetime="$(date '+%Y/%m/%d - %H:%M:%S')"; - generated_log=" Generated by -- create-new-vartheme ${theme_name} ${direction} ${theme_path} -- on ${generated_datetime}"; - echo "${generated_log}" >> ${theme_path}/${theme_name}/README.md; - - echo "---------------------------------------------------------------------------"; - echo " The new Vartheme subtheme were created at \"${theme_path}/${theme_name} :)\" "; - echo "---------------------------------------------------------------------------"; - exit 0; - -else - echo "---------------------------------------------------------------------------"; - echo " The folder \"${theme_path}/${theme_name}\" is already in the site!"; - echo "---------------------------------------------------------------------------"; - exit 1; -fi diff --git a/scripts/delete-testing-users.sh b/scripts/delete-testing-users.sh new file mode 100644 index 0000000000000000000000000000000000000000..a96fa8275e217f6aa27619289a2d6beed3bdf4f3 --- /dev/null +++ b/scripts/delete-testing-users.sh @@ -0,0 +1,32 @@ +#!/bin/usr/env bash + +## cd PROJECT_DIR_NAME/docroot/profiles/varbase/scripts +## bash delete-testing-users.sh + +current_path=$(pwd); + +# Include the Bash YAML library. +source ${current_path}/libs/bash-yaml.sh || exit 1 ; + +# Load the list of default users for Varbase. +eval $(parse_yaml ${current_path}/varbase.users.yml); + +cd ../../../ ; +for user in ${users[@]} +do + user_name="user_${user}_name"; + user_mail="user_${user}_mail"; + user_password="user_${user}_password"; + user_role="user_${user}_role"; + + echo " ---------------------------------------------------------------- "; + echo " User name: ${!user_name}"; + echo " User mail: ${!user_mail}"; + echo " User password: ${!user_password}"; + echo " User role: ${!user_role}"; + echo " ================================================================= "; + + ../vendor/drush/drush/drush user:cancel --delete-content "${!user_name}" --yes; + +done +cd ${current_path}; \ No newline at end of file diff --git a/scripts/libs/bash-yaml.sh b/scripts/libs/bash-yaml.sh new file mode 100644 index 0000000000000000000000000000000000000000..f9b0782cecd2d61154770c5c6152b6e931e8bd03 --- /dev/null +++ b/scripts/libs/bash-yaml.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env bash +# shellcheck disable=SC1003 + +# Based on https://gist.github.com/pkuczynski/8665367 + +parse_yaml() { + local yaml_file=$1 + local prefix=$2 + local s + local w + local fs + + s='[[:space:]]*' + w='[a-zA-Z0-9_.-]*' + fs="$(echo @|tr @ '\034')" + + ( + sed -e '/- [^\“]'"[^\']"'.*: /s|\([ ]*\)- \([[:space:]]*\)|\1-\'$'\n'' \1\2|g' | + + sed -ne '/^--/s|--||g; s|\"|\\\"|g; s/[[:space:]]*$//g;' \ + -e "/#.*[\"\']/!s| #.*||g; /^#/s|#.*||g;" \ + -e "s|^\($s\)\($w\)$s:$s\"\(.*\)\"$s\$|\1$fs\2$fs\3|p" \ + -e "s|^\($s\)\($w\)${s}[:-]$s\(.*\)$s\$|\1$fs\2$fs\3|p" | + + awk -F"$fs" '{ + indent = length($1)/2; + if (length($2) == 0) { conj[indent]="+";} else {conj[indent]="";} + vname[indent] = $2; + for (i in vname) {if (i > indent) {delete vname[i]}} + if (length($3) > 0) { + vn=""; for (i=0; i<indent; i++) {vn=(vn)(vname[i])("_")} + printf("%s%s%s%s=(\"%s\")\n", "'"$prefix"'",vn, $2, conj[indent-1],$3); + } + }' | + + sed -e 's/_=/+=/g' | + + awk 'BEGIN { + FS="="; + OFS="=" + } + /(-|\.).*=/ { + gsub("-|\\.", "_", $1) + } + { print }' + ) < "$yaml_file" +} + +create_variables() { + local yaml_file="$1" + eval "$(parse_yaml "$yaml_file")" +} \ No newline at end of file diff --git a/scripts/scripts.settings.yml b/scripts/scripts.settings.yml deleted file mode 100644 index 73e14151f1510729e61f4e2be24d9e1364acd92a..0000000000000000000000000000000000000000 --- a/scripts/scripts.settings.yml +++ /dev/null @@ -1,6 +0,0 @@ -bootstrap: - library_version: "3.4.0" - rtl_library_version: "3.4.0" -default_themes_creation_path: "themes/custom" -default_theme_name: "mytheme" -default_direction: "ltr" diff --git a/scripts/varbase.users.yml b/scripts/varbase.users.yml new file mode 100644 index 0000000000000000000000000000000000000000..acc96abd9f607eaa1d303e3db82efd1da52206c8 --- /dev/null +++ b/scripts/varbase.users.yml @@ -0,0 +1,40 @@ +varbase: + title: "Varbase" +users: + - authenticated + - editor + - content_admin + - seo_admin + - site_admin + - super_admin +user: + authenticated: + name: Normal user + mail: test.authenticated@vardot.com + password: dD.123123ddd + role: null + editor: + name: Editor + mail: test.editor@vardot.com + password: dD.123123ddd + role: editor + content_admin: + name: Content admin + mail: test.content_admin@vardot.com + password: dD.123123ddd + role: content_admin + seo_admin: + name: SEO admin + mail: test.seo_admin@vardot.com + password: dD.123123ddd + role: seo_admin + site_admin: + name: Site admin + mail: test.site_admin@vardot.com + password: dD.123123ddd + role: site_admin + super_admin: + name: Super admin + mail: test.super_admin@vardot.com + password: dD.123123ddd + role: administrator \ No newline at end of file diff --git a/tests/README.md b/tests/README.md index 1f471e1b2ebad3d189946557bf6df8707cf8f720..9e264dfda203dfaffde8910b25ed5621fee4c729 100644 --- a/tests/README.md +++ b/tests/README.md @@ -4,7 +4,6 @@ step definitions, and assets, which help with the automatic testing for varbase project websites. - This page can help you to have the list all steps, which you need to run the Behat Gherkin Features to test a varbase website in your localhost machine. @@ -17,59 +16,194 @@ the composer. composer create-project vardot/varbase:9.1.x-dev PROJECT_DIR_NAME --stability dev --no-interaction ``` --------------------------------------------------------------------------------- -1. Change the base url value in behat.varbase.yml file, to the domain or the - local virtual domain. +### Add needed testing packages +``` +cd path to your files of the project/PROJECT_DIR_NAME +composer require --dev drupal/core-dev:~9.0 +composer require --dev drush/drush:~10 +composer require --dev drupal/drupal-extension:~4.0 +composer require --dev emuse/behat-html-formatter:^0.2.0 + +``` + +### Install Varbase +Have Varbase installed from the browser or using the `drush site:install` command. +But make sure to have the webmaster user with the `dD.123123ddd` passwrod. + +Exmaple Drush install: +Change directory in the terminal to the path of the project and `/PROJECT_DIR_NAME/docroot` +``` +../bin/drush site-install varbase --yes --account-name="webmaster" --account-pass="dD.123123ddd" --account-mail="webmaster@vardot.com" --db-url="mysql://root:rootpw@127.0.0.1/test_varbase" --locale="en" varbase_multilingual_configuration.enable_multilingual=true varbase_extra_components.vmi=true varbase_extra_components.varbase_heroslider_media=true varbase_extra_components.varbase_carousels=true varbase_extra_components.varbase_search=true varbase_extra_components.varbase_blog=true varbase_extra_components.varbase_auth=true install_configure_form.enable_update_status_emails=NULL -vvv + +``` +### Enable all Varbase components +Make sure that all varbase modules are insalled. +``` +../bin/drush pm:enable vmi --yes +../bin/drush pm:enable varbase_heroslider_media --yes +../bin/drush pm:enable varbase_carousels --yes +../bin/drush pm:enable varbase_search --yes +../bin/drush pm:enable varbase_blog --yes +../bin/drush pm:enable varbase_development --yes +../bin/drush pm:enable varbase_styleguide --yes +../bin/drush pm:enable varbase_landing --yes +../bin/drush pm:enable varbase_api --yes +../bin/drush pm:enable varbase_content_planner --yes +../bin/drush pm:enable varbase_media_instagram --yes +../bin/drush pm:enable varbase_media_twitter --yes +../bin/drush pm:enable varbase_auth --yes +../bin/drush pm:enable social_auth_google --yes +../bin/drush pm:enable social_auth_facebook --yes +../bin/drush pm:enable social_auth_twitter --yes +../bin/drush pm:enable social_auth_linkedin --yes +../bin/drush cr +``` + +### Enable the Drush Language Command module and add RTL language +Needed to add the extra languages. +``` +composer require drupal/drush_language:~1.0 +../bin/drush pm:enable drush_language --yes +../bin/drush language-add ar +../bin/drush language-info +../bin/drush cr +``` + +### Uninstall Antibot module to let the +``` +../bin/drush pm:uninstall antibot --yes +../bin/drush cr +``` + +### Change config for error reporting and CSS/JS aggrigation +``` +../bin/drush config:set system.performance css.preprocess 0 --yes +../bin/drush config:set system.performance js.preprocess 0 --yes +../bin/drush config:set system.logging error_level all --yes +../bin/drush cr +``` + +### Add testing users. +Change directory in the terminal to the path of the project + and `/PROJECT_DIR_NAME/docroot/docroot/profiles/varbase/scripts` +And run the following base command +``` + bash add-testing-users.sh +``` + +To delete testing users use +``` + bash delete-testing-users.sh +``` + +## 1. Change the base url + +Edit the behat.yml file, which located in: +`path to your files of the project/PROJECT_DIR_NAME/docroot/profiles/varbase/behat.yml` + to the domain or the local virtual domain. +``` base_url: 'http://localhost/testing/docroot' +``` --------------------------------------------------------------------------------- -2. Open a new terminal window then start selenium2 at the port 4445. You can +## 2. Open a new terminal window then start selenium2 at the port 4445. You can change the worker selenium robot server and the port number by changing the parameter. ``` "wd_host: 127.0.0.1:4445/wd/hub" ``` - in the behat.varbase.yml file. - or you can get the selenium stand alone server from - http://www.seleniumhq.org/download/ - then you could run this command in the same location in the terminal +in the behat.yml file. +Follow with the following steps to get all needed tools for selenium to work. +### Install Java. +``` +sudo apt update +sudo apt install -y openjdk-11-jre openjdk-11-jre-headless openjdk-11-jdk openjdk-11-jdk-headless +``` +### Install/Update Google Chrome browser. +``` +sudo apt-get install libappindicator1 fonts-liberation libgbm1 libgtk-3-0 xdg-utils +export CHROME_BIN=/usr/bin/google-chrome +wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb +sudo dpkg -i google-chrome-stable_current_amd64.deb +rm google-chrome-stable_current_amd64.deb +``` +### Install/Update Chrome Driver. +``` +CHROME_DRIVER_VERSION=$(wget -qO- chromedriver.storage.googleapis.com/LATEST_RELEASE); +echo $CHROME_DRIVER_VERSION; +wget http://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip +unzip chromedriver_linux64.zip +sudo chmod +x chromedriver +sudo mv -f chromedriver /usr/bin/ +rm chromedriver_linux64.zip +``` +### Get selenium standalone server. ``` -$ java -jar selenium-*.jar -port 4445 +wget http://selenium-release.storage.googleapis.com/2.53/selenium-server-standalone-2.53.1.jar ``` -You can Install and configure selenium server to run on the selenium worker -server by using our command. +## Run selenium standalone server. ``` -$ sh ./tools/install-selenium-server/install-selenium-server-2.53.1.sh +$ java -jar selenium-*.jar -port 4445 ``` -------------------------------------------------------------------------------- -3. Automated testing config. +## 3. Automated testing config. 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. ``` - Behat\MinkExtension: + Drupal\MinkExtension: + ajax_timeout: 60 files_path: "%paths.base%/tests/assets/" goutte: ~ selenium2: wd_host: 127.0.0.1:4445/wd/hub capabilities: - browser: 'firefox' - # browser: 'chrome' + # browser: 'firefox' + browser: 'chrome' # browser: 'phantomjs' nativeEvents: true - base_url: 'http://127.0.0.1:8080' - browser_name: 'firefox' - # browser_name: 'chrome' + marionette: true + browserName: chrome + version: "*" + extra_capabilities: + chromeOptions: + args: + - "--disable-gpu" + - "--window-size=1920,1080" + w3c: false + chrome: + switches: + - "--headless" + - "no-sandbox" + - "--no-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" + base_url: 'http://varbase.test' + # browser_name: 'firefox' + browser_name: 'chrome' # browser_name: 'phantomjs' javascript_session: selenium2 ``` @@ -80,11 +214,11 @@ terminal then you could run the following command: ``` $ ../../../bin/behat tests/features/varbase ``` -4. Run the behat command at PROJECT_DIR_NAME/docroot/profiles/varbase/tests +## 4. Run the behat command at PROJECT_DIR_NAME/docroot/profiles/varbase/tests -$ ../../../bin/behat tests/features/varbase/step2-apply-tests/01-website-base-requirements/01-01-user-registration_only-admins-login.feature - -================================================================================ +``` +$ ../../../bin/behat tests/features/varbase/01-website-base-requirements/01-01-user-registration_only-admins-login.feature +``` ``` Feature: Website Base Requirements - User Registration - Only admins login @@ -118,27 +252,27 @@ So that I will need a site admin or super admin to add me to the website 0m2.21s (59.89Mb) ``` -================================================================================ --------------------------------------------------------------------------------- -5. Run this command with the .feature file to run the Gherkin Script in it to the installed site. + +## 5. Run this command with the .feature file to run the Gherkin Script in it to the installed site. $ ../../../bin/behat tests/features/varbase/your-gherkin-feature.feature $ ../../../bin/behat tests/features/project-name/your-gherkin-feature.feature -------------------------------------------------------------------------------- -8. Run this command to print all available step definitions - +## 8. Run this command to print all available step definitions +``` $ ../../../bin/behat -di - use -dl to just list definition expressions. - use -di to show definitions with extended info. - use -d 'needle' to find specific definitions. +``` - All Varbase custom step definitions are tagged with #varbase tag. +All Varbase custom step definitions are tagged with #varbase tag. + +Example: after a run for bin/behat -di command. - Example : after a run for bin/behat -di command. -================================================================================ ``` default | Then /^I should see image with the "([^"]*)" title text$/ | #varbase : To Find an image with the title text attribute. @@ -150,7 +284,6 @@ $ ../../../bin/behat -di | Example 1: Then I should see image with the "Flag Earth" alt text | at `VarbaseContext::iShouldSeeImageWithTheAltText()` ``` -================================================================================ Scenarios are tagged with the Behat tags of: @@ -159,30 +292,28 @@ $ ../../../bin/behat -di * **@staging = Staging and testing server.** * **@production = Production live server.** - So that we only run bin/behat --tags with the right tag for the environment. +So that we only run bin/behat --tags with the right tag for the environment. - Example: -================================================================================ +Example: ``` - $ ../../../bin/behat --tags '@development' tests/features/varbase/ +$ ../../../bin/behat --tags '@development' tests/features/varbase/ ``` - Which it will run Scenarios which has got the @development tag. -================================================================================ -``` - $ ../../../bin/behat --tags '@staging' ftests/eatures/varbase/ +Which it will run Scenarios which has got the @development tag. - Which it will run Scenarios which has got the @staging tag. ``` -================================================================================ +$ ../../../bin/behat --tags '@staging' ftests/eatures/varbase/ +``` - $ ../../../bin/behat --tags '@production' tests/features/varbase/ +Which it will run Scenarios which has got the @staging tag. - Which it will run Scenarios which has got the @production tag. +``` +$ ../../../bin/behat --tags '@production' tests/features/varbase/ +``` +Which it will run Scenarios which has got the @production tag. -================================================================================ -6. To see the report in HTML. Go and open this file in a browser. +## 9. To see the report in HTML. Go and open this file in a browser. PROJECT_DIR_NAME/docroot/profiles/varbase/tests/reports/index.html You will see the latest report for latest run. @@ -196,50 +327,25 @@ $ ../../../bin/behat -di $ ../../../bin/behat tests/features/example.feature --format pretty --out std --format html --out reports/report-$( date '+%Y-%m-%d_%H-%M-%S' ) -7. If you want to run all Gherkin Features over a new Varbase site. - You will need to create the list of Testing users, and Add French, and Arabic - languages to the site. - - # -------------------------------------------------------------------------- - # You can run the following command: - # -------------------------------------------------------------------------- -``` - $ ../../../bin/behat tests/features/varbase/ --format pretty --out std --format html --out reports/report-$( date '+%Y-%m-%d_%H-%M-%S' ) -``` - After that you can see the report in the PROJECT_DIR_NAME/docroot/profiles/varbase/tests/reports folder. +# 10. If you want to run all Gherkin Features over a new Varbase site. +You will need to create the list of Testing users, and Add Arabic +languages to the site. - If you want to run the test in steps, if you are not interested in the - initialization and cleaning up after the test. +You can run the following command: ``` - $ ../../../bin/behat tests/features/varbase/step1-init-tests - $ ../../../bin/behat tests/features/varbase/step2-apply-tests - $ ../../../bin/behat tests/features/varbase/step3-cleanup-tests +$ ../../../bin/behat tests/features/varbase/ --format pretty --out std --format html --out reports/report-$( date '+%Y-%m-%d_%H-%M-%S' ) ``` +After that you can see the report in the PROJECT_DIR_NAME/docroot/profiles/varbase/tests/reports folder. -# 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. +If you want to run the test in steps, if you are not interested in the +initialization and cleaning up after the test. ``` - Behat\MinkExtension: - files_path: "%paths.base%/tests/assets/" - goutte: ~ - selenium2: - wd_host: 127.0.0.1:4445/wd/hub - capabilities: - browser: 'firefox' - # browser: 'chrome' - # browser: 'phantomjs' - nativeEvents: true - base_url: 'http://127.0.0.1:8080' - browser_name: 'firefox' - # browser_name: 'chrome' - # browser_name: 'phantomjs' - javascript_session: selenium2 +$ ../../../bin/behat tests/features/varbase ``` -Testing scenarios are tagged with the Behat tags of: +### Testing scenarios are tagged with the Behat tags of: * **@local = Local** * **@development = Development server.** @@ -281,9 +387,9 @@ cd docroot/profiles/varbase; Run the varbase full tests. init, apply, then cleanup. ``` cd docroot/profiles/varbase; -../../../bin/behat tests/features/varbase/step1-init-tests --format pretty --out std --format html --out tests/reports/varbase-init-tests-report-$( date '+%Y-%m-%d_%H-%M-%S' ); -../../../bin/behat tests/features/varbase/step2-apply-tests --format pretty --out std --format html --out tests/reports/varbase-apply-tests-report-$( date '+%Y-%m-%d_%H-%M-%S' ); -../../../bin/behat tests/features/varbase/step3-cleanup-tests --format pretty --out std --format html --out tests/reports/varbase-cleanup-tests-report-$( date '+%Y-%m-%d_%H-%M-%S' ); + +../../../bin/behat tests/features/varbase --format pretty --out std --format html --out tests/reports/varbase-apply-tests-report-$( date '+%Y-%m-%d_%H-%M-%S' ); + ``` Run the varbase full tests. Which equivalent to varbase-init-tests, varbase-apply-tests, varbase-cleanup-tests diff --git a/tests/features/bootstrap/VarbaseContext.php b/tests/features/bootstrap/VarbaseContext.php index cbb226ea24207bf9dd4a8966b5dc19b65bf4644c..e51e6b66ea891235033d0087139889206a1fa7aa 100644 --- a/tests/features/bootstrap/VarbaseContext.php +++ b/tests/features/bootstrap/VarbaseContext.php @@ -68,7 +68,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext * Varbase Context #varbase. If you want to see the list of users or add yours you can go and * edit the behat.varbase.yml file under the varbase_users list. * - * Example: I am a logged in user with the username "test_content_admin" + * Example: I am a logged in user with the username "Content admin" * * @Given /^I am a logged in user with (?:|the )"(?P<username>[^"]*)"(?:| user)$/ * @Then /^I login with (?:|the )"(?P<username>[^"]*)"(?:| user)$/ @@ -93,6 +93,8 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext if ($this->matchingElementAfterWait('css', '[data-drupal-selector="edit-name"]', 6000)) { $page->fillField('name', $username); $page->fillField('pass', $password); + $this->iScrollToBottom(); + $this->iWaitForSeconds(2); $submit = $page->findButton('op'); $submit->click(); } @@ -125,6 +127,8 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext if ($this->matchingElementAfterWait('css', '[data-drupal-selector="edit-name"]', 6000)) { $page->fillField('name', $username); $page->fillField('pass', $password); + $this->iScrollToBottom(); + $this->iWaitForSeconds(2); $submit = $page->findButton('op'); $submit->click(); } @@ -664,7 +668,6 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } - /** * Section Configuration Functions * @@ -879,6 +882,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext $animation->click(); } + /** * Images Functions. * @@ -1271,7 +1275,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext */ public function iShouldSeeValueInTheInputElement($text, $selector) { - $elements = $this->getSession()->getPage()->findAll('xpath', "//input[@id='{$selector}']"); + $elements = $this->getSession()->getPage()->findAll('xpath', "//*[@id='{$selector}']"); if (empty($elements)) { throw new \Exception(sprintf('The input element "%s" was not found in the page', $selector)); } 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/01-website-base-requirements/01-01-user-registration_only-admins-login.feature similarity index 81% rename from tests/features/varbase/step2-apply-tests/01-website-base-requirements/01-01-user-registration_only-admins-login.feature rename to tests/features/varbase/01-website-base-requirements/01-01-user-registration_only-admins-login.feature index 6a51ff974eb328523fa227777cf9bc20ee055b9c..4a2e4dc7981358818555833e00b054a4ee134f7b 100644 --- a/tests/features/varbase/step2-apply-tests/01-website-base-requirements/01-01-user-registration_only-admins-login.feature +++ b/tests/features/varbase/01-website-base-requirements/01-01-user-registration_only-admins-login.feature @@ -6,19 +6,19 @@ 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 + @javascript @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 + @javascript @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 + @javascript @local @development @staging @production Scenario: Verify that anonymous users cannot access admin pages When I go to "/admin" And I wait diff --git a/tests/features/varbase/step2-apply-tests/01-website-base-requirements/01-02-user-roles.feature b/tests/features/varbase/01-website-base-requirements/01-02-user-roles.feature similarity index 91% rename from tests/features/varbase/step2-apply-tests/01-website-base-requirements/01-02-user-roles.feature rename to tests/features/varbase/01-website-base-requirements/01-02-user-roles.feature index 6efb853930670292f2a9c84a6fdb219f669c71c5..1436cd57ada8df6d9df7f64c6bf5e228ebc890f1 100644 --- a/tests/features/varbase/step2-apply-tests/01-website-base-requirements/01-02-user-roles.feature +++ b/tests/features/varbase/01-website-base-requirements/01-02-user-roles.feature @@ -3,7 +3,7 @@ As a logged in user with the User ID number 1 I want to be able to see the list of User Roles So that they must be (Editor, Site Admin, Content Admin, Super Admin) - @local @development @staging @production + @javascript @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" diff --git a/tests/features/varbase/step2-apply-tests/01-website-base-requirements/01-03-input-formats.feature b/tests/features/varbase/01-website-base-requirements/01-03-input-formats.feature similarity index 94% rename from tests/features/varbase/step2-apply-tests/01-website-base-requirements/01-03-input-formats.feature rename to tests/features/varbase/01-website-base-requirements/01-03-input-formats.feature index c5649b2a894798ab2ab1fa81005c42583ea28b69..fc4b4059ee21f07ae70d56ffad0568834014d914 100644 --- a/tests/features/varbase/step2-apply-tests/01-website-base-requirements/01-03-input-formats.feature +++ b/tests/features/varbase/01-website-base-requirements/01-03-input-formats.feature @@ -5,7 +5,7 @@ So that can use different type of rich text editors. @javascript @local @development @staging @production Scenario: Check if Site Admin user can change the text format for the body of Basic page - Given I am a logged in user with the "test_site_admin" + Given I am a logged in user with the "Site admin" When I go to "/node/add/page" And I wait Then I should see "Create Basic page" @@ -27,7 +27,7 @@ So that can use different type of rich text editors. @javascript @local @development @staging @production Scenario: Check if Super Admin user can change the text format for the body of Basic page - Given I am a logged in user with the "test_super_admin" + Given I am a logged in user with the "Super admin" When I go to "/node/add/page" And I wait Then I should see "Create Basic page" diff --git a/tests/features/varbase/step2-apply-tests/01-website-base-requirements/01-04-website-languages_english.feature b/tests/features/varbase/01-website-base-requirements/01-04-website-languages_english.feature similarity index 91% rename from tests/features/varbase/step2-apply-tests/01-website-base-requirements/01-04-website-languages_english.feature rename to tests/features/varbase/01-website-base-requirements/01-04-website-languages_english.feature index c79756fe53db0826ae23f514cca0869236f199eb..a8f5504f0bbf166d1ebfae1dff2bfabd5fbc8492 100644 --- a/tests/features/varbase/step2-apply-tests/01-website-base-requirements/01-04-website-languages_english.feature +++ b/tests/features/varbase/01-website-base-requirements/01-04-website-languages_english.feature @@ -5,7 +5,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 + Given I am a logged in user with the "Content admin" user And I go to "/node/add/page" And I wait When I select "English" from "Language" @@ -20,7 +20,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 + Given I am a logged in user with the "Content admin" user And I go to "/node/add/landing_page" And I wait When I select "English" from "Language" @@ -34,7 +34,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 + Given I am a logged in user with the "Site admin" user And I go to "/node/add/page" And I wait When I select "English" from "Language" @@ -49,7 +49,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 + Given I am a logged in user with the "Site admin" user And I go to "/node/add/landing_page" And I wait When I select "English" from "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/01-website-base-requirements/01-05-translatable-content-types-to-all-languages.feature similarity index 89% rename from tests/features/varbase/step2-apply-tests/01-website-base-requirements/01-05-translatable-content-types-to-all-languages.feature rename to tests/features/varbase/01-website-base-requirements/01-05-translatable-content-types-to-all-languages.feature index f7b25e1f73ab6ec64139bc2bb8a80a98821a8f4c..a528e876e555f959bee64c5252cc30fd1ce3321e 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/01-website-base-requirements/01-05-translatable-content-types-to-all-languages.feature @@ -13,7 +13,7 @@ So that I will be able to create a content then I will have the option to transl @javascript @local @development @staging @production 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 + Given I am a logged in user with the "Site admin" user When I go to "/node/add/page" And I wait And I fill in "Test English Basic page" for "Title" @@ -38,12 +38,12 @@ So that I will be able to create a content then I will have the option to transl And I press the "edit-submit" button And I wait Then I should see "تجربة صÙØØ© بسيطة عربية العنوان" - When I click "Tasks" + When I click "المهام" And I wait for ajax to finish - Then I should see "Translate" - When I click "Translate" in the "a" element with the "class" attribute set to "moderation-sidebar-link button" + Then I should see "ترجمة" + When I click "ترجمة" in the "a" element with the "class" attribute set to "moderation-sidebar-link button" And I wait for ajax to finish - Then I should see "Translate" + Then I should see "ترجمة" And I should see "View all translations" And I wait When I click "View all translations" diff --git a/tests/features/varbase/step2-apply-tests/01-website-base-requirements/01-06-convert-urls-links.feature b/tests/features/varbase/01-website-base-requirements/01-06-convert-urls-links.feature similarity index 93% rename from tests/features/varbase/step2-apply-tests/01-website-base-requirements/01-06-convert-urls-links.feature rename to tests/features/varbase/01-website-base-requirements/01-06-convert-urls-links.feature index ed7da83f9da4052ab3e6867c33fee03412dff379..c912932f0ff4dd30e1ff1fa1053025d242ff5064 100644 --- a/tests/features/varbase/step2-apply-tests/01-website-base-requirements/01-06-convert-urls-links.feature +++ b/tests/features/varbase/01-website-base-requirements/01-06-convert-urls-links.feature @@ -5,7 +5,7 @@ So that they will be converted to links and visitors can click on them. @javascript @local @development @staging @production Scenario: Check if inserted raw URL will convert into a link using the "Rich editor" text format when we save a new Basic page - Given I am a logged in user with the "test_site_admin" user + Given I am a logged in user with the "Site admin" user When I go to "/node/add/page" And I wait Then I should see "Create Basic page" diff --git a/tests/features/varbase/step2-apply-tests/02-user-management/02-01-request-new-password.feature b/tests/features/varbase/02-user-management/02-01-request-new-password.feature similarity index 95% rename from tests/features/varbase/step2-apply-tests/02-user-management/02-01-request-new-password.feature rename to tests/features/varbase/02-user-management/02-01-request-new-password.feature index 03bc89fb892395a30503d0715a0eb5118cdc6ada..20f54ae63dff4720bc1b7ce2cbb76759a817396e 100644 --- a/tests/features/varbase/step2-apply-tests/02-user-management/02-01-request-new-password.feature +++ b/tests/features/varbase/02-user-management/02-01-request-new-password.feature @@ -6,7 +6,7 @@ So that I can reset my password for the account Background: Given I am not logged in - @local @development @staging @production + @javascript @local @development @staging @production Scenario: Check that an anonymous user can reset his or her password When I go to "/user/login" And I wait diff --git a/tests/features/varbase/step2-apply-tests/02-user-management/02-02-admins-can-create-users-and-assign-role-them.feature b/tests/features/varbase/02-user-management/02-02-admins-can-create-users-and-assign-role-them.feature similarity index 98% rename from tests/features/varbase/step2-apply-tests/02-user-management/02-02-admins-can-create-users-and-assign-role-them.feature rename to tests/features/varbase/02-user-management/02-02-admins-can-create-users-and-assign-role-them.feature index 4b2e8f5bbf1d3dd648a2c2ddedddd0e16dbde984..96e1323223f3a4dbcefa4a1a5e903680ae3cd397 100644 --- a/tests/features/varbase/step2-apply-tests/02-user-management/02-02-admins-can-create-users-and-assign-role-them.feature +++ b/tests/features/varbase/02-user-management/02-02-admins-can-create-users-and-assign-role-them.feature @@ -44,5 +44,5 @@ So that they will be able to use the site. Then I should see "Are you sure you want to cancel the account Tester?" When I select the radio button "Delete the account and its content. This action cannot be undone." And I press "Confirm" - And I wait 10s + And I wait 5s Then I should see "People" diff --git a/tests/features/varbase/step2-apply-tests/02-user-management/02-03-user-login.feature b/tests/features/varbase/02-user-management/02-03-user-login.feature similarity index 72% rename from tests/features/varbase/step2-apply-tests/02-user-management/02-03-user-login.feature rename to tests/features/varbase/02-user-management/02-03-user-login.feature index 474e8f942f7ffdcbfe57c6a7d4653d5efe0d210b..becba40743d0056870242fa4b09bc33359cf52b8 100644 --- a/tests/features/varbase/step2-apply-tests/02-user-management/02-03-user-login.feature +++ b/tests/features/varbase/02-user-management/02-03-user-login.feature @@ -3,20 +3,22 @@ As a visitor with an existing user account I want to be able to login to the site So that I will be able to view/add/edit/ or delete content in the site - @local @development @staging @production + @javascript @local @development @staging @production Scenario: Check if a visitor can login with a valid username and password Given I am on "user/login" And I wait - When I fill in "test_authenticated" for "Username" + When I fill in "Normal user" for "Username" And I fill in "dD.123123ddd" for "Password" And I press "Log in" And wait - Then I should see "test_authenticated" + Then I should see "Normal user" - @local @development @staging @production + @javascript @local @development @staging @production Scenario: Verify a form error after not entering the username or password when we login Given I am on "user/login" And I wait + When I fill in " " for "Username" + And I fill in " " for "Password" When I press "Log in" And wait Then I should see "Username field is required" diff --git a/tests/features/varbase/step2-apply-tests/02-user-management/02-04-persistent-login.feature b/tests/features/varbase/02-user-management/02-04-persistent-login.feature similarity index 91% rename from tests/features/varbase/step2-apply-tests/02-user-management/02-04-persistent-login.feature rename to tests/features/varbase/02-user-management/02-04-persistent-login.feature index 5f8f3853f256f63d9f51d8819e2124407cd04de5..d466b8b96e5ae9be0feb2695c02a1258cb6479cc 100644 --- a/tests/features/varbase/step2-apply-tests/02-user-management/02-04-persistent-login.feature +++ b/tests/features/varbase/02-user-management/02-04-persistent-login.feature @@ -19,9 +19,10 @@ Feature: User Management - Have persistent login options and configurations And I wait Then I should see "Log in" And I should see "Remember me" - When I fill in "test_authenticated" for "Username" + When I fill in "Normal user" for "Username" And I fill in "dD.123123ddd" for "Password" + And I scroll to bottom And I check the box "Remember me" And I press the "edit-submit" button And I wait - Then I should see "test_authenticated" + Then I should see "Normal user" diff --git a/tests/features/varbase/step2-apply-tests/02-user-management/02-05-user-protect.feature b/tests/features/varbase/02-user-management/02-05-user-protect.feature similarity index 100% rename from tests/features/varbase/step2-apply-tests/02-user-management/02-05-user-protect.feature rename to tests/features/varbase/02-user-management/02-05-user-protect.feature diff --git a/tests/features/varbase/step2-apply-tests/02-user-management/02-06-role-assign.feature b/tests/features/varbase/02-user-management/02-06-role-assign.feature similarity index 100% rename from tests/features/varbase/step2-apply-tests/02-user-management/02-06-role-assign.feature rename to tests/features/varbase/02-user-management/02-06-role-assign.feature diff --git a/tests/features/varbase/step2-apply-tests/03-admin-management/03-00-pre-check-important-admin-development-pages.feature b/tests/features/varbase/03-admin-management/03-00-pre-check-important-admin-development-pages.feature similarity index 81% rename from tests/features/varbase/step2-apply-tests/03-admin-management/03-00-pre-check-important-admin-development-pages.feature rename to tests/features/varbase/03-admin-management/03-00-pre-check-important-admin-development-pages.feature index 034afaef0db3f4cafdcf9a9e6a4ecd7296d5ddb3..5badafd5de19377110ca718cb2aa6f1e7af99091 100644 --- a/tests/features/varbase/step2-apply-tests/03-admin-management/03-00-pre-check-important-admin-development-pages.feature +++ b/tests/features/varbase/03-admin-management/03-00-pre-check-important-admin-development-pages.feature @@ -6,32 +6,32 @@ So that I can use them after the install or update. Background: Given I am a logged in user with the "webmaster" user - @check @local @development @staging @production + @javascript @check @local @development @staging @production Scenario: Check the content page When I go to "/admin/content" And I wait Then I should see "Content" - @check @local @development @staging @production + @javascript @check @local @development @staging @production Scenario: Check the Homepage content with Layout Builder When I go to "/admin/content" And I wait Then I should see "Homepage" And I should see "Landing page (Layout Builder)" in the "Homepage" row - @check @local @development @staging @production + @javascript @check @local @development @staging @production Scenario: Check Files admin page When I go to "/admin/content/files" And I wait Then I should see "Files" - @check @local @development @staging @production + @javascript @check @local @development @staging @production Scenario: Check Media Grid admin page When I go to "/admin/content/media" And I wait Then I should see "Media" - @check @local @development @staging @production + @javascript @check @local @development @staging @production Scenario: Check Media Table admin page When I go to "/admin/content/media" And I wait @@ -45,7 +45,7 @@ So that I can use them after the install or update. And I should see "Updated" And I should see "Operations" - @check @local @development @staging @production + @javascript @check @local @development @staging @production Scenario: Check the structure page When I go to "/admin/structure" And I wait @@ -63,14 +63,14 @@ So that I can use them after the install or update. And I should see "Views" And I should see "Webforms" - @check @local @development @staging @production + @javascript @check @local @development @staging @production Scenario: Check the structure page When I go to "/admin/structure/page_manager" And I wait Then I should see "Pages" And I should see "Total Control dashboard" - @check @local @development @staging @production + @javascript @check @local @development @staging @production Scenario: Check the views page When I go to "/admin/structure/views" And I wait @@ -78,7 +78,7 @@ So that I can use them after the install or update. And I should see "Browser" And I should see "Media Hero Slider" - @check @local @development @staging @production + @javascript @check @local @development @staging @production Scenario: Check the Appearance page When I go to "/admin/appearance" And I wait @@ -90,7 +90,7 @@ So that I can use them after the install or update. And I should see "Bootstrap Barrio" And I should see "Vartheme Claro" - @check @local @development @staging @production + @javascript @check @local @development @staging @production Scenario: Check active type of media types When I go to "/media/add" And I wait @@ -102,7 +102,7 @@ So that I can use them after the install or update. And I should see "Instagram" And I should see "Tweet" - @check @local @development @staging @production + @javascript @check @local @development @staging @production Scenario: Check Varbase update instructions page When I go to "/admin/config/development/update-helper" And I wait @@ -110,13 +110,13 @@ So that I can use them after the install or update. And I should see "100%" And I should not see "Pending updates" - @check @local @development @staging + @javascript @check @local @development @staging Scenario: Check Varbase default Reroute Email settings When I go to "/admin/config/development/reroute_email" And I wait Then I should see "Reroute Email" And the "edit-enable" checkbox is checked And I should see "dev-catchall@vardot.com" value in the "edit-address" input element - And I should see "*@vardot.com" value in the "edit-whitelist" input element + And I should see "*@vardot.com" value in the "edit-allowed" input element And the "edit-description" checkbox is checked And the "edit-message" checkbox is checked diff --git a/tests/features/varbase/step2-apply-tests/03-admin-management/03-01-allows-site-administrators-to-masquerade-by-switching-users.feature b/tests/features/varbase/03-admin-management/03-01-allows-site-administrators-to-masquerade-by-switching-users.feature similarity index 55% rename from tests/features/varbase/step2-apply-tests/03-admin-management/03-01-allows-site-administrators-to-masquerade-by-switching-users.feature rename to tests/features/varbase/03-admin-management/03-01-allows-site-administrators-to-masquerade-by-switching-users.feature index 2320a4f3eb2f273bf1916b1e52f4083644fd5676..494ff60a0330549b859f317ad0cf647af48be0d0 100644 --- a/tests/features/varbase/step2-apply-tests/03-admin-management/03-01-allows-site-administrators-to-masquerade-by-switching-users.feature +++ b/tests/features/varbase/03-admin-management/03-01-allows-site-administrators-to-masquerade-by-switching-users.feature @@ -10,105 +10,107 @@ Scenario: Check if the webmaster user UID 1 can masquerade as any user # Check if the webmaster user UID 1 can masquerade as an authenticated user. When I go to "/admin/people" And I wait - And I fill in "test_authenticated" for "Name or email contains" + And I fill in "Normal user" for "Name or email contains" And I press "Filter" And I wait - Then I should see "test_authenticated" - When I click "test_authenticated" + Then I should see "Normal user" + When I click "Normal user" And I wait - Then I should see "Masquerade as test_authenticated" + Then I should see "Masquerade as Normal user" # Check if the webmaster user UID 1 can masquerade as an Editor user. - When I go to "/admin/people" - And I wait - And I fill in "test_editor" for "Name or email contains" - And I press "Filter" - And I wait - Then I should see "test_editor" - When I click "test_editor" - And I wait - Then I should see "Masquerade as test_editor" + # When I go to "/admin/people" + # And I wait + # And I fill in "Editor" for "Name or email contains" + # And I press "Filter" + # And I wait + # And I scroll to bottom + # Then I should see "Editor" + # When I click "Editor" + # And I wait + # Then I should see "Masquerade as Editor" # Check if the webmaster user UID 1 can masquerade as a content admin user. When I go to "/admin/people" And I wait - And I fill in "test_content_admin" for "Name or email contains" + And I fill in "Content admin" for "Name or email contains" And I press "Filter" And I wait - Then I should see "test_content_admin" - When I click "test_content_admin" + Then I should see "Content admin" + When I click "Content admin" And I wait - Then I should see "Masquerade as test_content_admin" + Then I should see "Masquerade as Content admin" # Check if the webmaster user UID 1 can masquerade as a site admin user. When I go to "/admin/people" And I wait - And I fill in "test_site_admin" for "Name or email contains" + And I fill in "Site admin" for "Name or email contains" And I press "Filter" And I wait - Then I should see "test_site_admin" - When I click "test_site_admin" + Then I should see "Site admin" + When I click "Site admin" And I wait - Then I should see "Masquerade as test_site_admin" + Then I should see "Masquerade as Site admin" # Check if the webmaster user UID 1 can masquerade as a super admin user. When I go to "/admin/people" And I wait - And I fill in "test_super_admin" for "Name or email contains" + And I fill in "Super admin" for "Name or email contains" And I press "Filter" And I wait - Then I should see "test_super_admin" - When I click "test_super_admin" + Then I should see "Super admin" + When I click "Super admin" And I wait - Then I should see "Masquerade as test_super_admin" + Then I should see "Masquerade as Super admin" @javascript @check @local @development @staging @production Scenario: Check if a super admin user can masquerade as any user - Given I am a logged in user with the "test_super_admin" user + Given I am a logged in user with the "Super admin" user # Check if a super admin user can masquerade as an authenticated user. When I go to "/admin/people" And I wait - And I fill in "test_authenticated" for "Name or email contains" + And I fill in "Normal user" for "Name or email contains" And I press "Filter" And I wait - Then I should see "test_authenticated" - When I click "test_authenticated" + Then I should see "Normal user" + When I click "Normal user" And I wait - Then I should see "Masquerade as test_authenticated" + Then I should see "Masquerade as Normal user" # Check if a super admin user can masquerade as an Editor user. - When I go to "/admin/people" - And I wait - And I fill in "test_editor" for "Name or email contains" - And I press "Filter" - And I wait - Then I should see "test_editor" - When I click "test_editor" - And I wait - Then I should see "Masquerade as test_editor" + # When I go to "/admin/people" + # And I wait + # And I fill in "Editor" for "Name or email contains" + # And I press "Filter" + # And I wait + # And I scroll to bottom + # Then I should see "Editor" + # When I click "Editor" + # And I wait + # Then I should see "Masquerade as Editor" # Check if a super admin user can masquerade as a content admin user. When I go to "/admin/people" And I wait - And I fill in "test_content_admin" for "Name or email contains" + And I fill in "Content admin" for "Name or email contains" And I press "Filter" And I wait - Then I should see "test_content_admin" - When I click "test_content_admin" + Then I should see "Content admin" + When I click "Content admin" And I wait - Then I should see "Masquerade as test_content_admin" + Then I should see "Masquerade as Content admin" # Check if a super admin user can masquerade as a site admin user. When I go to "/admin/people" And I wait - And I fill in "test_site_admin" for "Name or email contains" + And I fill in "Site admin" for "Name or email contains" And I press "Filter" And I wait - Then I should see "test_site_admin" - When I click "test_site_admin" + Then I should see "Site admin" + When I click "Site admin" And I wait - Then I should see "Masquerade as test_site_admin" + Then I should see "Masquerade as Site admin" # Check if a super admin user can masquerade as the super user (UID 1) "webmaster". When I go to "/user/1" @@ -118,7 +120,7 @@ Scenario: Check if a super admin user can masquerade as any user @javascript @check @local @development @staging @production Scenario: Check if a site admin user can NOT masquerade as any user # Check if a super admin user can NOT masquerade as the super user (UID 1) "webmaster". - Given I am a logged in user with the "test_site_admin" user + Given I am a logged in user with the "Site admin" user When I go to "/user/1" And I wait Then I should not see "Masquerade as webmaster" @@ -126,53 +128,54 @@ Scenario: Check if a site admin user can NOT masquerade as any user # Check if a site admin user can masquerade as an authenticated user. When I go to "/admin/people" And I wait - And I fill in "test_authenticated" for "Name or email contains" + And I fill in "Normal user" for "Name or email contains" And I press "Filter" And I wait - Then I should see "test_authenticated" - When I click "test_authenticated" + Then I should see "Normal user" + When I click "Normal user" And I wait - Then I should see "Masquerade as test_authenticated" + Then I should see "Masquerade as Normal user" # Check if a site admin user can masquerade as an Editor user. - When I go to "/admin/people" - And I wait - And I fill in "test_editor" for "Name or email contains" - And I press "Filter" - And I wait - Then I should see "test_editor" - When I click "test_editor" - And I wait - Then I should see "Masquerade as test_editor" + # When I go to "/admin/people" + # And I wait + # And I fill in "Editor" for "Name or email contains" + # And I press "Filter" + # And I wait + # And I scroll to bottom + # Then I should see "Editor" + # When I click "Editor" + # And I wait + # Then I should see "Masquerade as Editor" # Check if a site admin user can masquerade as a content admin user. When I go to "/admin/people" And I wait - And I fill in "test_content_admin" for "Name or email contains" + And I fill in "Content admin" for "Name or email contains" And I press "Filter" And I wait - Then I should see "test_content_admin" - When I click "test_content_admin" + Then I should see "Content admin" + When I click "Content admin" And I wait - Then I should see "Masquerade as test_content_admin" + Then I should see "Masquerade as Content admin" @javascript @check @local @development @staging @production Scenario: Check if a content admin user can NOT masquerade as the super user ID 1 the webmaster - Given I am a logged in user with the "test_content_admin" user + Given I am a logged in user with the "Content admin" user When I go to "/user/1" And I wait Then I should not see "Masquerade as webmaster" @javascript @check @local @development @staging @production Scenario: Check if an editor user can NOT masquerade as the super user ID 1 the webmaster - Given I am a logged in user with the "test_editor" user + Given I am a logged in user with the "Editor" user When I go to "/user/1" And I wait Then I should not see "Masquerade as webmaster" @javascript @check @local @development @staging @production Scenario: Check if an authenticated user can NOT masquerade as the super user ID 1 the webmaster - Given I am a logged in user with the "test_authenticated" user + Given I am a logged in user with the "Normal user" user When I go to "/user/1" And I wait Then I should not see "Masquerade as webmaster" \ No newline at end of file diff --git a/tests/features/varbase/step2-apply-tests/03-admin-management/03-02-navigate-through-drupal-admin-keyboard.feature b/tests/features/varbase/03-admin-management/03-02-navigate-through-drupal-admin-keyboard.feature similarity index 81% rename from tests/features/varbase/step2-apply-tests/03-admin-management/03-02-navigate-through-drupal-admin-keyboard.feature rename to tests/features/varbase/03-admin-management/03-02-navigate-through-drupal-admin-keyboard.feature index 6dad7398846ada9065cbceea71b23cd88f42b57b..28223c9507443b392acd08c0b7c7c4d1ef665573 100644 --- a/tests/features/varbase/step2-apply-tests/03-admin-management/03-02-navigate-through-drupal-admin-keyboard.feature +++ b/tests/features/varbase/03-admin-management/03-02-navigate-through-drupal-admin-keyboard.feature @@ -5,35 +5,35 @@ So that I will have a faster access to administration pages in the site. @javascript @check @local @development @staging @production Scenario: Check if Super Admins can access the Coffee search box to navigate fast between admin pages - Given I am a logged in user with the "test_super_admin" user + Given I am a logged in user with the "Super admin" user When I go to the homepage And I wait Then I should see "Go to" @javascript @check @local @development @staging @production Scenario: Check if Site Admins can access the Coffee search box - Given I am a logged in user with the "test_site_admin" user + Given I am a logged in user with the "Site admin" user When I go to the homepage And I wait Then I should see "Go to" @javascript @check @local @development @staging @production Scenario: Check if Content Admins can access the Coffee search box - Given I am a logged in user with the "test_content_admin" user + Given I am a logged in user with the "Content admin" user When I go to the homepage And I wait Then I should see "Go to" @javascript @check @local @development @staging @production Scenario: Check if Editors can access the Coffee search box - Given I am a logged in user with the "test_editor" user + Given I am a logged in user with the "Editor" user When I go to the homepage And I wait Then I should see "Go to" @javascript @check @local @development @staging @production Scenario: Check if Authenticated users can NOT access the Coffee search box - Given I am a logged in user with the "test_authenticated" user + Given I am a logged in user with the "Normal user" user When I go to the homepage And I wait Then I should not see "Go to" diff --git a/tests/features/varbase/step2-apply-tests/03-admin-management/03-03-admins-can-disable-users.feature b/tests/features/varbase/03-admin-management/03-03-admins-can-disable-users.feature similarity index 71% rename from tests/features/varbase/step2-apply-tests/03-admin-management/03-03-admins-can-disable-users.feature rename to tests/features/varbase/03-admin-management/03-03-admins-can-disable-users.feature index 58260cfb6eba18b11c9118589ae771df9dea1f81..82ce3edd2d5354b19cad6dca98512f035a4c4448 100644 --- a/tests/features/varbase/step2-apply-tests/03-admin-management/03-03-admins-can-disable-users.feature +++ b/tests/features/varbase/03-admin-management/03-03-admins-can-disable-users.feature @@ -4,28 +4,28 @@ I want to be able Block user accounts 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 + Scenario: Check if the Normal user user is not blocked and can login Given I am on "/user/login" And I wait - When I fill in "test_authenticated" for "Username" + When I fill in "Normal user" for "Username" And I fill in "dD.123123ddd" for "Password" And I press "Log in" And I wait - Then I should see "test_authenticated" + Then I should see "Normal user" @javascript @local @development @staging @production - Scenario: Check if the site admin can Administer users and disable a User account test_authenticated from accessing the site - Given I am a logged in user with the "test_site_admin" user + Scenario: Check if the site admin can Administer users and disable a User account Normal user from accessing the site + Given I am a logged in user with the "Site admin" user When I go to "/admin/people" And I wait Then I should see "People" - When I fill in "test_authenticated" for "Name or email contains" + When I fill in "Normal user" for "Name or email contains" And I press "Filter" And I wait - Then I should see "test_authenticated" - When I click "Edit" in the "test_authenticated" row + Then I should see "Normal user" + When I click "Edit" in the "Normal user" row And I wait - Then I should see "test_authenticated" + Then I should see "Normal user" When I select the radio button "Blocked" And I press the "Save" button And I wait @@ -35,11 +35,11 @@ So that they will be disabled and not be able to use the site. 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" And I wait - When I fill in "test_authenticated" for "Username" + When I fill in "Normal user" for "Username" And I fill in "dD.123123ddd" for "Password" And I press "Log in" And I wait - Then I should see "The username test_authenticated has not been activated or is blocked." + Then I should see "The username Normal user has not been activated or is blocked." @javascript @local @development @staging @production Scenario: Check flood control default settings @@ -54,7 +54,7 @@ So that they will be disabled and not be able to use the site. @javascript @local @development @staging @production Scenario: Check that the Site Admin have access to the flood unblock page - Given I am a logged in user with the "test_site_admin" user + Given I am a logged in user with the "Site admin" user When I go to "/admin/people/flood-unblock" And I wait Then I should see "Flood Unblock" \ No newline at end of file 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/03-admin-management/03-04-image-media-and-their-usage-list-page-for-admins.feature similarity index 96% rename from tests/features/varbase/step2-apply-tests/03-admin-management/03-04-image-media-and-their-usage-list-page-for-admins.feature rename to tests/features/varbase/03-admin-management/03-04-image-media-and-their-usage-list-page-for-admins.feature index 608821f23c358aaa5098887d5f2030c6ffcf8979..11f1ab0fc51e94bc065be106acc8aaea00b9fe41 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/03-admin-management/03-04-image-media-and-their-usage-list-page-for-admins.feature @@ -4,7 +4,7 @@ I want to be able to see the list of files So that I will be able to manage files, see where they have been used in contents. Background: - Given I am a logged in user with the "test_site_admin" user + Given I am a logged in user with the "Site admin" user @javascript @local @development @staging @production Scenario: Check if content admins can access the content files page @@ -13,7 +13,7 @@ So that I will be able to manage files, see where they have been used in content Then I should see "Add media" And I should not see "Access denied" - @local @development @staging @production + @javascript @local @development @staging @production Scenario: Check if we do have a file named Flag Earth, if not then upload the file dependently When I go to "/media/add/image" And I wait 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/03-admin-management/03-05-json-api-admin-checks-for-the-interface-and-services.feature similarity index 90% rename from tests/features/varbase/step2-apply-tests/03-admin-management/03-05-json-api-admin-checks-for-the-interface-and-services.feature rename to tests/features/varbase/03-admin-management/03-05-json-api-admin-checks-for-the-interface-and-services.feature index c36c1a931cea61545918072bbf7693283be12d58..d2d81514fb73c58b0895be92f05d3ab55f37b4f0 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/03-admin-management/03-05-json-api-admin-checks-for-the-interface-and-services.feature @@ -6,35 +6,35 @@ 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 - @check @local @development @staging @production + @javascript @check @local @development @staging @production Scenario: Check the Varbase API settings in admin configurations page When I go to "/admin/config" And I wait Then I should see "JSON:API" And I should see "Varbase API settings" - @check @local @development @staging @production + @javascript @check @local @development @staging @production Scenario: Check JSON:API configurations When I go to "/admin/config/services/jsonapi" And I wait Then I should see "JSON:API" And I should see "Allowed operations" - @check @local @development @staging @production + @javascript @check @local @development @staging @production Scenario: Check JSON:API Extras configurations When I go to "/admin/config/services/jsonapi/extras" And I wait Then I should see "JSON:API Extras" And I should see "api" value in the "edit-path-prefix" input element - @check @local @development @staging @production + @javascript @check @local @development @staging @production Scenario: Check JSON:API Resource overrides When I go to "/admin/config/services/jsonapi/resource_types" 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." - @check @local @development @staging @production + @javascript @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 @@ -45,7 +45,7 @@ So that I can use them to enable or disable API service for Varbase APIs. And I wait Then I should see "Path to the directory in which to store the generated keys." - @check @local @development @staging @production + @javascript @check @local @development @staging @production Scenario: Check Open API settings and documentation pages When I go to "/admin/config/services/openapi" And I wait @@ -53,9 +53,9 @@ So that I can use them to enable or disable API service for Varbase APIs. And I should see "Rest" And I should see "JSON:API" - @local @development @staging @production + @javascript @local @development @staging @production Scenario: Upload a Media entity test for API - Given I am a logged in user with the "test_site_admin" user + Given I am a logged in user with the "Site admin" user When I go to "/media/add/image" And I wait Then I should see "Allowed types: png gif jpg jpeg." @@ -70,9 +70,9 @@ So that I can use them to enable or disable API service for Varbase APIs. And I wait Then I should see "Media entity test" - @local @development @staging @production + @javascript @local @development @staging @production Scenario: Add a term "space" tag term for JSON:API to test. - Given I am a logged in user with the "test_site_admin" user + Given I am a logged in user with the "Site admin" user When I go to "/admin/structure/taxonomy/manage/tags/add" And I wait Then I should see "Add term" @@ -85,7 +85,7 @@ So that I can use them to enable or disable API service for Varbase APIs. @javascript @check @local @development @staging @production Scenario: Check that Site Admin users can access "View JSON" and "View API Docs" entity operations - Given I am a logged in user with the "test_site_admin" user + 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" @@ -120,7 +120,7 @@ So that I can use them to enable or disable API service for Varbase APIs. @javascript @check @local @development @staging @production Scenario: Check that Content Admin users can not access "View JSON" and "View API Docs" entity operations - Given I am a logged in user with the "test_content_admin" user + Given I am a logged in user with the "Content admin" user When I go to "/admin/content" And I wait Then I should see "Content" @@ -153,7 +153,7 @@ So that I can use them to enable or disable API service for Varbase APIs. @javascript @check @local @development @staging @production Scenario: Check that Editor users can access "View JSON" and "View API Docs" entity operations - Given I am a logged in user with the "test_editor" user + Given I am a logged in user with the "Editor" user When I go to "/admin/content" And I wait Then I should see "Content" diff --git a/tests/features/varbase/step2-apply-tests/03-admin-management/03-06-responsive-preview-devices.feature b/tests/features/varbase/03-admin-management/03-06-responsive-preview-devices.feature similarity index 100% rename from tests/features/varbase/step2-apply-tests/03-admin-management/03-06-responsive-preview-devices.feature rename to tests/features/varbase/03-admin-management/03-06-responsive-preview-devices.feature diff --git a/tests/features/varbase/step2-apply-tests/03-admin-management/03-07-access-admin-audit-trail-permissions.feature b/tests/features/varbase/03-admin-management/03-07-access-admin-audit-trail-permissions.feature similarity index 87% rename from tests/features/varbase/step2-apply-tests/03-admin-management/03-07-access-admin-audit-trail-permissions.feature rename to tests/features/varbase/03-admin-management/03-07-access-admin-audit-trail-permissions.feature index 3550d24da0eb8b264a8c263e7c566c65f1e5d4da..155c90b6298151a8dd344f2feb00359cb9d1ccff 100644 --- a/tests/features/varbase/step2-apply-tests/03-admin-management/03-07-access-admin-audit-trail-permissions.feature +++ b/tests/features/varbase/03-admin-management/03-07-access-admin-audit-trail-permissions.feature @@ -20,7 +20,7 @@ So that only users with permission can see trails of audit changes on the websit @javascript @check @local @development @staging @production Scenario: Check that an authenticated user can not access the Admin audit trails - Given I am a logged in user with the "test_authenticated" user + Given I am a logged in user with the "Normal user" user When I go to "/admin/reports/audit-trail" And I wait Then I should not see "Admin audit trails" @@ -28,28 +28,28 @@ So that only users with permission can see trails of audit changes on the websit @javascript @check @local @development @staging @production Scenario: Check that Editor users can access the Admin audit trails - Given I am a logged in user with the "test_editor" user + Given I am a logged in user with the "Editor" user When I go to "/admin/reports/audit-trail" And I wait Then I should see "Admin audit trails" @javascript @check @local @development @staging @production Scenario: Check that Content Admin users can access the Admin audit trails - Given I am a logged in user with the "test_content_admin" user + Given I am a logged in user with the "Content admin" user When I go to "/admin/reports/audit-trail" And I wait Then I should see "Admin audit trails" @javascript @check @local @development @staging @production Scenario: Check that SEO Admin users can access the Admin audit trails - Given I am a logged in user with the "test_seo_admin" user + Given I am a logged in user with the "SEO admin" user When I go to "/admin/reports/audit-trail" And I wait Then I should see "Admin audit trails" @javascript @check @local @development @staging @production Scenario: Check that Site Admin users can access the Admin audit trails - Given I am a logged in user with the "test_site_admin" user + Given I am a logged in user with the "Site admin" user When I go to "/admin/reports/audit-trail" And I wait Then I should see "Admin audit trails" diff --git a/tests/features/varbase/step2-apply-tests/03-admin-management/03-08-access-media-bulk-upload-permissions.feature b/tests/features/varbase/03-admin-management/03-08-access-media-bulk-upload-permissions.feature similarity index 87% rename from tests/features/varbase/step2-apply-tests/03-admin-management/03-08-access-media-bulk-upload-permissions.feature rename to tests/features/varbase/03-admin-management/03-08-access-media-bulk-upload-permissions.feature index 451c05e59b2889adbdc6a9c4f70df8d99021ed60..32b8059fbc130f7049cd95160ba98434d07c2325 100644 --- a/tests/features/varbase/step2-apply-tests/03-admin-management/03-08-access-media-bulk-upload-permissions.feature +++ b/tests/features/varbase/03-admin-management/03-08-access-media-bulk-upload-permissions.feature @@ -20,7 +20,7 @@ So that large number of asset files can be uploaded at onces @javascript @check @local @development @staging @production Scenario: Check that an authenticated user can not bulk upload media - Given I am a logged in user with the "test_authenticated" user + Given I am a logged in user with the "Normal user" user When I go to "/admin/content/media/bulk-upload/media_bulk_upload" And I wait Then I should not see "Multiple upload" @@ -28,28 +28,28 @@ So that large number of asset files can be uploaded at onces @javascript @check @local @development @staging @production Scenario: Check that Editor users can bulk upload media - Given I am a logged in user with the "test_editor" user + Given I am a logged in user with the "Editor" user When I go to "/admin/content/media/bulk-upload/media_bulk_upload" And I wait Then I should see "Multiple upload" @javascript @check @local @development @staging @production Scenario: Check that Content Admin users bulk upload media - Given I am a logged in user with the "test_content_admin" user + Given I am a logged in user with the "Content admin" user When I go to "/admin/content/media/bulk-upload/media_bulk_upload" And I wait Then I should see "Multiple upload" @javascript @check @local @development @staging @production Scenario: Check that SEO Admin users can bulk upload media - Given I am a logged in user with the "test_seo_admin" user + Given I am a logged in user with the "SEO admin" user When I go to "/admin/content/media/bulk-upload/media_bulk_upload" And I wait Then I should see "Multiple upload" @javascript @check @local @development @staging @production Scenario: Check that Site Admin users can bulk upload media - Given I am a logged in user with the "test_site_admin" user + Given I am a logged in user with the "Site admin" user When I go to "/admin/content/media/bulk-upload/media_bulk_upload" And I wait Then I should see "Multiple upload" diff --git a/tests/features/varbase/step2-apply-tests/04-content-structure/04-01-basic-page-permissions.feature b/tests/features/varbase/04-content-structure/04-01-basic-page-permissions.feature similarity index 86% rename from tests/features/varbase/step2-apply-tests/04-content-structure/04-01-basic-page-permissions.feature rename to tests/features/varbase/04-content-structure/04-01-basic-page-permissions.feature index 36e33ba2fb33f4d71eff65e54981cdfc57b729b3..d5e99b5fcce7bb5a6d3df42a708aadd5a93b7a23 100644 --- a/tests/features/varbase/step2-apply-tests/04-content-structure/04-01-basic-page-permissions.feature +++ b/tests/features/varbase/04-content-structure/04-01-basic-page-permissions.feature @@ -8,35 +8,35 @@ So that the "Basic page" will show up in the structured menu under its parent pa @javascript @local @development @staging @production Scenario: Check if an authenticated user can add content of Basic page type - Given I am a logged in user with the "test_authenticated" user + Given I am a logged in user with the "Normal user" user When I go to "/node/add" And I wait Then I should see "You are not authorized to access this page." @javascript @local @development @staging @production Scenario: Check if an Editor can add content of Basic page type - Given I am a logged in user with the "test_editor" user + Given I am a logged in user with the "Editor" user When I go to "/node/add" And I wait Then I should see "Basic page" @javascript @local @development @staging @production Scenario: Check if a Content Admin can add content of Basic page type - Given I am a logged in user with the "test_content_admin" user + Given I am a logged in user with the "Content admin" user When I go to "/node/add" And I wait Then I should see "Basic page" @javascript @local @development @staging @production Scenario: Check if a Site Admin can add content of Basic page type - Given I am a logged in user with the "test_site_admin" user + Given I am a logged in user with the "Site admin" user When I go to "/node/add" And I wait Then I should see "Basic page" @javascript @local @development @staging @production Scenario: Check if a Super Admin can add content of Basic page type - Given I am a logged in user with the "test_super_admin" user + Given I am a logged in user with the "Super admin" user When I go to "/node/add" And I wait Then I should see "Basic page" @@ -50,7 +50,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 can create Basic pages content - Given I am a logged in user with the "test_super_admin" user + Given I am a logged in user with the "Super admin" user When I go to "/node/add/page" And I wait Then I should see "Create Basic page" @@ -60,7 +60,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 + Given I am a logged in user with the "Super admin" user When I go to "/node/add/page" And I wait And I fill in "Test Basic page" for "Title" @@ -72,7 +72,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 + Given I am a logged in user with the "Super admin" user When I go to "/admin/content" And I wait Then I should see "Content" diff --git a/tests/features/varbase/step2-apply-tests/04-content-structure/04-02-landing-page-paragraphs_permissions.feature b/tests/features/varbase/04-content-structure/04-02-landing-page-paragraphs_permissions.feature similarity index 90% rename from tests/features/varbase/step2-apply-tests/04-content-structure/04-02-landing-page-paragraphs_permissions.feature rename to tests/features/varbase/04-content-structure/04-02-landing-page-paragraphs_permissions.feature index 3a563b2ed77566146a20407ae4adbb27f7bcc0d7..3fb9e84df32e1d9b56110747084f950feff8ec70 100644 --- a/tests/features/varbase/step2-apply-tests/04-content-structure/04-02-landing-page-paragraphs_permissions.feature +++ b/tests/features/varbase/04-content-structure/04-02-landing-page-paragraphs_permissions.feature @@ -27,7 +27,7 @@ So that the "Landing page (Paragraphs)" will show up in the structured menu unde @javascript @local @development @staging @production Scenario: Check that an authenticated user can not create a Landing page (Paragraphs) - Given I am a logged in user with the "test_authenticated" user + Given I am a logged in user with the "Normal user" user When I go to "/node/add/landing_page" And I wait Then I should see "Access denied" @@ -35,7 +35,7 @@ So that the "Landing page (Paragraphs)" will show up in the structured menu unde @javascript @local @development @staging @production Scenario: Check that Editor users can create a Landing page (Paragraphs) - Given I am a logged in user with the "test_editor" user + Given I am a logged in user with the "Editor" user When I go to "/node/add/landing_page" And I wait Then I should not see "Access denied" @@ -43,7 +43,7 @@ So that the "Landing page (Paragraphs)" will show up in the structured menu unde @javascript @local @development @staging @production Scenario: Check that Content Admin users can create a Landing page (Paragraphs) - Given I am a logged in user with the "test_content_admin" user + Given I am a logged in user with the "Content admin" user When I go to "/node/add/landing_page" And I wait Then I should not see "Access denied" @@ -51,7 +51,7 @@ So that the "Landing page (Paragraphs)" will show up in the structured menu unde @javascript @local @development @staging @production Scenario: Check that Site Admin users can create a Landing page (Paragraphs) - Given I am a logged in user with the "test_site_admin" user + Given I am a logged in user with the "Site admin" user When I go to "/node/add/landing_page" And I wait Then I should not see "Access denied" 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/04-content-structure/04-03-landing-page-paragraphs_add-any-paragraph-type-to-the-page.feature similarity index 92% rename from tests/features/varbase/step2-apply-tests/04-content-structure/04-03-landing-page-paragraphs_add-any-paragraph-type-to-the-page.feature rename to tests/features/varbase/04-content-structure/04-03-landing-page-paragraphs_add-any-paragraph-type-to-the-page.feature index dff3f11168dc12ebd3f397fabb68e55c659279c2..06ef708fb4ffdfc68f5e309a0b161e0af49e8525 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/04-content-structure/04-03-landing-page-paragraphs_add-any-paragraph-type-to-the-page.feature @@ -1,11 +1,11 @@ Feature: Landing page (Paragraphs) - Add any paragraph types to the page As a logged in user with a permission to mange Landing pages I want to be able to add any paragraph type to the page -So that the Landing page (Paragraphs)" will show up having paragrpahs of different types +So that the Landing page (Paragraphs) will show up having paragrpahs of different types - @local @development @staging @production + @javascript @local @development @staging @production Scenario: Upload the "Embed Flag Earth" file - Given I am a logged in user with the "test_site_admin" user + Given I am a logged in user with the "Site admin" user When I go to "/media/add/image" And I wait Then I should see "Allowed types: png gif jpg jpeg." @@ -34,7 +34,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 + Given I am a logged in user with the "Site admin" user When I go to "/node/add/landing_page" And I wait And I fill in "Test Landing page Drupal Block" for "Title" @@ -56,7 +56,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 + Given I am a logged in user with the "Site admin" user When I go to "/node/add/landing_page" And I wait And I fill in "Test Landing page Columns (Equal)" for "Title" @@ -75,7 +75,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 + Given I am a logged in user with the "Site admin" user When I go to "/node/add/landing_page" And I wait And I fill in "Test Landing page Columns (Two Uneven)" for "Title" @@ -94,7 +94,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 + Given I am a logged in user with the "Site admin" user When I go to "/node/add/landing_page" And I wait And I fill in "Test Landing page Rich Text" for "Title" @@ -116,7 +116,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 + Given I am a logged in user with the "Site admin" user When I go to "/node/add/landing_page" And I wait And I fill in "Test Landing page WebForm" for "Title" 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/04-content-structure/04-04-landing-page-paragraphs_text-and-image-paragraphs.feature similarity index 95% rename from tests/features/varbase/step2-apply-tests/04-content-structure/04-04-landing-page-paragraphs_text-and-image-paragraphs.feature rename to tests/features/varbase/04-content-structure/04-04-landing-page-paragraphs_text-and-image-paragraphs.feature index d33ab216d5736f44f3fdb22197784210b927a5f8..75c39e058c89df368d4ea463490430a94f98a062 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/04-content-structure/04-04-landing-page-paragraphs_text-and-image-paragraphs.feature @@ -3,9 +3,9 @@ As a logged in user with a permission to mange Landing page (Paragraphs) I want to be able to add number of Text and image paragraph compoments So that the "Landing page (Paragraphs)" will have text and images in right and left view. - @local @development @staging @production + @javascript @local @development @staging @production Scenario: Upload the Embed Flag Earth file - Given I am a logged in user with the "test_site_admin" user + Given I am a logged in user with the "Site admin" user When I go to "/media/add/image" And I wait Then I should see "Allowed types: png gif jpg jpeg." @@ -25,7 +25,7 @@ So that the "Landing page (Paragraphs)" will have text and images in right and l @javascript @local @development @staging @production 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 + Given I am a logged in user with the "Site admin" user 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" diff --git a/tests/features/varbase/step2-apply-tests/04-content-structure/04-05-standard-bredcrumbs.feature b/tests/features/varbase/04-content-structure/04-05-standard-bredcrumbs.feature similarity index 93% rename from tests/features/varbase/step2-apply-tests/04-content-structure/04-05-standard-bredcrumbs.feature rename to tests/features/varbase/04-content-structure/04-05-standard-bredcrumbs.feature index 675cb436fb25a139aeaef89837bcac27021922bc..e2200e0e2ee7595878e53e072226b5873258a330 100644 --- a/tests/features/varbase/step2-apply-tests/04-content-structure/04-05-standard-bredcrumbs.feature +++ b/tests/features/varbase/04-content-structure/04-05-standard-bredcrumbs.feature @@ -5,7 +5,7 @@ So that I can see path I followed to locate the current page usually near the to @javascript @local @development @staging @production Scenario: Add the Test Basic page root page to the main menu - Given I am a logged in user with the "test_site_admin" user + Given I am a logged in user with the "Site admin" user When I go to "/node/add/page" And I wait And I fill in "Test Basic page root title" for "Title" @@ -22,7 +22,7 @@ So that I can see path I followed to locate the current page usually near the to @javascript @local @development @staging @production Scenario: Add the Test Basic page sub 1, then check the breadcrumb - Given I am a logged in user with the "test_site_admin" user + Given I am a logged in user with the "Site admin" user When I go to "/node/add/page" And I wait And I fill in "Test Basic page sub 1 title" for "Title" diff --git a/tests/features/varbase/step2-apply-tests/04-content-structure/04-06-blog-permissions.feature b/tests/features/varbase/04-content-structure/04-06-blog-permissions.feature similarity index 88% rename from tests/features/varbase/step2-apply-tests/04-content-structure/04-06-blog-permissions.feature rename to tests/features/varbase/04-content-structure/04-06-blog-permissions.feature index 51b9c2b31c479a1f4e59a17989cd880d0aee665c..e6b7377343a4a02184667a101672b8f17197c74a 100644 --- a/tests/features/varbase/step2-apply-tests/04-content-structure/04-06-blog-permissions.feature +++ b/tests/features/varbase/04-content-structure/04-06-blog-permissions.feature @@ -19,7 +19,7 @@ I want to be able to add a "Blog" @javascript @local @development @staging @production Scenario: Check that authenticated users can not create a Landing page - Given I am a logged in user with the "test_authenticated" user + Given I am a logged in user with the "Normal user" user When I go to "/node/add/varbase_blog" And I wait Then I should see "Access denied" @@ -27,7 +27,7 @@ I want to be able to add a "Blog" @javascript @local @development @staging @production Scenario: Check that Editor users can create a Landing page - Given I am a logged in user with the "test_editor" user + Given I am a logged in user with the "Editor" user When I go to "/node/add/varbase_blog" And I wait Then I should not see "Access denied" @@ -35,7 +35,7 @@ I want to be able to add a "Blog" @javascript @local @development @staging @production Scenario: Check that Content Admin users can create a Landing page - Given I am a logged in user with the "test_content_admin" user + Given I am a logged in user with the "Content admin" user When I go to "/node/add/varbase_blog" And I wait Then I should not see "Access denied" @@ -43,7 +43,7 @@ I want to be able to add a "Blog" @javascript @local @development @staging @production Scenario: Check that Site Admin users can create a Landing page - Given I am a logged in user with the "test_site_admin" user + Given I am a logged in user with the "Site admin" user When I go to "/node/add/varbase_blog" And I wait Then I should not see "Access denied" diff --git a/tests/features/varbase/step2-apply-tests/04-content-structure/04-07-landing-page-layout-builder-permissions.feature b/tests/features/varbase/04-content-structure/04-07-landing-page-layout-builder-permissions.feature similarity index 90% rename from tests/features/varbase/step2-apply-tests/04-content-structure/04-07-landing-page-layout-builder-permissions.feature rename to tests/features/varbase/04-content-structure/04-07-landing-page-layout-builder-permissions.feature index 18d8e74a3c9e764ef71cef8e6ba89b117e40259c..1514bdc71abf353df234eb7558698ee78ea7ae95 100644 --- a/tests/features/varbase/step2-apply-tests/04-content-structure/04-07-landing-page-layout-builder-permissions.feature +++ b/tests/features/varbase/04-content-structure/04-07-landing-page-layout-builder-permissions.feature @@ -28,7 +28,7 @@ So that the "Landing page (Layout Builder)" will show up in the structured menu @javascript @local @development @staging @production Scenario: Check that an authenticated user can not create a Landing page (Layout Builder) - Given I am a logged in user with the "test_authenticated" user + Given I am a logged in user with the "Normal user" user When I go to "/node/add/landing_page_lb" And I wait Then I should see "Access denied" @@ -36,7 +36,7 @@ So that the "Landing page (Layout Builder)" will show up in the structured menu @javascript @local @development @staging @production Scenario: Check that Editor users can create a Landing page (Layout Builder) - Given I am a logged in user with the "test_editor" user + Given I am a logged in user with the "Editor" user When I go to "/node/add/landing_page_lb" And I wait Then I should not see "Access denied" @@ -44,7 +44,7 @@ So that the "Landing page (Layout Builder)" will show up in the structured menu @javascript @local @development @staging @production Scenario: Check that Content Admin users can create a Landing page (Layout Builder) - Given I am a logged in user with the "test_content_admin" user + Given I am a logged in user with the "Content admin" user When I go to "/node/add/landing_page_lb" And I wait Then I should not see "Access denied" @@ -52,7 +52,7 @@ So that the "Landing page (Layout Builder)" will show up in the structured menu @javascript @local @development @staging @production Scenario: Check that SEO Admin users can create a Landing page (Layout Builder) - Given I am a logged in user with the "test_seo_admin" user + Given I am a logged in user with the "SEO admin" user When I go to "/node/add/landing_page_lb" And I wait Then I should not see "Access denied" @@ -60,7 +60,7 @@ So that the "Landing page (Layout Builder)" will show up in the structured menu @javascript @local @development @staging @production Scenario: Check that Site Admin users can create a Landing page (Layout Builder) - Given I am a logged in user with the "test_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 not see "Access denied" 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/04-content-structure/04-08-landing-page-layout-builder_check-to-add-sections-and-choose-layouts-for-sections.feature similarity index 96% rename from 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 rename to tests/features/varbase/04-content-structure/04-08-landing-page-layout-builder_check-to-add-sections-and-choose-layouts-for-sections.feature index 4b8c71f31b0bc60348bbd4156752e80caed02c0e..0458c602212b59b8eca174384fbfd483312e4e23 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/04-content-structure/04-08-landing-page-layout-builder_check-to-add-sections-and-choose-layouts-for-sections.feature @@ -5,7 +5,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 + 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)" diff --git a/tests/features/varbase/step2-apply-tests/04-content-structure/04-09-homepage-permissions.feature b/tests/features/varbase/04-content-structure/04-09-homepage-permissions.feature similarity index 94% rename from tests/features/varbase/step2-apply-tests/04-content-structure/04-09-homepage-permissions.feature rename to tests/features/varbase/04-content-structure/04-09-homepage-permissions.feature index 1c3995a2f865f292db02a5a66cd3976b0d5abb78..9a2b86e786a9cc0d8fe2380c53859941ba707812 100644 --- a/tests/features/varbase/step2-apply-tests/04-content-structure/04-09-homepage-permissions.feature +++ b/tests/features/varbase/04-content-structure/04-09-homepage-permissions.feature @@ -40,7 +40,7 @@ So that the homepage can be changed with permission in an easy way and be sure i @javascript @local @development @staging @production Scenario: Check that an authenticated user can not edit the Homepage which built by the Landing page (Layout Builder) - Given I am a logged in user with the "test_authenticated" user + Given I am a logged in user with the "Normal user" user When I go to the homepage And I wait Then I should see "Welcome to Varbase" @@ -57,7 +57,7 @@ So that the homepage can be changed with permission in an easy way and be sure i @javascript @local @development @staging @production Scenario: Check that Editor users can edit the Homepage which built by the Landing page (Layout Builder) - Given I am a logged in user with the "test_editor" user + Given I am a logged in user with the "Editor" user When I go to the homepage And I wait Then I should see "Welcome to Varbase" @@ -75,7 +75,7 @@ So that the homepage can be changed with permission in an easy way and be sure i @javascript @local @development @staging @production Scenario: Check that Content Admin users can edit the Homepage which built by the Landing page (Layout Builder) - Given I am a logged in user with the "test_content_admin" user + Given I am a logged in user with the "Content admin" user When I go to the homepage And I wait Then I should see "Welcome to Varbase" @@ -93,7 +93,7 @@ So that the homepage can be changed with permission in an easy way and be sure i @javascript @local @development @staging @production Scenario: Check that SEO Admin users can edit the Homepage which built by the Landing page (Layout Builder) - Given I am a logged in user with the "test_seo_admin" user + Given I am a logged in user with the "SEO admin" user When I go to the homepage And I wait Then I should see "Welcome to Varbase" @@ -111,7 +111,7 @@ So that the homepage can be changed with permission in an easy way and be sure i @javascript @local @development @staging @production Scenario: Check that Site Admin users can edit the Homepage which built by the Landing page (Layout Builder) - Given I am a logged in user with the "test_site_admin" user + Given I am a logged in user with the "Site admin" user When I go to the homepage And I wait Then I should see "Welcome to Varbase" diff --git a/tests/features/varbase/step2-apply-tests/05-content-management/05-00-add-default-entityqueue-testing-content-and-config.feature b/tests/features/varbase/05-content-management/05-00-add-default-entityqueue-testing-content-and-config.feature similarity index 100% rename from tests/features/varbase/step2-apply-tests/05-content-management/05-00-add-default-entityqueue-testing-content-and-config.feature rename to tests/features/varbase/05-content-management/05-00-add-default-entityqueue-testing-content-and-config.feature 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/05-content-management/05-01-entityqueue-reverse-order-in-admin-view.feature similarity index 100% rename from tests/features/varbase/step2-apply-tests/05-content-management/05-01-entityqueue-reverse-order-in-admin-view.feature rename to tests/features/varbase/05-content-management/05-01-entityqueue-reverse-order-in-admin-view.feature diff --git a/tests/features/varbase/step2-apply-tests/05-content-management/05-02-entityqueue-tasks-for-content-types.feature b/tests/features/varbase/05-content-management/05-02-entityqueue-tasks-for-content-types.feature similarity index 95% rename from tests/features/varbase/step2-apply-tests/05-content-management/05-02-entityqueue-tasks-for-content-types.feature rename to tests/features/varbase/05-content-management/05-02-entityqueue-tasks-for-content-types.feature index 6094e94e731bed442763d66d1c9e8d2b6706891a..790030b9a8ca5014d821f25dd6d5b164d6126cda 100644 --- a/tests/features/varbase/step2-apply-tests/05-content-management/05-02-entityqueue-tasks-for-content-types.feature +++ b/tests/features/varbase/05-content-management/05-02-entityqueue-tasks-for-content-types.feature @@ -5,7 +5,7 @@ So that I can Add to queue or Remove from queue for the content. @javascript @local @development Scenario: Check if queuable content have the Entityqueue tab at the full content page and can Add to queue or Remove from queue - Given I am a logged in user with the "test_super_admin" user + Given I am a logged in user with the "Super admin" user When I go to "/node/add/test_content" And I wait Then I should see "Create Test Content" 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/05-content-management/05-03-add-hero-slider-to-entityqueue-using-entityqueue-form-widget.feature similarity index 97% rename from tests/features/varbase/step2-apply-tests/05-content-management/05-03-add-hero-slider-to-entityqueue-using-entityqueue-form-widget.feature rename to tests/features/varbase/05-content-management/05-03-add-hero-slider-to-entityqueue-using-entityqueue-form-widget.feature index 388d427b149299099c24882a93c9bb07e9f9c782..6db868cf8474998d4ef39b70d5573a0ac8a46d17 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/05-content-management/05-03-add-hero-slider-to-entityqueue-using-entityqueue-form-widget.feature @@ -4,7 +4,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 + Given I am a logged in user with the "Site admin" user When I go to "/media/add/image" And I wait Then I should see "Allowed types: png gif jpg jpeg." @@ -23,7 +23,7 @@ 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 them remove them - Given I am a logged in user with the "test_super_admin" user + Given I am a logged in user with the "Super admin" user # Add the "Test hero slier #1" content and to the hero slider queue. When I go to "/node/add/varbase_heroslider_media" diff --git a/tests/features/varbase/step2-apply-tests/05-content-management/05-04-cloning-content-and-entities.feature b/tests/features/varbase/05-content-management/05-04-cloning-content-and-entities.feature similarity index 95% rename from tests/features/varbase/step2-apply-tests/05-content-management/05-04-cloning-content-and-entities.feature rename to tests/features/varbase/05-content-management/05-04-cloning-content-and-entities.feature index 5350ee31443ed3823241c8f6dc5038a377039b14..4606bfdcb5513bc69c4ddf6cd8cd0b995ca3ce79 100644 --- a/tests/features/varbase/step2-apply-tests/05-content-management/05-04-cloning-content-and-entities.feature +++ b/tests/features/varbase/05-content-management/05-04-cloning-content-and-entities.feature @@ -4,7 +4,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 + Given I am a logged in user with the "Site admin" user When I go to "/node/add/landing_page" And I wait And I fill in "Test Clone landing page" for "Title" @@ -47,7 +47,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 + Given I am a logged in user with the "Super admin" user When I go to "/admin/content" And I wait Then I should see "Content" diff --git a/tests/features/varbase/05-content-management/05-05-embed-existing-media-image-library.feature b/tests/features/varbase/05-content-management/05-05-embed-existing-media-image-library.feature new file mode 100644 index 0000000000000000000000000000000000000000..fb48515729b50e38b11033ac160e3395aab54f32 --- /dev/null +++ b/tests/features/varbase/05-content-management/05-05-embed-existing-media-image-library.feature @@ -0,0 +1,37 @@ +Feature: File & Media Management - Assets Management - Ability to embed existing media image library in the rich text editor +As a content admin +I want to be able to embed existing files from the library of files in the CKEditor +So that it will show up under that rich text field without having to upload the image for each content + + Background: + Given I am a logged in user with the "Site admin" user + + # Create the Basic page and upload the file to the library before the test case. + # ---------------------------------------------------------------------------- + @javascript @local @development @staging @production + Scenario: Create the Test Basic page to embed existing files content + 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" + And I select "published" from "edit-moderation-state-0-state" + And I press the "Save" button + And I wait + Then I should see "Basic page Test Basic page to embed existing files has been created." + + @javascript @local @development @staging @production + Scenario: Upload the Embed Flag Earth file + 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" + And I wait + And I press the "Save" button + And I wait + And I fill in "Embed Flag Earth in space" for "field_media_image[0][alt]" + And I fill in "Embed Flag Earth all earth in space" for "field_media_image[0][title]" + And I fill in "Embed Flag Earth" for "name[0][value]" + And I check the box "Show in media library" + And I press the "Save" button + And I wait + Then I should see "Embed Flag Earth" diff --git a/tests/features/varbase/step2-apply-tests/05-content-management/05-06-easy-linking-internal-content-searching-content-by-its-titles.feature b/tests/features/varbase/05-content-management/05-06-easy-linking-internal-content-searching-content-by-its-titles.feature similarity index 95% rename from tests/features/varbase/step2-apply-tests/05-content-management/05-06-easy-linking-internal-content-searching-content-by-its-titles.feature rename to tests/features/varbase/05-content-management/05-06-easy-linking-internal-content-searching-content-by-its-titles.feature index d0e2ad2377f046c36c10c68623cb0f93a41693db..d2873d23c9953c85c960bd2ac9990d8602370930 100644 --- a/tests/features/varbase/step2-apply-tests/05-content-management/05-06-easy-linking-internal-content-searching-content-by-its-titles.feature +++ b/tests/features/varbase/05-content-management/05-06-easy-linking-internal-content-searching-content-by-its-titles.feature @@ -5,7 +5,7 @@ So that will ease the work of adding internal links in the rich text editor fiel @javascript @local @development @staging @production Scenario: Check if inserted raw URL will convert into a link when we save when We are using the Visual editor text format - Given I am a logged in user with the "test_site_admin" user + Given I am a logged in user with the "Site admin" user When I go to "/node/add/page" And I wait Then I should see "Create Basic page" @@ -19,7 +19,7 @@ So that will ease the work of adding internal links in the rich text editor fiel @javascript @local @development @staging @production Scenario: Check if inserted raw URL will convert into a link when we save when we are using the Visual editor text format - Given I am a logged in user with the "test_site_admin" user + Given I am a logged in user with the "Site admin" user When I go to "/node/add/page" And I wait Then I should see "Create Basic page" diff --git a/tests/features/varbase/step2-apply-tests/05-content-management/05-07-content-workflows.feature b/tests/features/varbase/05-content-management/05-07-content-workflows.feature similarity index 100% rename from tests/features/varbase/step2-apply-tests/05-content-management/05-07-content-workflows.feature rename to tests/features/varbase/05-content-management/05-07-content-workflows.feature diff --git a/tests/features/varbase/step2-apply-tests/05-content-management/05-08-content-planning-and-scheduling.feature b/tests/features/varbase/05-content-management/05-08-content-planning-and-scheduling.feature similarity index 100% rename from tests/features/varbase/step2-apply-tests/05-content-management/05-08-content-planning-and-scheduling.feature rename to tests/features/varbase/05-content-management/05-08-content-planning-and-scheduling.feature diff --git a/tests/features/varbase/README.md b/tests/features/varbase/README.md index 6b994c8f9b81a540d2b6b88e46adc8eca7b6f09f..3c666117a8e1d2ada03a0782d953d937b4b98e4a 100644 --- a/tests/features/varbase/README.md +++ b/tests/features/varbase/README.md @@ -1,6 +1,6 @@ # Varbase Gherkin features -A list of features, and scenarios to have a full test over Varbase 9.1.x +A list of features, and scenarios to have a full test over Varbase If you want to run all Gherkin Features over a new Varbase site. You will need to create the list of Testing users, Arabic @@ -17,87 +17,5 @@ If you want to run the test in steps, if you are not interested in the initialization and cleaning up after the test. ``` - $ ../../../bin/behat tests/features/varbase/step1-init-tests - $ ../../../bin/behat tests/features/varbase/step2-apply-tests - $ ../../../bin/behat tests/features/varbase/step3-cleanup-tests + $ ../../../bin/behat tests/features/varbase ``` - - -## List of features in the step 1 init tests: --------------------------------------------------------------------------------- - -* Feature: Create default testing users -``` -test_authenticated: { email: 'authenticated.test@vardot.com', password: 'dD.123123ddd' } -test_editor: { email: 'editor.test@vardot.com', password: 'dD.123123ddd' } -test_content_admin: { email: 'content.admin.test@vardot.com', password: 'dD.123123ddd' } -test_seo_admin: { email: 'seo.admin.test@vardot.com', password: 'dD.123123ddd' } -test_site_admin: { email: 'site.admin.test@vardot.com', password: 'dD.123123ddd' } -test_super_admin: { email: 'super.admin.test@vardot.com', password: 'dD.123123ddd' } -``` -* Feature: Add Arabic language if we do not have it to languages in the system - -## List of Features in the step 2 apply tests: --------------------------------------------------------------------------------- - - -### Website Base Requirements -* Feature: Website Base Requirements - User Registration - Only admins login -* Feature: Website Base Requirements - User Roles - Simple Roles -* Feature: Content Editing - Rich Text Editor - Input formats -* Feature: Website Base Requirements - Website Languages - English -* Feature: Website Base Requirements - Website Languages - All content translatable to all languages -* Feature: Content Editing - Rich Text Editor - Convert URLs into links - -### User Management -* Feature: User Management - Standard User Management - Request new password -* Feature: User Management - Standard User Management - Admins can create users and assign a role to them -* Feature: User Management - Standard User Management - Login -* Feature: User Management - Have persistent login options and configurations -* Feature: User Management - Standard User Management - Have fine-grained access control of user administrators protections with specific user, or all users in a role -* Feature: User Management - Standard User Management - Users with permission to assign roles may select which roles are available for assignment - -### Admin Management -* Feature: Pre-check important administrator and development pages -* Feature: Support Requirements - Standard Support Navigation - Allow site super administrators to switch users and surf the site as that user -* Feature: Admin management - Standard Back-End Navigation - Navigate through the Drupal admin with the keyboard for faster access -* Feature: User Management - Standard User Management - Admins can disable users -* Feature: File & Media Management - Assets Management - Image media and their usage list page for site admins -* Feature: Check JSON:API admin interface and services and Varbase API settings -* Feature: Preview the site in a number of responsive devices - -### Content Structure -* Feature: Content Structure - Basic Page -* Feature: Content Structure - Landing Pages -* Feature: Landing Pages - Add any paragraph types to the page -* Feature: Content Structure - Landing Pages - Varbase text and image paragraphs -* Feature: Navigational Features - Breadcrumbs - Standard breadcrumbs -* Feature: Content Structure - Blog post - -### Content Management -* Feature: Content Management - Add default [entityqueue] module testing content and configuration -* Feature: Content Management - Standard Entity Queue Management - Have the option to Reverse order in admin view -* Feature: Content Management - Standard Entity Queue Management - Have Entity queue tab inside the full content page and be able to Add to a queue or Remove from a queue -* Feature: Content Management - Add hero slider to entity queue using entity queue form widget -* Feature: Content Management - Cloning content and entities -* Feature: File & Media Management - Assets Management - Ability to embed existing media image library in the rich text editor -* Feature: Content Editing - Rich Text Editor - Easy linking to internal content by searching for content by its titles - - -## List of features in the step 3 cleanup tests: --------------------------------------------------------------------------------- - - -* Feature: Delete default testing users -``` -test_authenticated -test_editor -test_content_admin -test_seo_admin -test_site_admin -test_super_admin -``` - -* Feature: Delete Arabic language from the system -* Feature: Cleanup after [entityqueue] module tests -* Feature: Cleanup leftover media from the Media Library diff --git a/tests/features/varbase/step1-init-tests/01-create-default-testing-users.feature b/tests/features/varbase/step1-init-tests/01-create-default-testing-users.feature deleted file mode 100644 index e877ab9bff2efc8ea7528f29cd195b784ca538b0..0000000000000000000000000000000000000000 --- a/tests/features/varbase/step1-init-tests/01-create-default-testing-users.feature +++ /dev/null @@ -1,94 +0,0 @@ -Feature: Create default testing users - -# test_authenticated: { email: 'authenticated.test@vardot.com', password: 'dD.123123ddd' } -# test_editor: { email: 'editor.test@vardot.com', password: 'dD.123123ddd' } -# test_content_admin: { email: 'content.admin.test@vardot.com', password: 'dD.123123ddd' } -# test_seo_admin: { email: 'seo.admin.test@vardot.com', password: 'dD.123123ddd' } -# test_site_admin: { email: 'site.admin.test@vardot.com', password: 'dD.123123ddd' } -# test_super_admin: { email: 'super.admin.test@vardot.com', password: 'dD.123123ddd' } - - Background: - Given I am a logged in user with the "webmaster" user - - @init @tools @local @development @staging - Scenario: Create the test_authenticated user - When I go to "/admin/people/create" - And I wait - Then I should see "Add user" - When I fill in "authenticated.test@vardot.com" for "Email address" - And I fill in "test_authenticated" for "Username" - And I fill in "dD.123123ddd" for "Password" - And I fill in "dD.123123ddd" for "Confirm password" - And I press "Create new account" - And I wait - Then I should not see "The name test_authenticated is already taken." - - @init @tools @local @development @staging - Scenario: Create the test_editor user - When I go to "/admin/people/create" - And I wait - Then I should see "Add user" - When I fill in "editor.test@vardot.com" for "Email address" - And I fill in "test_editor" for "Username" - And I fill in "dD.123123ddd" for "Password" - And I fill in "dD.123123ddd" for "Confirm password" - And I check the box "Editor" - And I press "Create new account" - And I wait - Then I should not see "The name test_editor is already taken." - - @init @tools @local @development @staging - Scenario: Create the test_content_admin user - When I go to "/admin/people/create" - And I wait - Then I should see "Add user" - When I fill in "content.admin.test@vardot.com" for "Email address" - And I fill in "test_content_admin" for "Username" - And I fill in "dD.123123ddd" for "Password" - And I fill in "dD.123123ddd" for "Confirm password" - And I check the box "Content Admin" - And I press "Create new account" - And I wait - Then I should not see "The name test_content_admin is already taken." - - @init @tools @local @development @staging - Scenario: Create the test_seo_admin user - When I go to "/admin/people/create" - And I wait - Then I should see "Add user" - When I fill in "seo.admin.test@vardot.com" for "Email address" - And I fill in "test_seo_admin" for "Username" - And I fill in "dD.123123ddd" for "Password" - And I fill in "dD.123123ddd" for "Confirm password" - And I check the box "SEO Admin" - And I press "Create new account" - And I wait - Then I should not see "The name test_seo_admin is already taken." - - @init @tools @local @development @staging - Scenario: Create the test_site_admin user - When I go to "/admin/people/create" - And I wait - Then I should see "Add user" - When I fill in "site.admin.test@vardot.com" for "Email address" - And I fill in "test_site_admin" for "Username" - And I fill in "dD.123123ddd" for "Password" - And I fill in "dD.123123ddd" for "Confirm password" - And I check the box "Site Admin" - And I press "Create new account" - And I wait - Then I should not see "The name test_site_admin is already taken." - - @init @tools @local @development @staging - Scenario: Create the test_super_admin user - When I go to "/admin/people/create" - And I wait - Then I should see "Add user" - When I fill in "super.admin.test@vardot.com" for "Email address" - And I fill in "test_super_admin" for "Username" - And I fill in "dD.123123ddd" for "Password" - And I fill in "dD.123123ddd" for "Confirm password" - And I check the box "Super Admin" - And I press "Create new account" - And I wait - Then I should not see "The name test_super_admin is already taken." diff --git a/tests/features/varbase/step1-init-tests/README.md b/tests/features/varbase/step1-init-tests/README.md deleted file mode 100644 index c693a8642ae6ec86df4da56167bba65705e83b7d..0000000000000000000000000000000000000000 --- a/tests/features/varbase/step1-init-tests/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# Varbase Gherkin features -# List of features in step 1 -# Initialization of tests - -* Feature: Create default testing users -``` -test_authenticated: { email: 'authenticated.test@vardot.com', password: 'dD.123123ddd' } -test_editor: { email: 'editor.test@vardot.com', password: 'dD.123123ddd' } -test_content_admin: { email: 'content.admin.test@vardot.com', password: 'dD.123123ddd' } -test_seo_admin: { email: 'seo.admin.test@vardot.com', password: 'dD.123123ddd' } -test_site_admin: { email: 'site.admin.test@vardot.com', password: 'dD.123123ddd' } -test_super_admin: { email: 'super.admin.test@vardot.com', password: 'dD.123123ddd' } -``` -* Feature: Add Arabic language if we do not have it to languages in the system 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 deleted file mode 100644 index f7bc6dc88e20fe53e7c5f5d08806907ffd00a085..0000000000000000000000000000000000000000 --- a/tests/features/varbase/step2-apply-tests/05-content-management/05-05-embed-existing-media-image-library.feature +++ /dev/null @@ -1,89 +0,0 @@ -Feature: File & Media Management - Assets Management - Ability to embed existing media image library in the rich text editor -As a content admin -I want to be able to embed existing files from the library of files in the CKEditor -So that it will show up under that rich text field without having to upload the image for each content - - Background: - Given I am a logged in user with the "test_site_admin" user - - # Create the Basic page and upload the file to the library before the test case. - # ---------------------------------------------------------------------------- - @javascript @local @development @staging @production - Scenario: Create the Test Basic page to embed existing files content - 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" - And I select "published" from "edit-moderation-state-0-state" - And I press the "Save" button - And I wait - Then I should see "Basic page Test Basic page to embed existing files has been created." - - @local @development @staging @production - Scenario: Upload the Embed Flag Earth file - 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" - And I wait - And I press the "Save" button - And I wait - And I fill in "Embed Flag Earth in space" for "field_media_image[0][alt]" - And I fill in "Embed Flag Earth all earth in space" for "field_media_image[0][title]" - And I fill in "Embed Flag Earth" for "name[0][value]" - And I check the box "Show in media library" - And I press the "Save" button - And I wait - Then I should see "Embed Flag Earth" - #----------------------------------------------------------------------------- - -# @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" -# And I wait -# Then I should see "Content" -# When I fill in "Test Basic page to embed existing files" for "Title" -# And I press the "Filter" button -# And I wait -# Then I should see "Test Basic page to embed existing files" -# When I click "Edit" in the "Test Basic page to embed existing files" row -# And I wait -# And I wait for 5 seconds -# Then I should see "Edit Basic page Test Basic page to embed existing files" -# When I move focus to "Body" rich text editor field -# And I click the editor media browser command button -# And I wait -# And I wait for AJAX to finish -# And I wait -# And I wait for 5 seconds -# Then the editor media browser should be open -# When I switch to iframe "entity_browser_iframe_editor_media_browser" -# And I fill in "Embed Flag Earth" for "edit-name" -# And I press the "Search" button -# And I wait for AJAX to finish -# Then I should see image with the "Embed Flag Earth all earth in space" title text -# When I double click on the image with the "Embed Flag Earth all earth in space" title text -# And wait max of 5s -# And I wait for AJAX to finish -# And wait max of 5s -# And I switch to main frame -# And I wait for AJAX to finish -# And wait max of 5s -# And I fill in "Embed Flag Earth custom Caption text" for "Caption" -# And I fill in "Embed Flag Earth custom Alt text" for "Alternate text" -# When I click "Embed" in the "button" element with the "class" attribute set to "js-form-submit form-submit" -# And I wait for AJAX to finish -# And I select "published" from "edit-moderation-state-0-state" -# 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" -# And I wait -# Then I should see "Content" -# When I fill in "Test Basic page to embed existing files" for "Title" -# And I press the "Filter" button -# And I wait -# Then I should see "Test Basic page to embed existing files" -# When I click "Test Basic page to embed existing files" -# And I wait -# Then I should see image with the "Embed Flag Earth all earth in space" title text diff --git a/tests/features/varbase/step2-apply-tests/README.md b/tests/features/varbase/step2-apply-tests/README.md deleted file mode 100644 index 632899753122349ce22d4bb410296091a718ba50..0000000000000000000000000000000000000000 --- a/tests/features/varbase/step2-apply-tests/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# Varbase Gherkin features -# Apply tests -# List of Features in the step 2 - - -### Website Base Requirements -* Feature: Website Base Requirements - User Registration - Only admins login -* Feature: Website Base Requirements - User Roles - Simple Roles -* Feature: Content Editing - Rich Text Editor - Input formats -* Feature: Website Base Requirements - Website Languages - English -* Feature: Website Base Requirements - Website Languages - All content translatable to all languages -* Feature: Content Editing - Rich Text Editor - Convert URLs into links - -### User Management -* Feature: User Management - Standard User Management - Request new password -* Feature: User Management - Standard User Management - Admins can create users and assign a role to them -* Feature: User Management - Standard User Management - Login -* Feature: User Management - Have persistent login options and configurations -* Feature: User Management - Standard User Management - Have fine-grained access control of user administrators protections with specific user, or all users in a role -* Feature: User Management - Standard User Management - Users with permission to assign roles may select which roles are available for assignment - -### Admin Management -* Feature: Pre-check important administrator and development pages -* Feature: Support Requirements - Standard Support Navigation - Allow site super administrators to switch users and surf the site as that user -* Feature: Admin management - Standard Back-End Navigation - Navigate through the Drupal admin with the keyboard for faster access -* Feature: User Management - Standard User Management - Admins can disable users -* Feature: File & Media Management - Assets Management - Image media and their usage list page for site admins -* Feature: Check JSON:API admin interface and services and Varbase API settings -* Feature: Preview the site in a number of responsive devices - -### Content Structure -* Feature: Content Structure - Basic Page -* Feature: Content Structure - Landing Pages -* Feature: Landing Pages - Add any paragraph types to the page -* Feature: Content Structure - Landing Pages - Varbase text and image paragraphs -* Feature: Navigational Features - Breadcrumbs - Standard breadcrumbs -* Feature: Content Structure - Blog post - -### Content Management -* Feature: Content Management - Add default [entityqueue] module testing content and configuration -* Feature: Content Management - Standard Entity Queue Management - Have the option to Reverse order in admin view -* Feature: Content Management - Standard Entity Queue Management - Have Entity queue tab inside the full content page and be able to Add to a queue or Remove from a queue -* Feature: Content Management - Add hero slider to entity queue using entity queue form widget -* Feature: Content Management - Cloning content and entities -* Feature: File & Media Management - Assets Management - Ability to embed existing media image library in the rich text editor -* Feature: Content Editing - Rich Text Editor - Easy linking to internal content by searching for content by its titles diff --git a/tests/features/varbase/step3-cleanup-tests/01-delete-default-testing-users.feature b/tests/features/varbase/step3-cleanup-tests/01-delete-default-testing-users.feature deleted file mode 100644 index 1862db39b515c4f050178352b7588e10d57fab8c..0000000000000000000000000000000000000000 --- a/tests/features/varbase/step3-cleanup-tests/01-delete-default-testing-users.feature +++ /dev/null @@ -1,28 +0,0 @@ -Feature: Delete default testing users - -# test_authenticated: { email: 'authenticated.test@vardot.com', password: 'dD.123123ddd' } -# test_editor: { email: 'editor.test@vardot.com', password: 'dD.123123ddd' } -# test_content_admin: { email: 'content.admin.test@vardot.com', password: 'dD.123123ddd' } -# test_seo_admin: { email: 'seo.admin.test@vardot.com', password: 'dD.123123ddd' } -# test_site_admin: { email: 'site.admin.test@vardot.com', password: 'dD.123123ddd' } -# test_super_admin: { email: 'super.admin.test@vardot.com', password: 'dD.123123ddd' } - - @javascript @cleanup @tools @local @development @staging - Scenario: Delete default testing users. - Given I am a logged in user with the "webmaster" user - When I go to "/admin/people" - And I wait - Then I should see "People" - When I check the box "test_authenticated" - And I check the box "test_editor" - And I check the box "test_content_admin" - And I check the box "test_seo_admin" - And I check the box "test_site_admin" - And I check the box "test_super_admin" - And I select "Cancel the selected user accounts" from "action" - When I press "Apply to selected items" - And I wait - And I select the radio button "Delete the account and its content. This action cannot be undone." - And I press "Apply" - And I wait 15s - Then I should see "Action processing results: (6)." \ No newline at end of file diff --git a/tests/tools/step1-init-tests/01-create-default-testing-users.feature b/tests/tools/step1-init-tests/01-create-default-testing-users.feature new file mode 100644 index 0000000000000000000000000000000000000000..3d2a5f9f98e2ee841a239b14cd97fe9a17cb6b3f --- /dev/null +++ b/tests/tools/step1-init-tests/01-create-default-testing-users.feature @@ -0,0 +1,94 @@ +Feature: Create default testing users + +# Normal user: { email: 'test.authenticated@vardot.com', password: 'dD.123123ddd' } +# Editor: { email: 'test.editor@vardot.com', password: 'dD.123123ddd' } +# Content admin: { email: 'test.content_admin@vardot.com', password: 'dD.123123ddd' } +# SEO admin: { email: 'test.seo_admin@vardot.com', password: 'dD.123123ddd' } +# Site admin: { email: 'test.site_admin@vardot.com', password: 'dD.123123ddd' } +# Super admin: { email: 'test.super_admin@vardot.com', password: 'dD.123123ddd' } + + Background: + Given I am a logged in user with the "webmaster" user + + @javascript @init @tools @local @development @staging + Scenario: Create the Normal user user + When I go to "/admin/people/create" + And I wait + Then I should see "Add user" + When I fill in "test.authenticated@vardot.com" for "Email address" + And I fill in "Normal user" for "Username" + And I fill in "dD.123123ddd" for "Password" + And I fill in "dD.123123ddd" for "Confirm password" + And I press "Create new account" + And I wait + Then I should not see "The name Normal user is already taken." + + @javascript @init @tools @local @development @staging + Scenario: Create the Editor user + When I go to "/admin/people/create" + And I wait + Then I should see "Add user" + When I fill in "test.editor@vardot.com" for "Email address" + And I fill in "Editor" for "Username" + And I fill in "dD.123123ddd" for "Password" + And I fill in "dD.123123ddd" for "Confirm password" + And I check the box "Editor" + And I press "Create new account" + And I wait + Then I should not see "The name Editor is already taken." + + @javascript @init @tools @local @development @staging + Scenario: Create the Content admin user + When I go to "/admin/people/create" + And I wait + Then I should see "Add user" + When I fill in "test.content_admin@vardot.com" for "Email address" + And I fill in "Content admin" for "Username" + And I fill in "dD.123123ddd" for "Password" + And I fill in "dD.123123ddd" for "Confirm password" + And I check the box "Content Admin" + And I press "Create new account" + And I wait + Then I should not see "The name Content admin is already taken." + + @javascript @init @tools @local @development @staging + Scenario: Create the SEO admin user + When I go to "/admin/people/create" + And I wait + Then I should see "Add user" + When I fill in "test.seo_admin@vardot.com" for "Email address" + And I fill in "SEO admin" for "Username" + And I fill in "dD.123123ddd" for "Password" + And I fill in "dD.123123ddd" for "Confirm password" + And I check the box "SEO Admin" + And I press "Create new account" + And I wait + Then I should not see "The name SEO admin is already taken." + + @javascript @init @tools @local @development @staging + Scenario: Create the Site admin user + When I go to "/admin/people/create" + And I wait + Then I should see "Add user" + When I fill in "test.site_admin@vardot.com" for "Email address" + And I fill in "Site admin" for "Username" + And I fill in "dD.123123ddd" for "Password" + And I fill in "dD.123123ddd" for "Confirm password" + And I check the box "Site Admin" + And I press "Create new account" + And I wait + Then I should not see "The name Site admin is already taken." + + @javascript @init @tools @local @development @staging + Scenario: Create the Super admin user + When I go to "/admin/people/create" + And I wait + Then I should see "Add user" + When I fill in "test.super_admin@vardot.com" for "Email address" + And I fill in "Super admin" for "Username" + And I fill in "dD.123123ddd" for "Password" + And I fill in "dD.123123ddd" for "Confirm password" + And I check the box "Super Admin" + And I press "Create new account" + And I wait + Then I should not see "The name Super admin is already taken." diff --git a/tests/features/varbase/step1-init-tests/02-add-arabic.feature b/tests/tools/step1-init-tests/02-add-arabic.feature similarity index 91% rename from tests/features/varbase/step1-init-tests/02-add-arabic.feature rename to tests/tools/step1-init-tests/02-add-arabic.feature index b705db5f412dc7c82a67798400c11ee6bf4291fe..4b745bf72a193e97864f2ae8acbb5f5aad5777ba 100644 --- a/tests/features/varbase/step1-init-tests/02-add-arabic.feature +++ b/tests/tools/step1-init-tests/02-add-arabic.feature @@ -1,6 +1,6 @@ Feature: Add Arabic language if we do not have it to languages in the system - @init @tools @local @development @staging @arabic + @javascript @init @tools @local @development @staging @arabic Scenario: Add Arabic language if we do not have it to languages in the system Given I am a logged in user with the "webmaster" user When I go to "/admin/config/regional/language" diff --git a/tests/tools/step1-init-tests/README.md b/tests/tools/step1-init-tests/README.md new file mode 100644 index 0000000000000000000000000000000000000000..01db55f472ee2d63c0e6fbcdc8c7dddf023dc4b8 --- /dev/null +++ b/tests/tools/step1-init-tests/README.md @@ -0,0 +1,6 @@ +# Varbase Gherkin features +# List of features in step 1 +# Initialization of tests + +Moved to tests/tools + diff --git a/tests/tools/step3-cleanup-tests/01-delete-default-testing-users.feature b/tests/tools/step3-cleanup-tests/01-delete-default-testing-users.feature new file mode 100644 index 0000000000000000000000000000000000000000..3ac7137920fffef6da1a842e5156ceb2247c7bcd --- /dev/null +++ b/tests/tools/step3-cleanup-tests/01-delete-default-testing-users.feature @@ -0,0 +1,28 @@ +Feature: Delete default testing users + +# Normal user: { email: 'test.authenticated@vardot.com', password: 'dD.123123ddd' } +# Editor: { email: 'test.editor@vardot.com', password: 'dD.123123ddd' } +# Content admin: { email: 'test.content_admin@vardot.com', password: 'dD.123123ddd' } +# SEO admin: { email: 'test.seo_admin@vardot.com', password: 'dD.123123ddd' } +# Site admin: { email: 'test.site_admin@vardot.com', password: 'dD.123123ddd' } +# Super admin: { email: 'test.super_admin@vardot.com', password: 'dD.123123ddd' } + + @javascript @cleanup @tools @local @development @staging + Scenario: Delete default testing users. + Given I am a logged in user with the "webmaster" user + When I go to "/admin/people" + And I wait + Then I should see "People" + When I check the box "Normal user" + And I check the box "Editor" + And I check the box "Content admin" + And I check the box "SEO admin" + And I check the box "Site admin" + And I check the box "Super admin" + And I select "Cancel the selected user accounts" from "action" + When I press "Apply to selected items" + And I wait + And I select the radio button "Delete the account and its content. This action cannot be undone." + And I press "Apply" + And I wait 15s + Then I should see "Action processing results: (6)." \ No newline at end of file diff --git a/tests/features/varbase/step3-cleanup-tests/02-delete-arabic.feature b/tests/tools/step3-cleanup-tests/02-delete-arabic.feature similarity index 100% rename from tests/features/varbase/step3-cleanup-tests/02-delete-arabic.feature rename to tests/tools/step3-cleanup-tests/02-delete-arabic.feature diff --git a/tests/features/varbase/step3-cleanup-tests/03-cleanup-after-entityqueue-tests.feature b/tests/tools/step3-cleanup-tests/03-cleanup-after-entityqueue-tests.feature similarity index 100% rename from tests/features/varbase/step3-cleanup-tests/03-cleanup-after-entityqueue-tests.feature rename to tests/tools/step3-cleanup-tests/03-cleanup-after-entityqueue-tests.feature diff --git a/tests/features/varbase/step3-cleanup-tests/04-cleanup-leftover-media-in-the-media-library.feature b/tests/tools/step3-cleanup-tests/04-cleanup-leftover-media-in-the-media-library.feature similarity index 100% rename from tests/features/varbase/step3-cleanup-tests/04-cleanup-leftover-media-in-the-media-library.feature rename to tests/tools/step3-cleanup-tests/04-cleanup-leftover-media-in-the-media-library.feature diff --git a/tests/features/varbase/step3-cleanup-tests/README.md b/tests/tools/step3-cleanup-tests/README.md similarity index 74% rename from tests/features/varbase/step3-cleanup-tests/README.md rename to tests/tools/step3-cleanup-tests/README.md index 5e53710bd5255a6688cd283878c72412f80ba421..a52ac516477b31f1305269f00d13c79ac261405e 100644 --- a/tests/features/varbase/step3-cleanup-tests/README.md +++ b/tests/tools/step3-cleanup-tests/README.md @@ -4,12 +4,12 @@ * Feature: Delete default testing users ``` -test_authenticated -test_editor -test_content_admin -test_seo_admin -test_site_admin -test_super_admin +Normal user +Editor +Content admin +SEO admin +Site admin +Super admin ``` * Feature: Delete Arabic language from the system diff --git a/tests/tools/users/create-default-testing-users.feature b/tests/tools/users/create-default-testing-users.feature deleted file mode 100644 index aac1e60497db4145fb7612a38f782b3ae64f78cb..0000000000000000000000000000000000000000 --- a/tests/tools/users/create-default-testing-users.feature +++ /dev/null @@ -1,74 +0,0 @@ -Feature: Create default testing users. - -# test_authenticated: { email: 'authenticated.test@vardot.com', password: 'dD.123123ddd' } -# test_editor: { email: 'editor.test@vardot.com', password: 'dD.123123ddd' } -# test_content_admin: { email: 'content.admin.test@vardot.com', password: 'dD.123123ddd' } -# test_site_admin: { email: 'site.admin.test@vardot.com', password: 'dD.123123ddd' } -# test_super_admin: { email: 'super.admin.test@vardot.com', password: 'dD.123123ddd' } - - Background: - Given I am a logged in user with the "webmaster" user - - @init @tools @local @development @staging - Scenario: Create the test_authenticated user. - When I go to "/admin/people/create" - And I wait - And I fill in "authenticated.test@vardot.com" for "Email address" - And I fill in "test_authenticated" for "Username" - And I fill in "dD.123123ddd" for "Password" - And I fill in "dD.123123ddd" for "Confirm password" - And I press "Create new account" - And I wait - Then I should not see "The name test_authenticated is already taken." - - @init @tools @local @development @staging - Scenario: Create the test_editor user. - When I go to "/admin/people/create" - And I wait - And I fill in "editor.test@vardot.com" for "Email address" - And I fill in "test_editor" for "Username" - And I fill in "dD.123123ddd" for "Password" - And I fill in "dD.123123ddd" for "Confirm password" - And I check the box "Editor" - And I press "Create new account" - And I wait - Then I should not see "The name test_editor is already taken." - - @init @tools @local @development @staging - Scenario: Create the test_content_admin user. - When I go to "/admin/people/create" - And I wait - And I fill in "content.admin.test@vardot.com" for "Email address" - And I fill in "test_content_admin" for "Username" - And I fill in "dD.123123ddd" for "Password" - And I fill in "dD.123123ddd" for "Confirm password" - And I check the box "Content Admin" - And I press "Create new account" - And I wait - Then I should not see "The name test_content_admin is already taken." - - @init @tools @local @development @staging - Scenario: Create the test_site_admin user. - When I go to "/admin/people/create" - And I wait - And I fill in "site.admin.test@vardot.com" for "Email address" - And I fill in "test_site_admin" for "Username" - And I fill in "dD.123123ddd" for "Password" - And I fill in "dD.123123ddd" for "Confirm password" - And I check the box "Site Admin" - And I press "Create new account" - And I wait - Then I should not see "The name test_site_admin is already taken." - - @init @tools @local @development @staging - Scenario: Create the test_super_admin user. - When I go to "/admin/people/create" - And I wait - And I fill in "super.admin.test@vardot.com" for "Email address" - And I fill in "test_super_admin" for "Username" - And I fill in "dD.123123ddd" for "Password" - And I fill in "dD.123123ddd" for "Confirm password" - And I check the box "Super Admin" - And I press "Create new account" - And I wait - Then I should not see "The name test_super_admin is already taken." diff --git a/tests/tools/users/delete-default-testing-users.feature b/tests/tools/users/delete-default-testing-users.feature deleted file mode 100644 index 73c9653acc5c268eb1a7f26496febea0cc7f4e02..0000000000000000000000000000000000000000 --- a/tests/tools/users/delete-default-testing-users.feature +++ /dev/null @@ -1,119 +0,0 @@ -Feature: Delete default testing users. - -# test_authenticated: { email: 'authenticated.test@vardot.com', password: 'dD.123123ddd' } -# test_editor: { email: 'editor.test@vardot.com', password: 'dD.123123ddd' } -# test_content_admin: { email: 'content.admin.test@vardot.com', password: 'dD.123123ddd' } -# test_site_admin: { email: 'site.admin.test@vardot.com', password: 'dD.123123ddd' } -# test_super_admin: { email: 'super.admin.test@vardot.com', password: 'dD.123123ddd' } - - Background: - Given I am a logged in user with the "webmaster" user - - @javascript @cleanup @tools @local @development @staging - Scenario: Delete the test_authenticated user. - When I go to "/admin/people" - And I wait - And I fill in "test_authenticated" for "Name or email contains" - And I press "Filter" - And I wait - Then I should see "test_authenticated" - When I click "test_authenticated" - And I wait - Then I should see "test_authenticated" - When I click "Edit" - And I wait - Then I should see "test_authenticated" - When I press "Confirm" - And I wait - Then I should see "Are you sure you want to cancel the account test_authenticated?" - When I select the radio button "Delete the account and its content. This action cannot be undone." - And I press "Confirm" - And I wait for the batch job to finish - Then I should see "test_authenticated has been deleted." - - @javascript @cleanup @tools @local @development @staging - Scenario: Delete the test_editor user. - When I go to "/admin/people" - And I wait - And I fill in "test_editor" for "Name or email contains" - And I press "Filter" - And I wait - Then I should see "test_editor" - When I click "test_editor" - And I wait - Then I should see "test_editor" - When I click "Edit" - And I wait - Then I should see "test_editor" - When I press "Confirm" - And I wait - Then I should see "Are you sure you want to cancel the account test_editor?" - When I select the radio button "Delete the account and its content. This action cannot be undone." - And I press "Confirm" - And I wait for the batch job to finish - Then I should see "test_editor has been deleted." - - @javascript @cleanup @tools @local @development @staging @production - Scenario: Delete the test_content_admin user. - When I go to "/admin/people" - And I fill in "test_content_admin" for "Name or email contains" - And I press "Filter" - And I wait - Then I should see "test_content_admin" - When I click "test_content_admin" - And I wait - Then I should see "test_content_admin" - When I click "Edit" - And I wait - Then I should see "test_content_admin" - When I press "Confirm" - And I wait - Then I should see "Are you sure you want to cancel the account test_content_admin?" - When I select the radio button "Delete the account and its content. This action cannot be undone." - And I press "Confirm" - And I wait for the batch job to finish - Then I should see "test_content_admin has been deleted." - - @javascript @cleanup @tools @local @development @staging @production - Scenario: Delete the test_site_admin user. - When I go to "/admin/people" - And I wait - And I fill in "test_site_admin" for "Name or email contains" - And I press "Filter" - And I wait - Then I should see "test_site_admin" - When I click "test_site_admin" - And I wait - Then I should see "test_site_admin" - When I click "Edit" - And I wait - Then I should see "test_site_admin" - When I press "Confirm" - And I wait - Then I should see "Are you sure you want to cancel the account test_site_admin?" - When I select the radio button "Delete the account and its content. This action cannot be undone." - And I press "Confirm" - And I wait for the batch job to finish - Then I should see "test_site_admin has been deleted." - - @javascript @cleanup @tools @local @development @staging @production - Scenario: Delete the test_super_admin user. - When I go to "/admin/people" - And I wait - And I fill in "test_super_admin" for "Name or email contains" - And I press "Filter" - And I wait - Then I should see "test_super_admin" - When I click "test_super_admin" - And I wait - Then I should see "test_super_admin" - When I click "Edit" - And I wait - Then I should see "test_super_admin" - When I press "Confirm" - And I wait - Then I should see "Are you sure you want to cancel the account test_super_admin?" - When I select the radio button "Delete the account and its content. This action cannot be undone." - And I press "Confirm" - And I wait for the batch job to finish - Then I should see "test_super_admin has been deleted."