Install chamilo using behat

pull/3064/head
Julio 5 years ago
parent 05bca52605
commit 3aceeda3b2
  1. 19
      .travis.yml
  2. 29
      tests/behat/features/actionInstall.feature
  3. 2
      tests/behat/features/bootstrap/FeatureContext.php
  4. 0
      tests/behat/features/companyReports.feature

@ -64,34 +64,20 @@ before_install:
- php -ini | grep memory_limit
- sudo cat /etc/hosts
# Install Chash, a database, and then install Chamilo
- git clone https://github.com/chamilo/chash
- cd chash
- git log -1 # check chash version
- composer install
#- php -d phar.readonly=0 createPhar.php
#- chmod +x chash.phar
#- sudo mv chash.phar /usr/local/bin/chash
# Download chamilo
- php -d date.timezone="Europe/Paris" $TRAVIS_BUILD_DIR/chash/bin/console chash:chamilo_install $CHAMILO_VERSION $TRAVIS_BUILD_DIR --download-package --no-interaction --only-download-package
- cd $TRAVIS_BUILD_DIR
- pwd
# Install vendors
- travis_wait 45 composer update
- composer analyse
# Install chamilo
- php -d date.timezone="Europe/Paris" $TRAVIS_BUILD_DIR/chash/bin/console chash:chamilo_install $CHAMILO_VERSION $TRAVIS_BUILD_DIR --no-interaction --sitename="Chamilo" --site_url="http://$VHOST_URL/" --institution="Chamilo" --institution_url="https://chamilo.org" --encrypt_method="sha1" --firstname="John" --lastname="Doe" --language="english" --driver="pdo_mysql" --host="localhost" --port="3306" --dbname="chamilo" --dbuser="root" --permissions_for_new_directories="0777" --permissions_for_new_files="0666" --linux-user="www-data" --linux-group="www-data" --username="admin" --password="admin" --email="admin@example.com" --phone="555-5555"
- composer install --prefer-source --no-interaction --dev
# Install bundle js/css
- php bin/console assets:install
# Permissions
- sudo chmod -R 777 var public
- composer analyse
# Dump js routes
- php bin/console fos:js-routing:dump --format=json --target=public/js/fos_js_routes.json
- # Install third party js/css libraries
- yarn install
- ./node_modules/.bin/encore dev
# Check chamilo status
- php -d date.timezone="Europe/Paris" $TRAVIS_BUILD_DIR/chash/bin/console chash:chamilo_status
# Permissions
- sudo chown -R www-data:www-data $TRAVIS_BUILD_DIR
- sudo chown -R 775 $TRAVIS_BUILD_DIR
@ -108,6 +94,7 @@ script:
- cd tests/behat
- pwd
# - travis_wait 45 ../../vendor/behat/behat/bin/behat -v
- ../../vendor/behat/behat/bin/behat features/actioninstall.feature
- ../../vendor/behat/behat/bin/behat features/adminFillUsers.feature
- ../../vendor/behat/behat/bin/behat features/course.feature
- ../../vendor/behat/behat/bin/behat features/createUser.feature

@ -0,0 +1,29 @@
@administration
Feature: Install portal
Scenario: See the company reports link on the admin page
Given I am on "/main/install"
Then I should see "Step1 Installation Language"
Then I press "Next"
Then I should see "Step2 Requirements"
Then I press "New installation"
Then I should see "Step3 Licence"
Then I check the "accept_licence" radio button
Then I press "license-next"
Then I should see "Step4 Database settings"
Then I fill in the following:
| dbUsernameForm | root |
| dbPassForm | root |
| dbNameForm | master |
Then I press "step3"
Then I should see "Database driver: pdo_mysql"
Then I press "step4"
Then I should see "Step5 ConfigurationSettings"
Then I fill in the following:
| passForm | admin |
Then I press "step5"
Then I should see "Last check before install"
Then I press "Install chamilo"
Then wait for the page to be loaded
Then I should see "Installation process execution"

@ -280,8 +280,6 @@ class FeatureContext extends MinkContext
{
// Just in case wait that ckeditor is loaded
$this->getSession()->wait(2000);
$this->getSession()->executeScript(
"
var textarea = $('textarea');

Loading…
Cancel
Save