Tests commands in Rubo.
This commit is contained in:
22
RoboFile.php
22
RoboFile.php
@ -3,4 +3,26 @@ class RoboFile extends \Robo\Tasks {
|
|||||||
function update() {
|
function update() {
|
||||||
$this->_exec('./composer.phar update');
|
$this->_exec('./composer.phar update');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function testUnit() {
|
||||||
|
$this->_exec('vendor/bin/codecept run unit');
|
||||||
|
}
|
||||||
|
|
||||||
|
function testAcceptance() {
|
||||||
|
$this
|
||||||
|
->taskExec('phantomjs --webdriver=4444')
|
||||||
|
->background()
|
||||||
|
->run();
|
||||||
|
sleep(2);
|
||||||
|
$this->_exec('vendor/bin/codecept run acceptance');
|
||||||
|
}
|
||||||
|
|
||||||
|
function testAll() {
|
||||||
|
$this
|
||||||
|
->taskExec('phantomjs --webdriver=4444')
|
||||||
|
->background()
|
||||||
|
->run();
|
||||||
|
sleep(2);
|
||||||
|
$this->_exec('vendor/bin/codecept run');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,22 +4,23 @@ use \AcceptanceTester;
|
|||||||
class ActivationCest {
|
class ActivationCest {
|
||||||
|
|
||||||
public function _before(AcceptanceTester $I) {
|
public function _before(AcceptanceTester $I) {
|
||||||
$I->amOnPage('/wp-admin');
|
$I->amOnPage('/wp-login.php');
|
||||||
$I->fillField('Username', 'admin');
|
$I->fillField('Username', 'admin');
|
||||||
$I->fillField('Password', 'password');
|
$I->fillField('Password', 'password');
|
||||||
$I->click('Log In');
|
$I->click('Log In');
|
||||||
$I->amOnPage('/wp-admin/plugins.php');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function i_can_activate(AcceptanceTester $I) {
|
public function i_can_activate(AcceptanceTester $I) {
|
||||||
|
$I->amOnPage('/wp-admin/plugins.php');
|
||||||
$I->see('MailPoet');
|
$I->see('MailPoet');
|
||||||
$I->click('#mailpoet .activate a');
|
$I->click('#mailpoet .activate a');
|
||||||
$I->see('Plugin Activated');
|
$I->see('Plugin Activated');
|
||||||
}
|
|
||||||
|
|
||||||
public function _after(AcceptanceTester $I) {
|
|
||||||
$I->see('MailPoet');
|
$I->see('MailPoet');
|
||||||
$I->click('#mailpoet .deactivate a');
|
$I->click('#mailpoet .deactivate a');
|
||||||
$I->see('Plugin deactivated');
|
$I->see('Plugin deactivated');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function _after(AcceptanceTester $I) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user