8 use Magento\Mtf\Client\BrowserInterface;
9 use Magento\Mtf\Fixture\InjectableFixture;
10 use Magento\Mtf\Constraint\AbstractConstraint;
11 use Magento\Catalog\Test\Page\Product\CatalogProductView;
29 BrowserInterface $browser,
30 CatalogProductView $catalogProductView,
37 $browser->open($_ENV[
'app_frontend_url'] .
$product->getUrlKey() .
'.html');
39 \PHPUnit\Framework\Assert::assertTrue(
40 $catalogProductView->getViewBlock()->isVideoVisible(),
41 'Product video is not displayed on product view when it should.' 43 \PHPUnit\Framework\Assert::assertTrue(
44 $catalogProductView->getViewBlock()->checkVideoDataPresence($youtubeDataCode),
45 'Configurable product video data is not displayed on product view when it should.' 48 $catalogProductView->getConfigurableAttributesBlock()->selectConfigurableOption(
$product, $variation);
50 \PHPUnit\Framework\Assert::assertTrue(
51 $catalogProductView->getViewBlock()->isVideoVisible(),
52 'Configurable product variation video is not displayed on product view when it should.' 54 \PHPUnit\Framework\Assert::assertTrue(
55 $catalogProductView->getViewBlock()->checkVideoDataPresence($vimeoDataCode),
56 'Configurable product variation video data is not displayed on product view when it should.' 67 return 'Configurable product video and it variation video are displayed on product view.';
processAssert(BrowserInterface $browser, CatalogProductView $catalogProductView, InjectableFixture $product, $youtubeDataCode, $vimeoDataCode, $variation)