2020-01-23 12:11:47 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace Tests\Functional\Admin\Customer;
|
|
|
|
|
|
|
|
|
|
use FunctionalTester;
|
2022-02-07 10:36:38 +00:00
|
|
|
use Helper\Bagisto;
|
2020-01-23 12:11:47 +00:00
|
|
|
use Webkul\Product\Models\ProductReview;
|
|
|
|
|
|
|
|
|
|
class ReviewCest
|
|
|
|
|
{
|
|
|
|
|
public function testIndex(FunctionalTester $I): void
|
|
|
|
|
{
|
2022-02-07 10:36:38 +00:00
|
|
|
$product = $I->haveProduct(Bagisto::SIMPLE_PRODUCT, [], ['simple']);
|
2020-01-23 12:11:47 +00:00
|
|
|
$review = $I->have(ProductReview::class, ['product_id' => $product->id]);
|
|
|
|
|
|
|
|
|
|
$I->loginAsAdmin();
|
2022-02-07 10:36:38 +00:00
|
|
|
|
|
|
|
|
$I->amOnAdminRoute('admin.customer.review.index');
|
2020-01-23 12:11:47 +00:00
|
|
|
$I->seeCurrentRouteIs('admin.customer.review.index');
|
2022-02-07 10:36:38 +00:00
|
|
|
|
2022-01-03 11:01:00 +00:00
|
|
|
$I->see("{$review->id}", '//script[@type="text/x-template"]');
|
2020-01-23 12:11:47 +00:00
|
|
|
}
|
|
|
|
|
}
|