当前位置: 首页>>代码示例>>PHP>>正文


PHP AcceptanceTester::amOnPage方法代码示例

本文整理汇总了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);
 }
开发者ID:sseshachala,项目名称:invoiceninja,代码行数:31,代码来源:ExpenseCest.php

示例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));
 }
开发者ID:racinmat,项目名称:RiseOfBerkParser,代码行数:12,代码来源:LinkGatherCest.php

示例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');
 }
开发者ID:smartinmedia,项目名称:cunity-test,代码行数:10,代码来源:ConversationCest.php

示例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');
 }
开发者ID:WeCamp,项目名称:Meetspire,代码行数:7,代码来源:EventsCest.php

示例5: viewHomepage

 public function viewHomepage(AcceptanceTester $I)
 {
     $I->wantTo('view the homepage');
     $I->amOnPage('/');
     $I->see('Zen Kommerce');
     //$I->dontSeeHttpHeader('Set-Cookie');
 }
开发者ID:inklabs,项目名称:kommerce-templates,代码行数:7,代码来源:HomepageCest.php

示例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);
 }
开发者ID:Soolan,项目名称:mava-project,代码行数:7,代码来源:DashboardControllerCest.php

示例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();
 }
开发者ID:Sereda-Fazen,项目名称:CadenceProduction,代码行数:7,代码来源:02_LoginCest.php

示例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');
 }
开发者ID:connorjburton,项目名称:custom-contact-forms,代码行数:13,代码来源:FormManagerCest.php

示例9: _before

 public function _before(\AcceptanceTester $I)
 {
     $I->am('guest user');
     $I->amGoingTo('Load the homepage');
     $I->amOnPage('/');
     $I->seeInCurrentUrl('/');
 }
开发者ID:snowiow,项目名称:eternaldeztiny,代码行数:7,代码来源:HomeCest.php

示例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);
 }
开发者ID:NaszvadiG,项目名称:ImageCMS,代码行数:11,代码来源:InitTest.php

示例11: loginWithInvalidCredentials

 public function loginWithInvalidCredentials(AcceptanceTester $I)
 {
     $I->amOnPage('/login');
     $I->click('Login');
     $I->seeCurrentUrlEquals('/login');
     $I->see('Invalid Credentials', '.flash');
 }
开发者ID:joyhuang-note,项目名称:laravel-testing-decoded,代码行数:7,代码来源:LoginCest.php

示例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]);
 }
开发者ID:hannenijhuis,项目名称:invoiceninja,代码行数:26,代码来源:InvoiceDesignCest.php

示例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);
 }
开发者ID:rogyar,项目名称:Magento-Codeception,代码行数:42,代码来源:CheckoutCest.php

示例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');
 }
开发者ID:suj24,项目名称:TestDemo,代码行数:8,代码来源:LoginTestCest.php

示例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.');
 }
开发者ID:hscstudio,项目名称:yii2-app-basic,代码行数:8,代码来源:HomeCest.php


注:本文中的AcceptanceTester::amOnPage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。