Skip to content

Commit f498fa5

Browse files
committed
Merge remote-tracking branch 'origin/MC-19044' into 2.3.3-develop-pr68
2 parents d80bd41 + 3425e78 commit f498fa5

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/CreateDownloadableProductEntityTest.php

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use Magento\Catalog\Test\Page\Adminhtml\CatalogProductNew;
1212
use Magento\Downloadable\Test\Fixture\DownloadableProduct;
1313
use Magento\Mtf\TestCase\Injectable;
14+
use Magento\Mtf\Util\Command\Cli\EnvWhitelist;
1415

1516
/**
1617
* Steps:
@@ -53,6 +54,13 @@ class CreateDownloadableProductEntityTest extends Injectable
5354
*/
5455
protected $catalogProductNew;
5556

57+
/**
58+
* DomainWhitelist CLI
59+
*
60+
* @var EnvWhitelist
61+
*/
62+
private $envWhitelist;
63+
5664
/**
5765
* Persist category
5866
*
@@ -73,16 +81,19 @@ public function __prepare(Category $category)
7381
* @param Category $category
7482
* @param CatalogProductIndex $catalogProductIndexNewPage
7583
* @param CatalogProductNew $catalogProductNewPage
84+
* @param EnvWhitelist $envWhitelist
7685
* @return void
7786
*/
7887
public function __inject(
7988
Category $category,
8089
CatalogProductIndex $catalogProductIndexNewPage,
81-
CatalogProductNew $catalogProductNewPage
90+
CatalogProductNew $catalogProductNewPage,
91+
EnvWhitelist $envWhitelist
8292
) {
8393
$this->category = $category;
8494
$this->catalogProductIndex = $catalogProductIndexNewPage;
8595
$this->catalogProductNew = $catalogProductNewPage;
96+
$this->envWhitelist = $envWhitelist;
8697
}
8798

8899
/**
@@ -95,10 +106,21 @@ public function __inject(
95106
public function test(DownloadableProduct $product, Category $category)
96107
{
97108
// Steps
109+
$this->envWhitelist->addHost('example.com');
98110
$this->catalogProductIndex->open();
99111
$this->catalogProductIndex->getGridPageActionBlock()->addProduct('downloadable');
100112
$productBlockForm = $this->catalogProductNew->getProductForm();
101113
$productBlockForm->fill($product, null, $category);
102114
$this->catalogProductNew->getFormPageActions()->save();
103115
}
116+
117+
/**
118+
* Clean data after running test.
119+
*
120+
* @return void
121+
*/
122+
protected function tearDown()
123+
{
124+
$this->envWhitelist->removeHost('example.com');
125+
}
104126
}

dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/acceptance.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
</allow>
1414
<deny>
1515
<tag group="stable" value="no" />
16+
<tag group="mftf_migrated" value="yes" />
1617
</deny>
1718
</rule>
1819
<rule scope="variation">

0 commit comments

Comments
 (0)