Test Case Portion 3

This commit is contained in:
devansh bawari 2021-04-13 17:50:27 +05:30
parent e6ccde8639
commit ddaf0c15be
3 changed files with 17 additions and 12 deletions

View File

@ -2,13 +2,13 @@
namespace Tests\Acceptance\BookingProduct;
use AcceptanceTester;
use Carbon\Carbon;
use Faker\Factory;
use AcceptanceTester;
use Webkul\Product\Models\Product;
use Webkul\Core\Helpers\Laravel5Helper;
use Webkul\BookingProduct\Models\BookingProduct;
use Webkul\BookingProduct\Models\BookingProductEventTicket;
use Webkul\Core\Helpers\Laravel5Helper;
use Webkul\Product\Models\Product;
class BookingProductEventTicketCest
{
@ -35,15 +35,20 @@ class BookingProductEventTicketCest
'special_price' => 5
];
$ticket = $I->have(BookingProductEventTicket::class, array_merge(
['booking_product_id' => $bookingProduct->id], $scenario['ticket'])
$ticket = $I->have(
BookingProductEventTicket::class,
array_merge(
['booking_product_id' => $bookingProduct->id],
$scenario['ticket']
)
);
$I->amOnPage($product->url_key);
$I->see(core()->currency($ticket->price), '//span[@class="regular-price"]');
$I->see(__('bookingproduct::app.shop.products.per-ticket-price', ['price' => core()->currency($ticket->special_price)]),
'//span[@class="special-price"]');
$I->see(
__('bookingproduct::app.shop.products.per-ticket-price', ['price' => core()->currency($ticket->special_price)]),
'//span[@class="special-price"]'
);
}
}
}

View File

@ -57,4 +57,4 @@ class GuestCheckoutCest
$I->dontSee('Guest Checkout');
$I->dontSeeInSource('<input type="checkbox" id="guest_checkout" name="guest_checkout"');
}
}
}

View File

@ -141,8 +141,8 @@ class CartTaxesCest
$I->amOnPage('/checkout/cart');
$I->amOnPage('/checkout/cart');
// $I->see('Tax ' . $tax1->tax_rate . ' %', '#taxrate-' . core()->taxRateAsIdentifier($tax1->tax_rate));
// $I->see(core()->currency($expectedTaxAmount1), '#basetaxamount-' . core()->taxRateAsIdentifier($tax1->tax_rate));
$I->see('Tax ' . $tax1->tax_rate . ' %', '#taxrate-' . core()->taxRateAsIdentifier($tax1->tax_rate));
$I->see(core()->currency($expectedTaxAmount1), '#basetaxamount-' . core()->taxRateAsIdentifier($tax1->tax_rate));
$I->dontSee('Tax ' . $tax2->tax_rate . ' %', '#taxrate-' . core()->taxRateAsIdentifier($tax2->tax_rate));
$I->dontSee(core()->currency($expectedTaxAmount2), '#basetaxamount-' . core()->taxRateAsIdentifier($tax2->tax_rate));