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


PHP AcceptanceTester::wantTo方法代码示例

本文整理汇总了PHP中AcceptanceTester::wantTo方法的典型用法代码示例。如果您正苦于以下问题:PHP AcceptanceTester::wantTo方法的具体用法?PHP AcceptanceTester::wantTo怎么用?PHP AcceptanceTester::wantTo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AcceptanceTester的用法示例。


在下文中一共展示了AcceptanceTester::wantTo方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testShowAction

 public function testShowAction(AcceptanceTester $I)
 {
     $I->wantTo('too see inside the "Writing" workspace');
     $I->amOnPage('/workspace/writing');
     $I->see('Symfony book');
     $I->wait(3);
 }
开发者ID:Soolan,项目名称:mava-project,代码行数:7,代码来源:WorkspaceControllerAcceptCest.php

示例2: 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

示例3: 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

示例4: loginWithoutEmail

 function loginWithoutEmail(\AcceptanceTester $I, \Page\Login $loginPage)
 {
     $I->wantTo("Check login with No Email and Valid Password");
     $loginPage->loginWithPasswordOnly('debby');
     $I->seeElement('div[class = "control-group email error"]');
     $I->dontSeeInCurrentUrl('activities');
 }
开发者ID:suj24,项目名称:TestDemo,代码行数:7,代码来源:LoginTestCest.php

示例5: testAPI

 public function testAPI(AcceptanceTester $I)
 {
     $I->wantTo('test the API');
     $data = new stdClass();
     $data->contact = new stdClass();
     $data->contact->email = $this->faker->safeEmail;
     $clientId = $this->createEntity('client', $data);
     $this->listEntities('client');
     $data = new stdClass();
     $data->client_id = $clientId;
     $data->description = $this->faker->realText(100);
     $this->createEntity('task', $data);
     $this->listEntities('task');
     $lineItem = new stdClass();
     $lineItem->qty = $this->faker->numberBetween(1, 10);
     $lineItem->cost = $this->faker->numberBetween(1, 10);
     $data = new stdClass();
     $data->client_id = $clientId;
     $data->invoice_items = [$lineItem];
     $invoiceId = $this->createEntity('invoice', $data);
     $this->listEntities('invoice');
     $data = new stdClass();
     $data->invoice_id = $invoiceId;
     $data->amount = 1;
     $this->createEntity('payment', $data);
     $this->listEntities('payment');
     $this->listEntities('account');
 }
开发者ID:magicians,项目名称:invoiceninja,代码行数:28,代码来源:APICest.php

示例6: 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

示例7: _before

 public function _before(AcceptanceTester $I)
 {
     $I->wantTo('Install and Configure WC');
     $I->loginAsAdmin();
     //Only if Run this test Seperately
     $I->amGoingTo('Activate Woocommerce Plugin');
     $I->amOnPluginsPage();
     //In order that the activatePlugin() works, the webdriver needs to be in Plugins page
     $I->activatePlugin('woocommerce');
     $I->amGoingTo('Run Woocommerce Setup');
     $I->waitForElement(".button-primary", 20);
     $I->click("Let's Go!");
     $I->waitForElement(".button-primary", 15);
     $I->click("Continue");
     $I->wait(1);
     $I->click("Continue");
     $I->wait(1);
     $I->click("Continue");
     $I->wait(1);
     $I->checkOption('#woocommerce_enable_cod');
     $I->click("Continue");
     $I->waitForElement(".button-secondary", 15);
     $I->click("No thanks");
     $I->wait(1);
     $I->click("Return to the WordPress Dashboard");
 }
开发者ID:helgatheviking,项目名称:woocommerce-multilingual,代码行数:26,代码来源:1003Cest.php

示例8: _before

 public function _before(AcceptanceTester $I)
 {
     $I->wantTo('Install WPML');
     $I->loginAsAdmin();
     $I->amGoingTo('Activate WPML Plugins');
     $I->amOnPluginsPage();
     //In order that the activatePlugin() works, the webdriver needs to be in Plugins page
     $I->activatePlugin('wpml-multilingual-cms');
     $I->amGoingTo('Configure WPML');
     $I->click('No thanks, I will configure myself');
     $I->click('Next');
     //Let's English as Default language
     $I->checkOption('Greek');
     $I->wait(1);
     $I->click('Next');
     $I->wait(5);
     $I->checkOption('form input[name=icl_lang_sel_footer]');
     $I->waitForElement(".button-primary", 15);
     $I->wait(1);
     $I->click('Next');
     $I->wait(3);
     $I->waitForElement(".button-primary", 15);
     $I->click('Remind me later');
     $I->wait(5);
     $I->click('Finish');
 }
开发者ID:helgatheviking,项目名称:woocommerce-multilingual,代码行数:26,代码来源:1001Cest.php

示例9: 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

示例10: 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

