mirror of
https://github.com/e107inc/e107.git
synced 2025-07-27 01:40:22 +02:00
Fixed bug: _reconfigure()'d modules forgot config
Apparently, reconfiguring only applies to one test. This commit makes all tests' modules reconfigured. Introduced command to clean local app repo InstallCest actually installs e107 now
This commit is contained in:
@@ -38,6 +38,11 @@ abstract class Base extends \Codeception\Module
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected function _callbackDeployerStarted()
|
protected function _callbackDeployerStarted()
|
||||||
|
{
|
||||||
|
return $this->_before();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function _before(\Codeception\TestCase $test = null)
|
||||||
{
|
{
|
||||||
foreach ($this->deployer_components as $component)
|
foreach ($this->deployer_components as $component)
|
||||||
{
|
{
|
||||||
|
@@ -12,6 +12,7 @@ abstract class E107Base extends Base
|
|||||||
public function _beforeSuite($settings = array())
|
public function _beforeSuite($settings = array())
|
||||||
{
|
{
|
||||||
parent::_beforeSuite($settings);
|
parent::_beforeSuite($settings);
|
||||||
|
$this->cleanVCS();
|
||||||
$this->writeLocalE107Config();
|
$this->writeLocalE107Config();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -19,6 +20,7 @@ abstract class E107Base extends Base
|
|||||||
{
|
{
|
||||||
parent::_afterSuite();
|
parent::_afterSuite();
|
||||||
$this->revokeLocalE107Config();
|
$this->revokeLocalE107Config();
|
||||||
|
$this->cleanVCS();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function writeLocalE107Config()
|
protected function writeLocalE107Config()
|
||||||
@@ -45,4 +47,12 @@ abstract class E107Base extends Base
|
|||||||
{
|
{
|
||||||
unlink(self::APP_PATH_E107_CONFIG);
|
unlink(self::APP_PATH_E107_CONFIG);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function cleanVCS()
|
||||||
|
{
|
||||||
|
$pwd = getcwd();
|
||||||
|
chdir(APP_PATH);
|
||||||
|
exec('git clean -fdx');
|
||||||
|
chdir($pwd);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -19,21 +19,21 @@ class InstallCest
|
|||||||
$I->see("Language Selection");
|
$I->see("Language Selection");
|
||||||
}
|
}
|
||||||
|
|
||||||
public function installStep1ToStep2(AcceptanceTester $I)
|
public function installRun(AcceptanceTester $I)
|
||||||
{
|
{
|
||||||
|
$I->wantTo("Install e107");
|
||||||
|
|
||||||
|
// Step 1
|
||||||
|
|
||||||
$I->amOnPage('/install.php');
|
$I->amOnPage('/install.php');
|
||||||
$I->wantTo("Verify Proceed to Step 2 of the Installation");
|
|
||||||
$I->selectOption("language", 'English');
|
$I->selectOption("language", 'English');
|
||||||
$I->click('start');
|
$I->click('start');
|
||||||
$I->see("MySQL Server Details", 'h3');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function installStep2ToStep3(AcceptanceTester $I)
|
// Step 2
|
||||||
{
|
|
||||||
$I->amOnPage('/install.php');
|
$I->see("MySQL Server Details", 'h3');
|
||||||
$I->wantTo("Verify Proceed to Step 3 of the Installation");
|
|
||||||
$db = $I->getHelperDb();
|
$db = $I->getHelperDb();
|
||||||
$this->installStep1ToStep2($I);
|
|
||||||
|
|
||||||
$I->fillField('server', $db->_getDbHostname());
|
$I->fillField('server', $db->_getDbHostname());
|
||||||
$I->fillField('name', $db->_getDbUsername());
|
$I->fillField('name', $db->_getDbUsername());
|
||||||
@@ -43,49 +43,32 @@ class InstallCest
|
|||||||
$I->uncheckOption('createdb');
|
$I->uncheckOption('createdb');
|
||||||
$I->click('submit');
|
$I->click('submit');
|
||||||
|
|
||||||
|
// Step 3
|
||||||
|
|
||||||
$I->see("MySQL Connection Verification", 'h3');
|
$I->see("MySQL Connection Verification", 'h3');
|
||||||
|
$I->see("Connection to the MySQL server established and verified");
|
||||||
// ....
|
|
||||||
}
|
|
||||||
|
|
||||||
public function installStep3ToStep4(AcceptanceTester $I)
|
|
||||||
{
|
|
||||||
|
|
||||||
$I->amOnPage('/install.php');
|
|
||||||
$I->wantTo("Verify Proceed to Step 4 of the Installation");
|
|
||||||
|
|
||||||
$this->installStep2ToStep3($I);
|
|
||||||
|
|
||||||
// $I->see("Connection to the MySQL server established and verified");
|
|
||||||
$I->see("Found existing database");
|
$I->see("Found existing database");
|
||||||
|
|
||||||
$I->click('submit');
|
$I->click('submit');
|
||||||
|
|
||||||
|
// Step 4
|
||||||
|
|
||||||
$I->see("PHP and MySQL Versions Check / File Permissions Check");
|
$I->see("PHP and MySQL Versions Check / File Permissions Check");
|
||||||
|
|
||||||
}
|
try
|
||||||
|
{
|
||||||
public function installStep4ToStep5(AcceptanceTester $I) // TODO Fails due to e107_config.php being present.
|
$I->see('You might have an existing installation'); //XXX Triggered if e107_config.php is not empty
|
||||||
{
|
}
|
||||||
|
catch (Exception $e)
|
||||||
$I->amOnPage('/install.php');
|
{
|
||||||
$I->wantTo("Verify Proceed to Step 5 of the Installation");
|
$I->dontSee('You might have an existing installation');
|
||||||
|
}
|
||||||
$this->installStep3ToStep4($I);
|
|
||||||
|
|
||||||
$I->canSee('You might have an existing installation'); //XXX Triggered if e107_config.php is not empty
|
|
||||||
|
|
||||||
$I->click('continue_install');
|
$I->click('continue_install');
|
||||||
|
|
||||||
|
// Step 5
|
||||||
|
|
||||||
$I->see("Administration", 'h3');
|
$I->see("Administration", 'h3');
|
||||||
}
|
|
||||||
|
|
||||||
public function installStep5ToStep6(AcceptanceTester $I)
|
|
||||||
{
|
|
||||||
|
|
||||||
$I->amOnPage('/install.php');
|
|
||||||
$I->wantTo("Verify Proceed to Step 6 of the Installation");
|
|
||||||
$this->installStep4ToStep5($I);
|
|
||||||
|
|
||||||
$I->fillField('u_name', 'admin');
|
$I->fillField('u_name', 'admin');
|
||||||
$I->fillField('d_name', 'admin');
|
$I->fillField('d_name', 'admin');
|
||||||
@@ -95,34 +78,21 @@ class InstallCest
|
|||||||
|
|
||||||
$I->click('submit');
|
$I->click('submit');
|
||||||
|
|
||||||
|
// Step 6
|
||||||
|
|
||||||
$I->see("Website Preferences", 'h3');
|
$I->see("Website Preferences", 'h3');
|
||||||
}
|
|
||||||
|
|
||||||
public function installStep6ToStep7(AcceptanceTester $I)
|
|
||||||
{
|
|
||||||
|
|
||||||
$I->amOnPage('/install.php');
|
|
||||||
$I->wantTo("Verify Proceed to Step 7 of the Installation");
|
|
||||||
$this->installStep5ToStep6($I);
|
|
||||||
|
|
||||||
$I->fillField('sitename', 'Test Site');
|
$I->fillField('sitename', 'Test Site');
|
||||||
|
|
||||||
$I->click('submit');
|
$I->click('submit');
|
||||||
|
|
||||||
$I->see("Install Confirmation", 'h3');
|
// Step 7
|
||||||
}
|
|
||||||
|
|
||||||
public function installStep7ToStep8(AcceptanceTester $I)
|
|
||||||
{
|
|
||||||
|
|
||||||
$I->amOnPage('/install.php');
|
|
||||||
$I->wantTo("Verify Proceed to Step 8 of the Installation");
|
|
||||||
$this->installStep6ToStep7($I);
|
|
||||||
|
|
||||||
$I->see("Install Confirmation", 'h3');
|
$I->see("Install Confirmation", 'h3');
|
||||||
|
|
||||||
$I->click('submit');
|
$I->click('submit');
|
||||||
|
|
||||||
$I->see("Install Confirmation", 'h3');
|
// Step 8
|
||||||
|
|
||||||
|
$I->see("Installation Complete", 'h3');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user