<?php //tests\acceptance\001_AdminDashboardCept.php use Step\Acceptance\Admin as AdminTester; $I = new AdminTester($scenario); $I->wantTo('Test admin dashboard'); $I->loginAsAdmin(); $I->see("Signed in as admin"); $I->click("Dashboard"); $I->see("E-mail from search form"); $count = $I->grabTextFrom("#oppSearchFormAll"); $I->assertEquals(trim($count), 0, 'E-mails not equal 0'); $I->wantTo('Check opportunity e-mail function'); $I->amOnPage('/search'); $I->see("Opportunity search criteria"); $I->click('Search'); $I->see("E-mail Glenshire Marmot Fund"); $I->click('E-mail Glenshire Marmot Fund'); $I->waitForJS("return \$.active == 0;", 3); $I->see("Message"); $I->click('Send'); $I->waitForJS("return \$.active == 0;", 3); $I->see("Message is required"); $I->fillField("#opp_email_from", "*****@*****.**"); $I->fillField("#opp_email_message", "I wuv U"); $I->click('Send'); $I->waitForJS("return \$.active == 0;", 3); $I->see("Email sent"); $I->wantTo('Test admin dashboard'); $I->loginAsAdmin(); $I->see("Signed in as admin");
<?php //tests\acceptance\004_AdminSelectAllCept.php use Step\Acceptance\Admin as AdminTester; $I = new AdminTester($scenario); $I->wantTo('Test select all function'); $I->loginAsAdmin(); $I->click("E-mail volunteers"); $I->see("Select/unselect all"); $I->click("#vol_email_selectAll"); $I->seeCheckboxIsChecked('vol_email[send][]');
<?php use Step\Acceptance\Admin as AdminTester; $I = new AdminTester($scenario); $I->am('admin'); // actor's role $I->wantTo('login to website'); // feature to test $I->lookForwardTo('access all website features'); // result to achieve $I->loginAsAdmin(); $I->see('Advanced Admin');