2020-01-23 12:11:47 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace Tests\Functional\Admin\Customer;
|
|
|
|
|
|
|
|
|
|
use FunctionalTester;
|
2020-01-28 15:28:29 +00:00
|
|
|
use Webkul\Core\Helpers\Laravel5Helper;
|
2020-01-23 12:11:47 +00:00
|
|
|
use Webkul\Product\Models\ProductReview;
|
|
|
|
|
|
|
|
|
|
class ReviewCest
|
|
|
|
|
{
|
|
|
|
|
public function testIndex(FunctionalTester $I): void
|
|
|
|
|
{
|
2020-01-28 15:28:29 +00:00
|
|
|
$product = $I->haveProduct(Laravel5Helper::SIMPLE_PRODUCT, [], ['simple']);
|
2020-01-23 12:11:47 +00:00
|
|
|
$review = $I->have(ProductReview::class, ['product_id' => $product->id]);
|
|
|
|
|
|
|
|
|
|
$I->loginAsAdmin();
|
2022-01-03 11:01:00 +00:00
|
|
|
|
|
|
|
|
$I->amOnAdminRoute('admin.customer.review.index');
|
2020-01-23 12:11:47 +00:00
|
|
|
$I->seeCurrentRouteIs('admin.customer.review.index');
|
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
|
|
|
}
|
|
|
|
|
}
|