本文整理汇总了PHP中AcceptanceTester::see方法的典型用法代码示例。如果您正苦于以下问题:PHP AcceptanceTester::see方法的具体用法?PHP AcceptanceTester::see怎么用?PHP AcceptanceTester::see使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AcceptanceTester
的用法示例。
在下文中一共展示了AcceptanceTester::see方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: create
public function create(AcceptanceTester $I)
{
$clientEmail = $this->faker->safeEmail;
$productKey = $this->faker->text(10);
$amount = rand(1, 10);
$I->wantTo('enter a payment');
// create client
$I->amOnPage('/clients/create');
$I->fillField(['name' => 'contacts[0][email]'], $clientEmail);
$I->click('Save');
$I->see($clientEmail);
// create product
$I->amOnPage('/products/create');
$I->fillField(['name' => 'product_key'], $productKey);
$I->fillField(['name' => 'notes'], $this->faker->text(80));
$I->fillField(['name' => 'cost'], $this->faker->numberBetween(11, 20));
$I->click('Save');
$I->see($productKey);
// 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->click('Save');
$I->see($clientEmail);
$I->amOnPage('/payments/create');
$I->selectDropdown($I, $clientEmail, '.client-select .dropdown-toggle');
$I->selectDropdownRow($I, 1, '.invoice-select .combobox-container');
$I->fillField(['name' => 'amount'], $amount);
$I->selectDropdown($I, 'Cash', '.payment-type-select .dropdown-toggle');
$I->selectDataPicker($I, '#payment_date', 'now + 1 day');
$I->fillField(['name' => 'transaction_reference'], $this->faker->text(12));
$I->click('Save');
$I->see('Successfully created payment');
$I->seeInDatabase('payments', ['amount' => number_format($amount, 2)]);
}
示例2: checkNotFoundResourceTest
/**
* Check a non-existing URL and check for our 404
*
* @param \AcceptanceTester $I
*/
public function checkNotFoundResourceTest(\AcceptanceTester $I)
{
$I->wantTo('see that a non-existing URL request returns a valid 404 page.');
$I->amOnPage('/derp-a-derp');
$I->see('Well, this is kind of embarrassing!');
$I->see('You have what we call in the business, a 404.');
}
示例3: it_validates_required_fields
public function it_validates_required_fields(AcceptanceTester $I)
{
$I->amOnRoute(LoginPage::$ROUTE);
$I->submitForm(LoginPage::$formId, [], 'Login');
$I->see('The username field is required.');
$I->see('The password field is required.');
}
示例4: 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);
}
示例5: 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}");
}
示例6: 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.');
}
示例7: seeHomepage
public function seeHomepage(\AcceptanceTester $I)
{
$I->wantTo('See the homepage');
$I->lookForwardTo('See the homepage correctly');
$I->see('Welcome to Eternal Deztiny');
$I->see('About us');
$I->see('Recruiting Criteria');
$I->see('Clan Dynamics');
$I->see('What are you waiting for? Apply!');
}
示例8: seeMembers
public function seeMembers(\AcceptanceTester $I)
{
$I->am('guest user');
$I->amGoingTo('Load the members section');
$I->amOnPage('/');
$I->click('Members');
$I->seeInCurrentUrl('/members');
$I->see('Name');
$I->see('Role');
}
示例9: 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->cookies['bolt_authtoken'] = $I->grabCookie('bolt_authtoken');
$this->cookies['bolt_session'] = $I->grabCookie('bolt_session');
$I->see('Dashboard');
$I->see('Configuration', Locator::href('/bolt/users'));
$I->see("You've been logged on successfully.");
}
示例10: installNeno
public function installNeno(AcceptanceTester $I)
{
$I->maximizeWindow();
$I->am('Administrator');
$I->installJoomla();
$I->doAdministratorLogin();
$I->setErrorReportingToDevelopment();
$I->amOnPage("/administrator/");
$I->click("Extensions");
$I->click("Extension Manager");
$I->click("Upload Package File");
$path = $I->getConfiguration('repo_folder');
// Installing library
$I->installExtensionFromDirectory($path . 'lib_neno');
// Installing Plugin
$I->installExtensionFromDirectory($path . 'plg_system_neno');
// Installing Component
$I->installExtensionFromDirectory($path . 'com_neno');
// Enabling plugin
$I->enablePlugin('Neno plugin');
// Going to Neno
$I->click("Components");
$I->wait(1);
$I->click("Neno Translate");
$I->wait(1);
// Get started Screen
$I->click('Get Started');
$I->waitForJS('return jQuery.active == 0', 5);
$I->wait(1);
// First step - Source language
$I->see('Next');
$I->click(['xpath' => "//button[@type=\"button\"]"]);
$I->wait(1);
// Second step - Translation methods
$I->click('Next');
$I->waitForJS('return jQuery.active == 0', 5);
// Third step- Install language(s)
$I->wait(1);
$I->click("//*[@id=\"add-languages-button\"]");
$I->waitForJS("return jQuery.active == 0", 5);
$I->waitForElementVisible(['class' => 'ar-AA'], 5);
$I->wait(1);
$I->click(['class' => 'ar-AA']);
$I->see('Close', ['class' => 'close-button']);
$I->click(['class' => 'close-button'], ['xpath' => "//*[@id=\"languages-modal\"]"]);
$I->click(['xpath' => "(//button[@type=\"button\"])[4]"]);
// Fourth step- Installing Neno
$I->wait(1);
$I->click("#backup-created-checkbox");
$I->click("#proceed-button");
// Fifth step- Installing Neno has been accomplish successfully
//$I->waitForJS('return jQuery.installation == 1', 1000);
$I->waitForElement(".icon-thumbs-up", 300);
$I->doAdministratorLogout();
}
示例11: addShipmentToNewOrder
public function addShipmentToNewOrder(AcceptanceTester $I)
{
$I->addProductToCartAndCheckout();
$orderId = $I->grabAttributeFrom('#new-order-number', 'data-order-id');
$referenceNumber = $I->grabAttributeFrom('#new-order-number', 'data-reference-number');
$I->amOnPage('/admin/order/view/' . $orderId);
$I->see('Order #' . $referenceNumber);
$I->see('Pending', '.order-status');
$I->addShipmentTrackingCode();
$I->buyShippingLabel();
}
示例12: viewProductFromTagPage
public function viewProductFromTagPage(AcceptanceTester $I)
{
$I->wantTo('view a product from tag page');
$I->amOnPage('/t');
$tagName = $I->grabTextFrom("//div[contains(@class,'tag-name')][1]");
$I->click("//div[contains(@class,'tag-container')][1]//a");
$I->see($tagName);
$productName = $I->grabTextFrom("//div[contains(@class,'product-name')][1]");
$I->click("//div[contains(@class,'product-container')][1]//a");
$I->see($productName);
}
示例13: login
public function login(AcceptanceTester $I)
{
$I->amOnPage(Url::toRoute('/site/login'));
$I->see('Введите логин и пароль для входа в систему:');
$I->fillField('LoginForm[username]', 'admin');
$I->fillField('LoginForm[password]', 'admin');
$I->click('login-button');
$I->wait(2);
// wait for button to be clicked
$I->see('Главное меню');
}
示例14: publishContactPageTest
/**
* Publish the 'Contact' page.
*
* @param \AcceptanceTester $I
*/
public function publishContactPageTest(\AcceptanceTester $I)
{
$I->wantTo("Publish the 'Contact' page with 'templatefields' as 'manager' user");
// Set up the browser
$I->setCookie('bolt_authtoken', $this->cookies['bolt_authtoken']);
$I->setCookie('bolt_session', $this->cookies['bolt_session']);
$I->amOnPage('/bolt/editcontent/pages/3');
$I->see('This is the contact text');
$I->selectOption('#statusselect', 'published');
$I->click('Save', '#savecontinuebutton');
$I->see('The changes to this Page have been saved.');
}
示例15: editAboutPageTest
/**
* Create an 'About' page record.
*
* @param \AcceptanceTester $I
*/
public function editAboutPageTest(\AcceptanceTester $I)
{
$I->wantTo("Edit the 'About' page as the 'author' user");
// Set up the browser
$I->setCookie('bolt_authtoken', $this->cookies['bolt_authtoken']);
$I->setCookie('bolt_session', $this->cookies['bolt_session']);
$I->amOnPage('/bolt');
$I->see('Edit', 'a');
$I->click('Edit', 'a');
$I->click('Save Page', '#savecontinuebutton');
$I->see('The changes to the Page have been saved.');
}