Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertGetVideoInfoDataIsCorrect.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Mtf\Fixture\InjectableFixture;
11 use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex;
12 use Magento\Catalog\Test\Page\Adminhtml\CatalogProductEdit;
13 
18 {
28  public function processAssert(
29  CatalogProductIndex $productGrid,
30  CatalogProductEdit $editProductPage,
31  InjectableFixture $product,
32  array $video
33  ) {
34  $productGrid->open();
35  $productGrid->getProductGrid()->searchAndOpen(['sku' => $product->getSku()]);
36 
37  $editProductPage->getProductForm()->openSection('images-and-videos');
38  $imagesTab = $editProductPage->getProductForm()->getSection('images-and-videos');
39  $result = $imagesTab->clickFirstVideo()->getVideoDialog()->validate($video);
40 
41  \PHPUnit\Framework\Assert::assertTrue(
42  $result,
43  'Video data received from external service is not correct.'
44  );
45  }
46 
52  public function toString()
53  {
54  return 'Video data received from external service is correct.';
55  }
56 }
processAssert(CatalogProductIndex $productGrid, CatalogProductEdit $editProductPage, InjectableFixture $product, array $video)