Skip to content

Commit 3220c0f

Browse files
Merge remote-tracking branch '28761/graphql-storeConfig-customer-settings' into commpr-21755-0809
2 parents 9d9cbbe + 34c3cbe commit 3220c0f

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/StoreConfigTest.php

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2020 Adobe
4+
* All Rights Reserved.
55
*/
66
declare(strict_types=1);
77

@@ -17,24 +17,38 @@
1717
class StoreConfigTest extends GraphQlAbstract
1818
{
1919
/**
20-
* Check type of autocomplete_on_storefront storeConfig value
21-
*
2220
* @magentoConfigFixture default_store customer/password/autocomplete_on_storefront 1
21+
* @magentoConfigFixture default_store customer/password/minimum_password_length 6
22+
* @magentoConfigFixture default_store customer/password/required_character_classes_number 2
2323
*
2424
* @throws Exception
2525
*/
26-
public function testReturnTypeAutocompleteOnStorefrontConfig()
26+
public function testGetCustomerStoreConfig()
2727
{
28+
$minimumPasswordLength = 6;
29+
$requiredCharacterClassesNumber = 2;
30+
2831
$query = <<<QUERY
2932
{
3033
storeConfig {
3134
autocomplete_on_storefront
35+
minimum_password_length
36+
required_character_classes_number
3237
}
3338
}
3439
QUERY;
3540
$response = $this->graphQlQuery($query);
3641
self::assertArrayHasKey('autocomplete_on_storefront', $response['storeConfig']);
3742
self::assertTrue($response['storeConfig']['autocomplete_on_storefront']);
43+
44+
self::assertArrayHasKey('minimum_password_length', $response['storeConfig']);
45+
self::assertEquals($response['storeConfig']['minimum_password_length'], $minimumPasswordLength);
46+
47+
self::assertArrayHasKey('required_character_classes_number', $response['storeConfig']);
48+
self::assertEquals(
49+
$response['storeConfig']['required_character_classes_number'],
50+
$requiredCharacterClassesNumber
51+
);
3852
}
3953

4054
#[

0 commit comments

Comments
 (0)