示例11: taxRates

 public function taxRates(AcceptanceTester $I)
 {
     $I->wantTo('test tax rates');
     $clientEmail = $this->faker->safeEmail;
     $productKey = $this->faker->text(10);
     $itemTaxRate = $this->faker->randomFloat(2, 5, 15);
     $itemTaxName = $this->faker->word();
     $invoiceTaxRate = $this->faker->randomFloat(2, 5, 15);
     $invoiceTaxName = $this->faker->word();
     $itemCost = $this->faker->numberBetween(1, 20);
     $total = $itemCost;
     $total += round($itemCost * $itemTaxRate / 100, 2);
     $total += round($itemCost * $invoiceTaxRate / 100, 2);
     // create tax rates
     $I->amOnPage('/tax_rates/create');
     $I->fillField(['name' => 'name'], $itemTaxName);
     $I->fillField(['name' => 'rate'], $itemTaxRate);
     $I->click('Save');
     $I->see($itemTaxName);
     $I->amOnPage('/tax_rates/create');
     $I->fillField(['name' => 'name'], $invoiceTaxName);
     $I->fillField(['name' => 'rate'], $invoiceTaxRate);
     $I->click('Save');
     $I->see($invoiceTaxName);
     // enable line item taxes
     $I->amOnPage('/settings/tax_rates');
     $I->checkOption('#invoice_item_taxes');
     $I->click('Save');
     // create product
     $I->amOnPage('/products/create');
     $I->fillField(['name' => 'product_key'], $productKey);
     $I->fillField(['name' => 'notes'], $this->faker->text(80));
     $I->fillField(['name' => 'cost'], $itemCost);
     $I->selectOption('select[name=default_tax_rate_id]', $itemTaxName . ' ' . $itemTaxRate . '%');
     $I->click('Save');
     $I->wait(1);
     $I->see($productKey);
     // create client
     $I->amOnPage('/clients/create');
     $I->fillField(['name' => 'contacts[0][email]'], $clientEmail);
     $I->click('Save');
     $I->see($clientEmail);
     // create invoice
     $I->amOnPage('/invoices/create');
     $I->selectDropdown($I, $clientEmail, '.client_select .dropdown-toggle');
     $I->fillField('table.invoice-table tbody tr:nth-child(1) #product_key', $productKey);
     $I->selectOption('#taxRateSelect', $invoiceTaxName . ' ' . $invoiceTaxRate . '%');
     $I->wait(2);
     // check total is right before saving
     $I->see("\${$total}");
     $I->click('Save');
     $I->wait(1);
     $I->see($clientEmail);
     // check total is right after saving
     $I->see("\${$total}");
     $I->amOnPage('/invoices');
     // check total is right in list view
     $I->see("\${$total}");
 }
开发者ID:joshuadwire,项目名称:invoiceninja,代码行数:59,代码来源:TaxRatesCest.php

示例12: comment

 public function comment(AcceptanceTester $I)
 {
     $I->wantTo('post a comment');
     $I->amOnPage('/Mikroblogi');
     $I->canSeeElement('.comment-submit');
     //        $I->submitForm('.comment-submit', ['text' => 'To jest unikalny komentarz']);
     //        $I->wait(1);
     //        $I->canSee('To jest unikalny komentarz');
 }
开发者ID:furious-programming,项目名称:coyote,代码行数:9,代码来源:MicroblogCest.php

示例13: cloneInvoice

 public function cloneInvoice(AcceptanceTester $I)
 {
     $I->wantTo('clone an invoice');
     $I->amOnPage('/invoices/1/clone');
     $invoiceNumber = $I->grabAttributeFrom('#invoice_number', 'value');
     $I->executeJS('submitAction()');
     $I->wait(1);
     $I->see($invoiceNumber);
 }
开发者ID:rafaelsisweb,项目名称:invoice-ninja,代码行数:9,代码来源:InvoiceCest.php

示例14: loginAdminUserTest

 /**
  * Login the admin user using his email
  *
  * @param \AcceptanceTester $I
  */
 public function loginAdminUserTest(\AcceptanceTester $I)
 {
     $I->wantTo('log into the backend as Admin with email');
     $I->loginWithEmailAs($this->user['admin']);
     $this->saveLogin($I);
     $I->see('Dashboard');
     $I->see('Configuration', Locator::href('/bolt/users'));
     $I->see("You've been logged on successfully.");
 }
开发者ID:robbert-vdh,项目名称:bolt,代码行数:14,代码来源:BackendAdminLoginWithEmailCest.php

示例15: strtotime

 public function authentication_最終ログイン日時確認(\AcceptanceTester $I)
 {
     $I->wantTo('EA0201-UC01-T01 最終ログイン日時確認');
     $I->click(['css' => '.navbar-menu .dropdown-toggle']);
     $loginText = $I->grabTextFrom(['css' => '.navbar-menu .dropdown-menu']);
     $lastLogin = preg_replace('/.*(\\d{4}\\/\\d{2}\\/\\d{2} \\d{2}:\\d{2}).*/s', '$1', $loginText);
     // 表示されるログイン日時では秒数がわからないため、タイミングによっては1分ちょっと変わる
     $I->assertTrue(strtotime('now') - strtotime($lastLogin) < 70, '最終ログイン日時が正しい');
 }
开发者ID:EC-CUBE,项目名称:eccube-codeception,代码行数:9,代码来源:EA02AuthenticationCest.php


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