Test Case Portion 3
This commit is contained in:
parent
e6ccde8639
commit
ddaf0c15be
|
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
namespace Tests\Acceptance\BookingProduct;
|
namespace Tests\Acceptance\BookingProduct;
|
||||||
|
|
||||||
use AcceptanceTester;
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use Faker\Factory;
|
use Faker\Factory;
|
||||||
|
use AcceptanceTester;
|
||||||
|
use Webkul\Product\Models\Product;
|
||||||
|
use Webkul\Core\Helpers\Laravel5Helper;
|
||||||
use Webkul\BookingProduct\Models\BookingProduct;
|
use Webkul\BookingProduct\Models\BookingProduct;
|
||||||
use Webkul\BookingProduct\Models\BookingProductEventTicket;
|
use Webkul\BookingProduct\Models\BookingProductEventTicket;
|
||||||
use Webkul\Core\Helpers\Laravel5Helper;
|
|
||||||
use Webkul\Product\Models\Product;
|
|
||||||
|
|
||||||
class BookingProductEventTicketCest
|
class BookingProductEventTicketCest
|
||||||
{
|
{
|
||||||
|
|
@ -35,15 +35,20 @@ class BookingProductEventTicketCest
|
||||||
'special_price' => 5
|
'special_price' => 5
|
||||||
];
|
];
|
||||||
|
|
||||||
$ticket = $I->have(BookingProductEventTicket::class, array_merge(
|
$ticket = $I->have(
|
||||||
['booking_product_id' => $bookingProduct->id], $scenario['ticket'])
|
BookingProductEventTicket::class,
|
||||||
|
array_merge(
|
||||||
|
['booking_product_id' => $bookingProduct->id],
|
||||||
|
$scenario['ticket']
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$I->amOnPage($product->url_key);
|
$I->amOnPage($product->url_key);
|
||||||
|
|
||||||
$I->see(core()->currency($ticket->price), '//span[@class="regular-price"]');
|
$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)]),
|
$I->see(
|
||||||
'//span[@class="special-price"]');
|
__('bookingproduct::app.shop.products.per-ticket-price', ['price' => core()->currency($ticket->special_price)]),
|
||||||
|
'//span[@class="special-price"]'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -57,4 +57,4 @@ class GuestCheckoutCest
|
||||||
$I->dontSee('Guest Checkout');
|
$I->dontSee('Guest Checkout');
|
||||||
$I->dontSeeInSource('<input type="checkbox" id="guest_checkout" name="guest_checkout"');
|
$I->dontSeeInSource('<input type="checkbox" id="guest_checkout" name="guest_checkout"');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -141,8 +141,8 @@ class CartTaxesCest
|
||||||
|
|
||||||
$I->amOnPage('/checkout/cart');
|
$I->amOnPage('/checkout/cart');
|
||||||
$I->amOnPage('/checkout/cart');
|
$I->amOnPage('/checkout/cart');
|
||||||
// $I->see('Tax ' . $tax1->tax_rate . ' %', '#taxrate-' . 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->see(core()->currency($expectedTaxAmount1), '#basetaxamount-' . core()->taxRateAsIdentifier($tax1->tax_rate));
|
||||||
|
|
||||||
$I->dontSee('Tax ' . $tax2->tax_rate . ' %', '#taxrate-' . core()->taxRateAsIdentifier($tax2->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));
|
$I->dontSee(core()->currency($expectedTaxAmount2), '#basetaxamount-' . core()->taxRateAsIdentifier($tax2->tax_rate));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue