Closed (outdated)
Project:
Behat UI
Version:
4.0.0
Component:
Documentation
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
14 Jul 2022 at 19:23 UTC
Updated:
24 Aug 2024 at 16:18 UTC
Jump to comment: Most recent
When installing, command line scenarios run successfully using Acquia BLT (blt tests:behat:run). When navigating to UI page, Javascript needed to view "Available steps" does not show, just a gray bar on the right side. The available feature tests populate from the features directory but don't actually run.
| Comment | File | Size | Author |
|---|---|---|---|
| Screen Shot 2022-07-14 at 10.16.13 AM.png | 177.67 KB | fsayoub | |
| Screen Shot 2022-07-14 at 3.20.49 PM.png | 50.09 KB | fsayoub | |
| Screen Shot 2022-07-14 at 3.19.44 PM.png | 100.43 KB | fsayoub |
Comments
Comment #2
rajab natshahComment #3
rajab natshahThank you, Farah for reporting.
✅ Released behat_ui-4.0.2
You can follow the following steps using:
Web Interactive Command to setup Behat UI for your Drupal project
Create your testing folder
mkdir /var/www/html/testChange the directory to the testing folder
cd /var/www/html/testCreate a Drupal project using the drupal recommended project.
composer create-project drupal/recommended-project:~9.0 drupal9test1Change the directory to the project folder
cd /var/www/html/test/drupal9test1Change file mode for all files and folders
sudo chmod 775 -R .Change the ownership of the files in the project
sudo chown www-data:$USER -R .Vardot Commands to setup Behat UI module for projects
It is a Web Interactive Command to setup Behat UI for any Drupal site.
https://github.com/Vardot/cmd/tree/main/behat_ui
Change the mode and ownership for files again
Change the directory to the web root folder in the project
cd /var/www/html/test/drupal9test1/webRun a drush site install command to install the standard profile for the Drupal site. or head to the browser and install the site
Change the mode and ownership for files
Clear the cache
../vendor/drush/drush/drush crInstall Behat UI
../vendor/drush/drush/drush en behat_uiI planned to record a video on the listed steps. Documentation is much needed for better ease of use too.
Comment #4
rajab natshahPublished a video to follow at the following link:
https://www.youtube.com/watch?v=aLiZ9ecuSKU
Comment #5
fsayoub commentedAwesome! Thank you so much, Rajab!! That definitely helps. I'm trying to incorporate into an existing site, and use it with Acquia Pipelines, as part of the build process (which is working as intended from the command line,) but will try to reconfigure using your steps above. Thank you again!
Comment #6
rajab natshahPlanned to:
It would be nice to add that to the Behat UI Project description
Managed to change the Web Command to work for distributions like Varbase and other hosting services like Platform.sh
Comment #7
rajab natshahComment #8
fsayoub commented@Rajab Does the Drupal path need to be `web`, as it mentions in the source code? Our "web" is labeled "docroot" and I'm wondering if this is my problem. When running the bash command, I'm getting this as a final warning:
cp: directory web/modules/contrib/behat_ui/config/install does not exist.Comment #9
rajab natshahFor sure you can change that to
"docroot"or"public_html"We could manage an argument in the automated bash command to allow to change that from the interactive web command
For now, change that manually in the
behat.ymlfile and Behat UI settingsComment #10
fsayoub commented@Rajab does the module require Selenium? Acquia documentation provides that "Acquia Pipelines doesn’t support Selenium (due to Java not being installed). Therefore, you must run the tests using headless Chrome in Pipelines."
Comment #11
pierregermain commentedHow does one run selenium in localhost ?
For now I was not able to run selenium in local so I disabled it in behat.yml and removed the @javascript tags in the features. This makes nearly work the module out of the box. Thank you for module.
Comment #12
rajab natshahThanks, Pierre for asking
Doing that in the Varbase distribution
Varbase Automated Functional Testing
https://github.com/Vardot/varbase/tree/9.0.x/tests
Vardot Commands to setup Behat UI module for projects
https://github.com/Vardot/cmd/tree/main/behat_ui
The command will configure the project with the varbase_behat_ui template.
This is a template
"behat.yml"and"features"testing folder to work with Behat and Behat UI on the Varbase system.Please, follow with the following link for a normal Drupal standard profile
Setup Behat UI module and configs for Local Drupal projects
Comment #13
pierregermain commentedThanks Rajab,
I am not using the varbase distribution, but it has really a lot of documentation: In my case I was able to run Selenium doing what is explained at https://github.com/Vardot/varbase/tree/9.0.x/tests#install-java
For now my Behat.yml look like this for the Selenium part
Thanks for the information. It was really helpfull.
Comment #14
rajab natshah