Skip to content

Commit 2ace5c4

Browse files
Pooja.ManralPooja.Manral
authored andcommitted
AC-11729::Magento_GraphQl execute headers processing even if the header value does not pass validation
1 parent ef4cdc9 commit 2ace5c4

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

dev/tests/api-functional/testsuite/Magento/GraphQl/PageCache/ProductInMultipleStoresCacheTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,13 @@ public function testProductFromSpecificAndDefaultStoreWithMultiCurrency()
219219
$productNameInFixtureStore = 'Product\'s Name in Fixture Store';
220220
$product->setName($productNameInFixtureStore)->setStoreId($storeId)->save();
221221

222+
// test cached response store + currency header with non existing currency, and no valid response, no cache
223+
$headerMap = ['Store' => $storeCodeFromFixture, 'Content-Currency' => 'SOMECURRENCY'];
224+
$this->expectExceptionMessage(
225+
'GraphQL response contains errors: Please correct the target currency'
226+
);
227+
$this->graphQlQuery($query, [], '', $headerMap);
228+
222229
// test store header only, query is cached at this point in EUR
223230
$headerMap = ['Store' => $storeCodeFromFixture];
224231
$response = $this->graphQlQuery($query, [], '', $headerMap);
@@ -302,12 +309,5 @@ public function testProductFromSpecificAndDefaultStoreWithMultiCurrency()
302309
$response['products']['items'][0]['price']['minimalPrice']['amount']['currency'],
303310
'Currency code USD in fixture store default is unexpected'
304311
);
305-
306-
// test cached response store + currency header with non existing currency, and no valid response, no cache
307-
$headerMap = ['Store' => $storeCodeFromFixture, 'Content-Currency' => 'SOMECURRENCY'];
308-
$this->expectExceptionMessage(
309-
'GraphQL response contains errors: Requested store is not found (fixture_second_store)'
310-
);
311-
$this->graphQlQuery($query, [], '', $headerMap);
312312
}
313313
}

0 commit comments

Comments
 (0)