Tests commands in Rubo.

This commit is contained in:
marco
2015-07-17 23:32:35 +02:00
parent bae0dcba5b
commit b4e4cdd1b3
2 changed files with 27 additions and 4 deletions

View File

@ -3,4 +3,26 @@ class RoboFile extends \Robo\Tasks {
function 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');
}
}

View File

@ -4,22 +4,23 @@ use \AcceptanceTester;
class ActivationCest {
public function _before(AcceptanceTester $I) {
$I->amOnPage('/wp-admin');
$I->amOnPage('/wp-login.php');
$I->fillField('Username', 'admin');
$I->fillField('Password', 'password');
$I->click('Log In');
$I->amOnPage('/wp-admin/plugins.php');
}
public function i_can_activate(AcceptanceTester $I) {
$I->amOnPage('/wp-admin/plugins.php');
$I->see('MailPoet');
$I->click('#mailpoet .activate a');
$I->see('Plugin Activated');
}
public function _after(AcceptanceTester $I) {
$I->see('MailPoet');
$I->click('#mailpoet .deactivate a');
$I->see('Plugin deactivated');
}
public function _after(AcceptanceTester $I) {
}
}