Skip to content

Commit

Permalink
Moved test for autocomplete_on_storefront to separate file
Browse files Browse the repository at this point in the history
  • Loading branch information
Usik2203 committed Apr 29, 2020
1 parent 7820046 commit d363a5d
Showing 2 changed files with 38 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -223,25 +223,6 @@ public function testPasswordResetForLockCustomer()
$this->graphQlMutation($query);
}

/**
* Check type of autocomplete_on_storefront storeConfig value
*
* @throws Exception
*/
public function testReturnTypeAutocompleteOnStorefrontConfig()
{
$query = <<<QUERY
{
storeConfig {
autocomplete_on_storefront
}
}
QUERY;
$response = $this->graphQlQuery($query);
self::assertArrayHasKey('autocomplete_on_storefront', $response['storeConfig']);
self::assertInternalType('bool',$response['storeConfig']['autocomplete_on_storefront']);
}

/**
* Get reset password token
*
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\GraphQl\Customer;

use Exception;
use Magento\TestFramework\TestCase\GraphQlAbstract;

/**
* Class for Store Config customers settings
*/
class StoreConfigTest extends GraphQlAbstract
{
/**
* Check type of autocomplete_on_storefront storeConfig value
*
* @magentoConfigFixture default_store customer/password/autocomplete_on_storefront 1
*
* @throws Exception
*/
public function testReturnTypeAutocompleteOnStorefrontConfig()
{
$query = <<<QUERY
{
storeConfig {
autocomplete_on_storefront
}
}
QUERY;
$response = $this->graphQlQuery($query);
self::assertArrayHasKey('autocomplete_on_storefront', $response['storeConfig']);
self::assertTrue($response['storeConfig']['autocomplete_on_storefront']);
}
}

0 comments on commit d363a5d

Please sign in to comment.