CI: Fix Behat feature for installation

pull/4575/head
Angel Fernando Quiroz Campos 3 years ago
parent 8b4070127d
commit 956fe873f6
  1. 17
      tests/behat/features/actionInstall.feature
  2. 11
      tests/behat/features/bootstrap/FeatureContext.php

@ -3,22 +3,23 @@ Feature: Install portal
Scenario: Installation process Scenario: Installation process
Given I am on "/main/install/index.php" Given I am on "/main/install/index.php"
Then I should see "Step1 Installation Language" Then I should see "Step 1 - Installation Language"
Then I press "Next" Then I press "Next"
Then I should see "Step2 Requirements" Then I should see "Step 2 - Requirements"
Then I press "New installation" Then I press "New installation"
Then I should see "Step3 Licence" Then I should see "Step 3 - Licence"
Then I check the "accept_licence" radio button Then I click the ".field-checkbox > label" element
Then I press "license-next" Then I press "license-next"
Then I should see "Step4 Database settings" Then I should see "Step 4 - Database settings"
Then I fill in the following: Then I fill in the following:
| dbUsernameForm | root | | dbUsernameForm | root |
| dbPassForm | root | | dbPassForm | root |
| dbNameForm | master | | dbNameForm | master |
Then I press "step3" Then I press "step3"
Then I should see "Database driver: pdo_mysql" Then I should see "Database driver"
Then I should see "pdo_mysql"
Then I press "step4" Then I press "step4"
Then I should see "Step5" Then I should see "Step 5"
Then I fill in the following: Then I fill in the following:
| passForm | admin | | passForm | admin |
| emailForm | admin@example.com | | emailForm | admin@example.com |
@ -29,6 +30,6 @@ Feature: Install portal
Then wait the page to be loaded when ready Then wait the page to be loaded when ready
Then wait the page to be loaded when ready Then wait the page to be loaded when ready
Then wait the page to be loaded when ready Then wait the page to be loaded when ready
Then I should see "Step7" Then I should see "Step 7"
Then I should see "Go to your newly created portal" Then I should see "Go to your newly created portal"

@ -682,4 +682,15 @@ class FeatureContext extends MinkContext
$i++; $i++;
} }
} }
/**
* @Then I click the :selector element
*/
public function iClickTheElement($selector)
{
$page = $this->getSession()->getPage();
$element = $page->find('css', $selector);
$element->click();
}
} }

Loading…
Cancel
Save