32
1
mirror of https://github.com/joomla-extensions/weblinks.git synced 2024-12-26 01:57:30 +00:00
This repo is meant to hold the decoupled com_weblinks component and related code.
Go to file
javier gomez 41cebd1b24 Add sleep time to allow fluxbox and Xvfb launch on Drone.io (#263)
* pipe the output of fluxbox to /dev/null like we do with xvfb
2016-08-24 19:43:45 +02:00
.drone Drone.io integration for Weblinks (#260) 2016-08-24 19:17:27 +02:00
.github Updated the contribution / release guide from Phing to JoRobo (#224) 2016-07-04 22:56:22 +01:00
docs Integrated robo build system - clean merge of #125 2015-11-02 10:55:42 +01:00
src Merge pull request #228 from chrisdavenport/showon-groupby 2016-08-15 08:14:59 +02:00
tests Drone.io integration for Weblinks (#260) 2016-08-24 19:17:27 +02:00
.drone.yml Add sleep time to allow fluxbox and Xvfb launch on Drone.io (#263) 2016-08-24 19:43:45 +02:00
.gitignore [tests] rename jbuild to jorobo 2016-02-01 13:36:56 +01:00
.travis.yml Forcing 127.0.0.1 for /etc/hosts in travis 2016-08-15 13:52:01 +02:00
codeception.yml [tests] Added integration tests and moved to codeception 2.1 2015-09-30 19:30:10 +02:00
composer.json Updated selenium-server-standalone to v2.53.1 2016-07-04 20:17:33 +02:00
composer.lock Updated selenium-server-standalone to v2.53.1 2016-07-04 20:17:33 +02:00
jorobo.dist.ini Updated jorobo.dist.ini for JoRobo version 0.4 (#225) 2016-06-26 20:48:32 +01:00
LICENSE Initial decoupling of Weblinks 2014-04-08 22:32:59 +10:00
manifest.xml Changing collation to utf8mb4 (#226) 2016-07-27 20:37:46 +01:00
README.md Add patchtester description to README.md 2016-08-05 13:17:35 +02:00
RoboFile.dist.ini Option to chown local user 2015-10-30 15:56:05 +01:00
RoboFile.php Fix if 'git' instead of 'git.exe' as command is used on windows (#168) 2016-06-25 21:44:10 +01:00

Weblinks for Joomla! Build Status

This repo is meant to hold the decoupled com_weblinks component and related code.

How to test a PR with the Patch Tester Component

Easily apply changes from a pull requests against this repo: Install the last release of com_weblinks into your Joomla. Install the last release of com_patchtester into your Joomla (weblinks is supported since Version 3.0.0 Alpha 2). Log into your site's administrator section, go to the Patch Tester Component Options (Components -> Patch Tester -> Options) Switch the GitHub Repository to Joomla Weblinks Package Click Save & Close and hit the Fetch Data Button to the the lastest pull requests Click Apply Patch to apply the proposed changes from the pull request. Click Revert Patch to revert an applied patch.

You can read more about the Patch Tester extension on the Joomla! Documentation Wiki.

Building

$ composer install
$ vendor/bin/robo build

Tests

The tests in Weblinks Extension use Codeception Testing Framework, if you want to know more about the technology used for testing please check: Testing Joomla Extensions with Codeception.

To prepare the system tests (Selenium) to be run in your local machine you are asked to rename the file tests/acceptance.suite.dist.yml to tests/acceptance.suite.yml. Afterwards, please edit the file according to your system needs.

Optional: extra configuration for RoboFile

This is not required, and if in doubt you can just skip this section, but there may be some specific use cases when you need (or want) to override the default behaviour of RoboFile.php. To do this, copy RoboFile.dist.ini to RoboFile.ini and add options in INI format, one per line, e.g.

skipClone = true
cmsPath = tests/joomla-cms3

The currently available options are as follows:

  • skipClone: set to true to avoid the cms repo being deleted and re-cloned at each test execution. Useful to save time and bandwidth while you're debugging your test environment. But please be aware that if you don't refresh the repo you'll have to manually check the installation folder is present and the configuration.php is not.
  • cmsPath: set to the local path (absolute or relative) where you'd like the test website to be installed. Default is tests/joomla-cms3.
  • branch: set to whatever existing branch from the joomla-cms project if you want to clone that specific branch. Default is staging.

Run the tests

To run the tests please execute the following commands (for the moment only working in Linux and MacOS, for more information see: https://docs.joomla.org/Testing_Joomla_Extensions_with_Codeception):

$ composer install
$ vendor/bin/robo
$ vendor/bin/robo run:tests

Additional options

You can run the tests against different resolutions. The default acceptance YAML configuration file provides three options:

  • "desktop": default, 1024x768px
  • "tablet": tablet in portrait mode, 768x1024px
  • "phone": phone in portrait mode, 480x640px

To set a specific resolution, set is as an option of the command:

$ vendor/bin/robo run:tests --env=tablet

Note: the first parameter is used by Travis and you should always set it to "0" when you run your tests locally.

##For Windows:

You need to install:

Note: For commands line is better if you use the 'Git shell' program.

First you should create a fork of the official repository and clone the fork into your web server folder.

To prepare the system tests (Selenium) to be run in your local machine you are asked to rename the file tests/acceptance.suite.dist.yml to tests/acceptance.suite.yml. Afterwards, please edit the file according to your system needs.

The next step is only required if you don't place the weblinks folder into your web server folder. Create a symbolic link from your tests\joomla-cms3 to a subfolder of your web server. For example:

mklink /J C:\wamp\www\tests\joomla-cms3 C:\Users\Name\Documents\GitHub\weblinks\tests\joomla-cms3

Open the console and go in the folder of weblinks, for example:

cd C:\wamp\www\weblinks

Then run the command:

$ composer install

You can then run the following command to start the tests:

$ vendor/bin/robo run:tests

Once all tests were executed, you may also run a specific test:

$ vendor/bin/robo run:test // Then select the test you want to run!