Skip to content

Commit 7fc1930

Browse files
committed
MC-39923: Stabilize Integration Tests (PageBuilder)
1 parent 77dc419 commit 7fc1930

File tree

3 files changed

+60
-11
lines changed

3 files changed

+60
-11
lines changed

dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/AbstractProductExportImportTestCase.php

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ protected function tearDown(): void
111111
* @param string[] $skippedAttributes
112112
* @return void
113113
* @dataProvider exportImportDataProvider
114+
* @throws \Magento\Framework\Exception\NoSuchEntityException
114115
*/
115116
public function testImportExport(array $fixtures, array $skus, array $skippedAttributes = []): void
116117
{
@@ -122,10 +123,37 @@ public function testImportExport(array $fixtures, array $skus, array $skippedAtt
122123
$csvFile = $this->executeExportTest($skus, $skippedAttributes);
123124

124125
$this->executeImportReplaceTest($skus, $skippedAttributes, false, $csvFile);
125-
$this->executeImportReplaceTest($skus, $skippedAttributes, true, $csvFile);
126126
$this->executeImportDeleteTest($skus, $csvFile);
127127
}
128128

129+
/**
130+
* @magentoAppArea adminhtml
131+
* @magentoDbIsolation disabled
132+
* @magentoAppIsolation enabled
133+
*
134+
* @param array $fixtures
135+
* @param string[] $skus
136+
* @param string[] $skippedAttributes
137+
* @dataProvider importReplaceDataProvider
138+
* @throws \Magento\Framework\Exception\NoSuchEntityException
139+
*/
140+
public function testImportReplaceWithPagination(array $fixtures, array $skus, array $skippedAttributes = []): void
141+
{
142+
$this->fixtures = $fixtures;
143+
$this->executeFixtures($fixtures);
144+
$this->modifyData($skus);
145+
$skippedAttributes = array_merge(self::$skippedAttributes, $skippedAttributes);
146+
$this->executeImportReplaceTest($skus, $skippedAttributes, true);
147+
}
148+
149+
/**
150+
* @return array
151+
*/
152+
public function importReplaceDataProvider()
153+
{
154+
return $this->exportImportDataProvider();
155+
}
156+
129157
/**
130158
* Provide data for import/export.
131159
*
@@ -220,7 +248,7 @@ private function assertEqualsOtherThanSkippedAttributes(
220248

221249
$this->assertEquals(
222250
$value,
223-
isset($actual[$key]) ? $actual[$key] : null,
251+
$actual[$key] ?? null,
224252
'Assert value at key - ' . $key . ' failed'
225253
);
226254
}

dev/tests/integration/testsuite/Magento/ConfigurableImportExport/Model/ConfigurableTest.php

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,19 @@ protected function assertEqualsSpecificAttributes(
100100
}
101101

102102
/**
103-
* @inheritdoc
103+
* @magentoAppArea adminhtml
104+
* @magentoDbIsolation disabled
105+
* @magentoAppIsolation enabled
106+
*
107+
* @param array $fixtures
108+
* @param string[] $skus
109+
* @param string[] $skippedAttributes
110+
* @dataProvider importReplaceDataProvider
111+
* @throws \Magento\Framework\Exception\NoSuchEntityException
104112
*/
105-
protected function executeImportReplaceTest(
106-
$skus,
107-
$skippedAttributes,
108-
$usePagination = false,
109-
string $csvfile = null
110-
) {
111-
$skippedAttributes = array_merge($skippedAttributes, ['_cache_instance_product_set_attributes']);
112-
parent::executeImportReplaceTest($skus, $skippedAttributes, $usePagination, $csvfile);
113+
public function testImportReplaceWithPagination(array $fixtures, array $skus, array $skippedAttributes = []): void
114+
{
115+
$skippedAttributesExtended = array_merge($skippedAttributes, ['_cache_instance_product_set_attributes']);
116+
parent::testImportReplaceWithPagination($fixtures, $skus, $skippedAttributesExtended);
113117
}
114118
}

dev/tests/integration/testsuite/Magento/DownloadableImportExport/Model/DownloadableTest.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,23 @@ public function testImportExport(array $fixtures, array $skus, array $skippedAtt
4949
parent::testImportExport($fixtures, $skus, $skippedAttributes);
5050
}
5151

52+
/**
53+
* @magentoAppArea adminhtml
54+
* @magentoDbIsolation enabled
55+
* @magentoAppIsolation enabled
56+
*
57+
* @param array $fixtures
58+
* @param string[] $skus
59+
* @param string[] $skippedAttributes
60+
* @dataProvider importReplaceDataProvider
61+
*
62+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
63+
*/
64+
public function testImportReplaceWithPagination(array $fixtures, array $skus, array $skippedAttributes = [])
65+
{
66+
$this->markTestSkipped('Uncomment after MAGETWO-38240 resolved');
67+
}
68+
5269
/**
5370
* @inheritdoc
5471
*/

0 commit comments

Comments
 (0)