本文整理汇总了PHP中Shopware\Tests\Mink\Helper::clickNamedLink方法的典型用法代码示例。如果您正苦于以下问题:PHP Helper::clickNamedLink方法的具体用法?PHP Helper::clickNamedLink怎么用?PHP Helper::clickNamedLink使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Shopware\Tests\Mink\Helper
的用法示例。
在下文中一共展示了Helper::clickNamedLink方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: changeShippingMethod
/**
* Changes the shipping method
* @param array $data
*/
public function changeShippingMethod(array $data = [])
{
$element = $this->getElement('CheckoutPayment');
Helper::clickNamedLink($element, 'changeButton');
Helper::fillForm($this, 'shippingPaymentForm', $data);
Helper::pressNamedButton($this, 'changePaymentButton');
}
示例2: proceedToOrderConfirmationWithLogin
/**
* Proceeds to the confirmation page with login
* @param string $eMail
* @param string $password
*/
public function proceedToOrderConfirmationWithLogin($eMail, $password)
{
if ($this->verifyPage()) {
Helper::clickNamedLink($this, 'checkout');
}
$this->getPage('Account')->login($eMail, $password);
$this->getPage('CheckoutConfirm')->verifyPage();
}
示例3: changeShippingMethod
/**
* Changes the shipping method
* @param array $data
*/
public function changeShippingMethod($data = array())
{
$element = $this->getElement('CheckoutPayment');
$language = Helper::getCurrentLanguage($this);
Helper::clickNamedLink($element, 'changeButton', $language);
Helper::fillForm($this, 'shippingPaymentForm', $data);
Helper::pressNamedButton($this, 'changePaymentButton');
}
示例4: iOrderTheArticleOnPosition
/**
* @When /^I order the article on position (?P<position>\d+)$/
*/
public function iOrderTheArticleOnPosition($position)
{
/** @var Listing $page */
$page = $this->getPage('Listing');
/** @var ArticleBox $articleBox */
$articleBox = $this->getMultipleElement($page, 'ArticleBox', $position);
Helper::clickNamedLink($articleBox, 'order');
}
示例5: iClickToReadTheBlogArticleOnPosition
/**
* @Given /^I click to read the blog article on position (\d+)$/
*/
public function iClickToReadTheBlogArticleOnPosition($position)
{
/** @var Blog $page */
$page = $this->getPage('Blog');
/** @var BlogBox $blogBox */
$blogBox = $this->getMultipleElement($page, 'BlogBox', $position);
Helper::clickNamedLink($blogBox, 'readMore');
}
示例6: clickActionLink
private function clickActionLink($position, $name)
{
/** @var Note $page */
$page = $this->getPage('Note');
/** @var NotePosition $notePosition */
$notePosition = $this->getMultipleElement($page, 'NotePosition', $position);
Helper::clickNamedLink($notePosition, $name);
}
示例7: myFinishedOrderShouldLookLikeThis
/**
* @Given /^my finished order should look like this:$/
*/
public function myFinishedOrderShouldLookLikeThis(TableNode $positions)
{
$orderNumber = $this->getPage('CheckoutConfirm')->getOrderNumber();
$values = $positions->getHash();
/** @var \Shopware\Tests\Mink\Page\Emotion\Account $page */
$page = $this->getPage('Account');
$page->open();
Helper::clickNamedLink($page, 'myOrdersLink');
/** @var \Shopware\Tests\Mink\Element\Emotion\AccountOrder $order */
$order = $this->getMultipleElement($page, 'AccountOrder');
$page->checkOrder($order, $orderNumber, $values);
}
示例8: iFollowTheLinkOfTheElementOnPosition
/**
* @When /^I follow the link "(?P<linkName>[^"]*)" of the element "(?P<elementClass>[^"]*)"$/
* @When /^I follow the link "(?P<linkName>[^"]*)" of the element "(?P<elementClass>[^"]*)" on position (?P<position>\d+)$/
*/
public function iFollowTheLinkOfTheElementOnPosition($linkName, $elementClass, $position = 1)
{
/** @var HelperSelectorInterface $element */
$element = $this->getElement($elementClass);
if ($element instanceof MultipleElement) {
/** @var Homepage $page */
$page = $this->getPage('Homepage');
/** @var MultipleElement $element */
$element->setParent($page);
$element = $element->setInstance($position);
}
if (empty($linkName)) {
$element->click();
return;
}
Helper::clickNamedLink($element, $linkName);
}
示例9: checkEsdArticles
/**
* Helper method checks the ESD articles
* @param string $date
* @param array $articles
* @throws \Exception
*/
private function checkEsdArticles($date, array $articles)
{
$esd = array();
foreach ($articles as $key => $article) {
if (empty($article['esd'])) {
continue;
}
$esd[] = $article['product'];
}
if (empty($esd)) {
return;
}
$language = Helper::getCurrentLanguage($this);
Helper::clickNamedLink($this, 'myEsdDownloads', $language);
$locators = array('esdDownloads');
$elements = Helper::findAllOfElements($this, $locators);
$locator = Helper::getRequiredSelector($this, 'esdDownloadName');
$downloads = array();
/** @var NodeElement $esdDownload */
foreach ($elements['esdDownloads'] as $esdDownload) {
if (strpos($esdDownload->getText(), $date) !== false) {
$downloads[] = $this->find('css', $locator)->getText();
}
}
foreach ($esd as $givenEsd) {
foreach ($downloads as $download) {
if ($givenEsd === $download) {
break;
}
if ($download === end($downloads)) {
$message = sprintf('ESD-Article "%s" not found in account!', $givenEsd);
Helper::throwException($message);
}
}
}
}
示例10: proceedToOrderConfirmationWithRegistration
/**
* Proceeds to the confirmation page with registration
* @param array $data
*/
public function proceedToOrderConfirmationWithRegistration(array $data)
{
if ($this->verifyPage()) {
Helper::clickNamedLink($this, 'checkout');
}
$this->getPage('Account')->register($data);
}
示例11: proceedToOrderConfirmationWithRegistration
/**
* Proceeds to the confirmation page with registration
* @param array $data
*/
public function proceedToOrderConfirmationWithRegistration(array $data)
{
$language = Helper::getCurrentLanguage($this);
if ($this->verifyPage($language)) {
Helper::clickNamedLink($this, 'checkout', $language);
}
$this->getPage('Account')->register($data);
}
示例12: changeShippingAddress
/**
* @param array $data
*/
public function changeShippingAddress($data = array())
{
$element = $this->getElement('CheckoutShipping');
$language = Helper::getCurrentLanguage($this);
Helper::clickNamedLink($element, 'changeButton', $language);
$account = $this->getPage('Account');
Helper::fillForm($account, 'shippingForm', $data);
Helper::pressNamedButton($account, 'changeShippingButton', $language);
}
示例13: changeShippingAddress
/**
* Changes the shipping address
* @param array $data
*/
public function changeShippingAddress(array $data = [])
{
$element = $this->getElement('CheckoutShipping');
Helper::clickNamedLink($element, 'changeButton');
$account = $this->getPage('Account');
Helper::fillForm($account, 'shippingForm', $data);
Helper::pressNamedButton($account, 'changeShippingButton');
}
示例14: iFollowTheLinkOfThePage
/**
* @When /^I follow the link "(?P<linkName>[^"]*)" of the page "(?P<pageClass>[^"]*)"$/
*/
public function iFollowTheLinkOfThePage($linkName, $pageClass)
{
$page = $this->getPage($pageClass);
Helper::clickNamedLink($page, $linkName);
}