9 use Magento\Catalog\Test\Page\Product\CatalogProductCompare;
10 use Magento\Catalog\Test\Page\Product\CatalogProductView;
11 use Magento\Cms\Test\Page\CmsIndex;
13 use Magento\Mtf\Client\BrowserInterface;
14 use Magento\Mtf\Constraint\AbstractConstraint;
15 use Magento\Mtf\Fixture\FixtureFactory;
16 use Magento\Mtf\Fixture\InjectableFixture;
17 use Magento\Mtf\TestCase\Injectable;
114 $this->objectManager->create(
115 \
Magento\Customer\Test\TestStep\LoginCustomerOnFrontendStep::class,
116 [
'customer' => $this->customer]
130 list($fixture, $dataset) = explode(
'::',
$product);
131 $product = $this->fixtureFactory->createByCode($fixture, [
'dataset' => $dataset]);
148 $this->browser->open($_ENV[
'app_frontend_url'] . $itemProduct->getUrlKey() .
'.html');
149 $this->catalogProductView->getViewBlock()->clickAddToCompare();
150 if ($assert !==
null) {
165 $assert->configure([
'catalogProductView' => $this->catalogProductView,
'product' =>
$product]);
166 \PHPUnit\Framework\Assert::assertThat($this->getName(), $assert);
__inject(CmsIndex $cmsIndex, CatalogProductView $catalogProductView, BrowserInterface $browser)
__prepare(FixtureFactory $fixtureFactory, Customer $customer)
addProducts(array $products, AbstractConstraint $assert=null)
productCompareAssert(AbstractConstraint $assert, InjectableFixture $product)
createProducts($products)