function it_ensures_there_is_no_discount_info_on_the_page(CartSummaryPage $cartSummaryPage) { $cartSummaryPage->open()->shouldBeCalled(); $cartSummaryPage->getPromotionTotal()->willThrow(new ElementNotFoundException('"promotion total" element is not present on the page')); $this->thereShouldBeNoDiscount(); }
/** * @Then my cart shipping fee should be :shippingTotal */ public function myCartShippingFeeShouldBe($shippingTotal) { $this->cartSummaryPage->open(); expect($this->cartSummaryPage->getShippingTotal())->toBe($shippingTotal); }
/** * @Given /^there should be no discount$/ */ public function thereShouldBeNoDiscount() { $this->cartSummaryPage->open(); expect($this->cartSummaryPage)->toThrow(ElementNotFoundException::class)->during('getPromotionTotal', []); }
function it_checks_if_cart_has_given_tax_total(CartSummaryPage $cartSummaryPage) { $cartSummaryPage->open()->shouldBeCalled(); $cartSummaryPage->getTaxTotal()->willReturn('$50.00'); $this->myCartTaxesShouldBe('$50.00'); }