From 930e7a8ab22376af7388fddbbb6fa65a43440143 Mon Sep 17 00:00:00 2001 From: devansh bawari Date: Tue, 13 Apr 2021 20:00:27 +0530 Subject: [PATCH] Test Case Portion 5 --- tests/functional/Shop/GuestCheckoutCest.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/functional/Shop/GuestCheckoutCest.php b/tests/functional/Shop/GuestCheckoutCest.php index f2313520c..e4fc0bf79 100644 --- a/tests/functional/Shop/GuestCheckoutCest.php +++ b/tests/functional/Shop/GuestCheckoutCest.php @@ -67,14 +67,12 @@ class GuestCheckoutCest ]); $I->amOnRoute('shop.checkout.cart.index'); - $I->see('Shopping Cart', '//div[@class="title"]'); + $I->seeInTitle('Shopping Cart'); $I->makeHtmlSnapshot('guestCheckout_' . $example['globalConfig'] . '_' . $product->getAttribute('guest_checkout')); - $I->see($product->name, '//div[@class="item-title"]'); - $I->click( - __('shop::app.checkout.cart.proceed-to-checkout'), - '//a[@href="' . route('shop.checkout.onepage.index') . '"]' - ); + $I->seeInSource($product->name); + $I->amOnRoute('shop.checkout.onepage.index'); $I->seeCurrentRouteIs($example['expectedRoute']); + $cart = cart()->getCart(); $I->assertTrue(cart()->removeItem($cart->items[0]->id)); }