joomla-projects / joomla-browser
joomla-browser Codeception Module
Installs: 307 003
Dependents: 2
Suggesters: 0
Security: 0
Stars: 19
Watchers: 17
Forks: 35
Open Issues: 2
Requires
- php: >=7.2.0
- codeception/codeception: ~4.1
- codeception/module-webdriver: ^1.0
Requires (Dev)
- joomla/coding-standards: ~3.0@dev
- squizlabs/php_codesniffer: ~3.0
- dev-4.x-dev
- v4.0.0
- v3.9.1
- v3.9.0
- v3.8.11
- v3.8.10
- v3.8.7
- v3.8.6
- v3.8.2
- v3.8.1
- v3.8.0.3
- v3.8.0.2
- v3.8.0.1
- v3.8.0
- v3.7.5
- v3.7.4.1-rc2
- v3.7.4.1-rc
- v3.7.4
- 3.7.3
- v3.6.5.2
- v3.6.5.1
- v3.6.5
- v3.6.4
- v3.6.0.1
- v3.6.0
- v3.5.1.1
- v3.5.1.0
- v3.4.8.4
- v3.4.8.3
- v3.4.8.2
- v3.4.8.1
- v3.4.8.0
- v1.2
- v1.1.7
- v1.1.6
- v1.1.5
- v1.1.4
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1
- v1.0
- dev-dependabot/composer/guzzlehttp/psr7-2.5.0
- dev-3.x-dev
This package is auto-updated.
Last update: 2024-12-19 23:46:44 UTC
README
Table of Contents
The Joomla Browser
Joomla Browser is a Codeception.com Module. It allows to build system tests
for a Joomla site much faster providing a set of predefined tasks.
In between the available functions you can find:
- INSTALLATION:
- install joomla
- install Joomla removing Installation Folder
- install Joomla Multilingual Site
- ADMINISTRATOR:
- do administrator login
- do administrator logout
- set error reporting to development
- search for item
- check for item existence
- publish a module
- setting a module position and publishing it
- EXTENSION MANAGER
- install extension from Folder
- install extension from url
- enable plugin
- uninstall extension
- search result plugin name
- FRONTEND:
- do frontend login
- ADMINISTRATOR USER INTERFACE:
- select option in chosen
- select Option In Radio Field
- select Multiple Options In Chosen
- OTHERS:
- check for php notices or warnings
The Joomla Browser is constantly evolving and more methods are being added every month. To find a full list of them check the public methods at: https://github.com/joomla-projects/joomla-browser/blob/develop/src/JoomlaBrowser.php
Joomla Browser in action
If you want to see a working example of JoomlaBrowser check weblinks tests: https://github.com/joomla-extensions/weblinks#tests
Using Instructions
Update Composer.json file in your project, and download
Download
composer require joomla-projects/joomla-browser:dev-develop
Loading the Module in Codeception
Finally make the following changes in Acceptance.suite.yml to add JoomlaBrowser as a Module.
Your original acceptance.suite.yml
probably looks like:
modules: enabled: - WebDriver - AcceptanceHelper config: WebDriver: url: 'http://localhost/joomla-cms3/' # the url that points to the joomla cms browser: 'firefox' window_size: 1024x768 capabilities: unexpectedAlertBehaviour: 'accept' AcceptanceHelper: ...
You should remove the WebDriver module and replace it with the JoomlaBrowser module:
config: JoomlaBrowser: url: 'http://localhost/joomla-cms/' # the url that points to the joomla installation at /tests/system/joomla-cms browser: 'firefox' window_size: 1024x768 capabilities: unexpectedAlertBehaviour: 'accept' username: 'admin' password: 'admin' database host: 'localhost' # place where the Application is Hosted #server Address database user: 'root' # MySQL Server user ID, usually root database password: '1234' # MySQL Server password, usually empty or root database name: 'dbname' # DB Name, at the Server database type: 'mysqli' # type in lowercase one of the options: MySQL\MySQLi\PDO database prefix: 'jos_' # DB Prefix for tables install sample data: 'Yes' # Do you want to Download the Sample Data Along with Joomla Installation, then keep it Yes sample data: 'Default English (GB) Sample Data' # Default Sample Data admin email: 'admin@mydomain.com' # email Id of the Admin language: 'English (United Kingdom)' # Language in which you want the Application to be Installed joomla folder: '/home/.../path to Joomla Folder' # Path to Joomla installation where we execute the tests AcceptanceHelper: ...
Code Style Checker
To check automatically the code style execute the following commands in your Terminal window at the root of the repository:
$ composer install
$ vendor/bin/phpcs --extensions=php -p --standard=vendor/joomla/coding-standards/Joomla src