/** * @Then this administrator should not be added */ public function thisAdministratorShouldNotBeAdded() { $this->indexPage->open(); Assert::same(1, $this->indexPage->countItems(), 'There should not be any new administrators'); }
/** * @Then /^I should see (\d+) zones in the list$/ */ public function iShouldSeeZonesInTheList($number) { $resourcesOnPage = $this->indexPage->countItems(); Assert::eq($number, $resourcesOnPage, sprintf('On list should be %d zones but get %d', $number, $resourcesOnPage)); }
/** * @Then /^I should see (\d+) customer groups in the list$/ */ public function iShouldSeeCustomerGroupsInTheList($amountOfCustomerGroups) { Assert::same((int) $amountOfCustomerGroups, $this->indexPage->countItems(), sprintf('Amount of customer groups should be equal %s, but is not.', $amountOfCustomerGroups)); }
/** * @Then /^I should see (\d+) product options in the list$/ */ public function iShouldSeeProductOptionsInTheList($amount) { $foundRows = $this->indexPage->countItems(); Assert::same((int) $amount, $foundRows, '%2$s rows with product options should appear on page, %s rows has been found'); }
/** * @Then /^there should be (\d+) coupon related to (this promotion)$/ */ public function thereShouldBeCouponRelatedTo($number, PromotionInterface $promotion) { $this->indexPage->open(['promotionId' => $promotion->getId()]); Assert::same((int) $number, $this->indexPage->countItems(), 'There should be %s coupons but is %s'); }
/** * @Then I should see :numberOfProducts products in the list */ public function iShouldSeeProductsInTheList($numberOfProducts) { $foundRows = $this->indexPage->countItems(); Assert::same((int) $numberOfProducts, $foundRows, '%s rows with products should appear on page, %s rows has been found'); }
/** * @Then I should see :numberOfShippingMethods shipping methods in the list */ public function iShouldSeeShippingMethodsInTheList($numberOfShippingMethods) { $foundRows = $this->indexPage->countItems(); Assert::true((int) $numberOfShippingMethods === $foundRows, sprintf('%s rows with shipping methods should appear on page, %s rows has been found', $numberOfShippingMethods, $foundRows)); }
/** * @Then I should see :amount payment methods in the list */ public function iShouldSeePaymentMethodsInTheList($amount) { $foundRows = $this->indexPage->countItems(); Assert::same((int) $amount, $foundRows, '%2$s rows with payment methods should appear on page, %s rows has been found'); }
/** * @param int $count * * @throws \InvalidArgumentException */ private function assertCountOfExchangeRatesOnTheList($count) { $actualCount = $this->indexPage->countItems(); Assert::same($actualCount, (int) $count, 'Expected %2$d exchange rates to be on the list, but found %d instead.'); }
/** * @Then I should see :amount static contents in the list */ public function iShouldSeeThatManyStaticContentsInTheList($amount) { Assert::same((int) $amount, $this->indexPage->countItems(), 'Amount of static contents should be equal %s, but was %2$s.'); }
/** * @Then I should see a single order in the list */ public function iShouldSeeASingleOrderInTheList() { Assert::same(1, $this->ordersIndexPage->countItems(), 'Cannot find order in the list.'); }
/** * @Then /^I should see (\d+) product attributes in the list$/ */ public function iShouldSeeCustomersInTheList($amountOfProductAttributes) { Assert::same($amountOfProductAttributes, $this->indexPage->countItems(), sprintf('Amount of product attributes should be equal %s, but is not.', $amountOfProductAttributes)); }
/** * @Then I should see :amount routes in the list */ public function iShouldSeeThatManyRoutesInTheList($amount) { Assert::same((int) $amount, $this->indexPage->countItems(), 'Amount of routes should be equal %s, but was %2$s.'); }
/** * @Then I should see :amount product association types in the list */ public function iShouldSeeCustomerGroupsInTheList($amount) { Assert::same((int) $amount, $this->indexPage->countItems(), sprintf('Amount of product association types should be equal %s, but is not.', $amount)); }