本文整理汇总了PHP中AcceptanceTester::amOnPage方法的典型用法代码示例。如果您正苦于以下问题:PHP AcceptanceTester::amOnPage方法的具体用法?PHP AcceptanceTester::amOnPage怎么用?PHP AcceptanceTester::amOnPage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AcceptanceTester
的用法示例。
在下文中一共展示了AcceptanceTester::amOnPage方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createExpense
public function createExpense(AcceptanceTester $I)
{
$I->wantTo('Create an expense');
$vendorName = $this->faker->name;
$clientEmail = $this->faker->safeEmail;
$amount = $this->faker->numberBetween(10, 20);
// create vendor
$I->amOnPage('/vendors/create');
$I->fillField(['name' => 'name'], $vendorName);
$I->click('Save');
$I->see($vendorName);
$vendorId = $I->grabFromDatabase('vendors', 'id', ['name' => $vendorName]);
// create client
$I->amOnPage('/clients/create');
$I->fillField(['name' => 'contacts[0][email]'], $clientEmail);
$I->click('Save');
$I->see($clientEmail);
// create expense
$I->amOnPage('/expenses/create');
$I->fillField(['name' => 'amount'], $amount);
$I->selectDropdown($I, $vendorName, '.vendor-select .dropdown-toggle');
$I->selectDropdown($I, $clientEmail, '.client-select .dropdown-toggle');
$I->click('Save');
$I->seeInDatabase('expenses', ['vendor_id' => $vendorId]);
// invoice expense
$I->executeJS('submitAction(\'invoice\')');
$I->click('Save');
$I->wait(1);
$I->see($clientEmail);
$I->see($amount);
}
示例2: _grabLinks
public function _grabLinks(AcceptanceTester $I)
{
$dragonsListUrl = "/wiki/Category:Dragons";
$I->amOnPage($dragonsListUrl);
$pages = 14;
for ($i = 1; $i <= $pages; $i++) {
$link = "/wiki/Category:Dragons?page={$i}";
$I->amOnPage($link);
$this->_grabLinksFromOnePage($I);
}
file_put_contents('dragons.json', json_encode($this->dragons, JSON_PRETTY_PRINT));
}
示例3: startAConversation
/**
* @param AcceptanceTester $I
*/
public function startAConversation(AcceptanceTester $I)
{
$I->wantToTest('if I can start a conversation');
$I->amOnPage('/messages');
$I->click('#startConversation');
$I->see('Send a message');
}
示例4: testIfICantCreateAnEventWithoutBeingAuthenticated
public function testIfICantCreateAnEventWithoutBeingAuthenticated(AcceptanceTester $I)
{
$I->am('guest');
$I->wantTo('see that i can\'t create an event');
$I->amOnPage('event/create');
$I->canSee('have to be logged in', '.alert-danger');
}
示例5: viewHomepage
public function viewHomepage(AcceptanceTester $I)
{
$I->wantTo('view the homepage');
$I->amOnPage('/');
$I->see('Zen Kommerce');
//$I->dontSeeHttpHeader('Set-Cookie');
}
示例6: testShowAction
public function testShowAction(AcceptanceTester $I)
{
$I->wantTo('too see inside the dashboard area');
$I->amOnPage('/dashboard');
$I->see('a placeholder for dashboard');
$I->wait(3);
}
示例7: loginSuccess
function loginSuccess(AcceptanceTester $I, \Page\Login $loginPage)
{
$loginPage->login('cadence_watch@yahoo.com', '123456');
$I->amOnPage('/customer/account/index/');
$I->see('Hello, alex sereda!', 'p.hello > strong');
$loginPage->logout();
}
示例8: formManagerOpensNewForm
/**
* Tests that form manager opens on the new form page
*
* @since 7.0
* @param \GLM\Tests\Acceptance\AcceptanceTester $I The current actor.
*/
public function formManagerOpensNewForm(AcceptanceTester $I)
{
$I->wantTo('Ensure the form manager opens in the new form page');
$I->amOnPage(admin_url('post-new.php?post_type=ccf_form'));
$I->click('Manage Form');
$I->see('Click on a field to edit it');
}
示例9: _before
public function _before(\AcceptanceTester $I)
{
$I->am('guest user');
$I->amGoingTo('Load the homepage');
$I->amOnPage('/');
$I->seeInCurrentUrl('/');
}
示例10: ClearAllCach
/**
* Clear cache work only at admin panel
* @param AcceptanceTester $I Controller
*/
public static function ClearAllCach($I)
{
$I->amOnPage('/admin');
$I->click(NavigationBarPage::$System);
$I->click(NavigationBarPage::$SystemClearAllCach);
$I->wait(3);
}
示例11: loginWithInvalidCredentials
public function loginWithInvalidCredentials(AcceptanceTester $I)
{
$I->amOnPage('/login');
$I->click('Login');
$I->seeCurrentUrlEquals('/login');
$I->see('Invalid Credentials', '.flash');
}
示例12: updateInvoiceDesign
public function updateInvoiceDesign(AcceptanceTester $I)
{
$I->wantTo('Design my invoice');
$I->amOnPage('/settings/invoice_design');
$I->click('select#invoice_design_id');
$I->click('select#invoice_design_id option:nth-child(2)');
$I->fillField('#font_size', 10);
$I->click('#primary_color + .sp-replacer');
$I->executeJS('$("#primary_color").val("#7364b6")');
$I->executeJS('$(".sp-container:nth-child(1) .sp-choose").click()');
$I->click('#secondary_color + .sp-replacer');
$I->executeJS('$("#secondary_color").val("#aa6709")');
$I->executeJS('$(".sp-container:nth-child(2) .sp-choose").click()');
/*
$I->fillField(['name' => 'labels_item'], $this->faker->text(6));
$I->fillField(['name' => 'labels_description'], $this->faker->text(12));
$I->fillField(['name' => 'labels_unit_cost'], $this->faker->text(12));
$I->fillField(['name' => 'labels_quantity'], $this->faker->text(8));
$I->uncheckOption('#hide_quantity');
$I->checkOption('#hide_paid_to_date');
*/
$I->click('Save');
$I->wait(3);
$I->seeInDatabase('accounts', ['font_size' => 10]);
}
示例13: testOnePageCheckout
/**
* Tests One Page Checkout
*
* @group checkout
*
* @param $I \AcceptanceTester
*
* @depends testAddProductToCart
*/
public function testOnePageCheckout(AT $I)
{
$I->am('Guest Customer');
$I->wantTo('use One Page Checkout');
$I->lookForwardTo('experience flawless checkout');
$I->amGoingTo('place an order as a guest');
$I->amOnPage(Page\Checkout::$URL);
$I->amGoingTo('select the checkout type');
$I->selectOption(Page\Checkout::$radioTypeGuest, 'guest');
$I->click(Page\Checkout::$continueButton);
$I->amGoingTo('fill my address');
$I->fillField(Page\Checkout::$billingFirstname, $this->getConfig('firstname'));
$I->fillField(Page\Checkout::$billingLastname, $this->getConfig('lastname'));
$I->fillField(Page\Checkout::$billingEmail, $this->getConfig('email'));
$I->selectOption(Page\Checkout::$billingCountryId, $this->getConfig('country_id'));
$I->fillField(Page\Checkout::$billingStreet1, $this->getConfig('street'));
$I->fillField(Page\Checkout::$billingPostcode, $this->getConfig('postcode'));
$I->fillField(Page\Checkout::$billingCity, $this->getConfig('city'));
$I->fillField(Page\Checkout::$billingTelephone, $this->getConfig('phone'));
$I->click('button', Page\Checkout::$billingAddressContainer);
$I->amGoingTo('select shipping method');
$I->waitForElementVisible(Page\Checkout::$shippingButtonsContainer);
$I->selectOption(Page\Checkout::$shippingMethodInput, Page\Checkout::$shippingMethod);
$I->click('button', Page\Checkout::$shippingButtonsContainer);
$I->waitForElementVisible(Page\Checkout::$paymentButtonsContainer);
// $I->amGoingTo('select payment method');
// $I->click(Page\Checkout::$paymentMethod);
$I->click('button', Page\Checkout::$paymentButtonsContainer);
$I->waitForElementVisible(Page\Checkout::$checkoutReviewContainer);
$I->amGoingTo('review and finish my order');
$I->click('button', Page\Checkout::$checkoutReviewContainer);
$I->wait(7);
}
示例14: loginWithValidEMailPassword
function loginWithValidEMailPassword(\AcceptanceTester $I, \Page\Login $loginPage)
{
$I->wantTo("Check login with Valid Email and Password");
$loginPage->loginWithEmailAndPassword('mueller@mdesigns.at', '123asdF');
$I->waitForElement('div[class="infos"]');
$I->amOnPage('#/activities');
$I->see('Hi, Markus');
}
示例15: ensureThatHomePageWorks
public function ensureThatHomePageWorks(AcceptanceTester $I)
{
$I->amOnPage(Url::toRoute('/site/index'));
$I->see('My Company');
$I->seeLink('About');
$I->click('About');
$I->see('This is the About page.');
}