Skip to content

Commit 40ca1d4

Browse files
committed
B2B-2255: "Currency" GraphQl query has no cache identity
1 parent 3aff5b2 commit 40ca1d4

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

dev/tests/api-functional/framework/Magento/TestFramework/TestCase/GraphQlAbstract.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,4 +206,18 @@ protected function assertResponseFields($actualResponse, $assertionMap)
206206
);
207207
}
208208
}
209+
210+
/**
211+
* Tear down test and flush page cache
212+
*
213+
* @return void
214+
*/
215+
protected function tearDown(): void
216+
{
217+
parent::tearDown();
218+
$appDir = dirname(Bootstrap::getInstance()->getAppTempDir());
219+
$out = '';
220+
// phpcs:ignore Magento2.Security.InsecureFunction
221+
exec("php -f {$appDir}/bin/magento cache:flush full_page", $out);
222+
}
209223
}

dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CurrencyTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ class CurrencyTest extends GraphQlAbstract
2121
* test - base - main_website_store
2222
*
2323
* @magentoApiDataFixture Magento/Store/_files/store.php
24+
* @magentoConfigFixture default/currency/options/base USD
25+
* @magentoConfigFixture default/currency/options/default USD
26+
* @magentoConfigFixture default/currency/options/allow USD
2427
* @magentoConfigFixture test_store currency/options/base USD
2528
* @magentoConfigFixture test_store currency/options/default CNY
2629
* @magentoConfigFixture test_store currency/options/allow CNY,USD

0 commit comments

Comments
 (0)