Skip to content

Commit a1ddd82

Browse files
committed
ACP2E-636: Cannot get graphql customer token
1 parent e733d87 commit a1ddd82

File tree

2 files changed

+0
-119
lines changed

2 files changed

+0
-119
lines changed

dev/tests/api-functional/testsuite/Magento/GraphQl/LoginAsCustomerGraphQl/GenerateLoginCustomerTokenTest.php

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -62,34 +62,6 @@ public function testGenerateCustomerValidTokenLoginAsCustomerEnabled()
6262
$this->assertIsArray($response['generateCustomerTokenAsAdmin']);
6363
}
6464

65-
/**
66-
* Verify customer token as admin with store
67-
*
68-
* @magentoApiDataFixture Magento/LoginAsCustomer/_files/admin.php
69-
* @magentoConfigFixture admin_store login_as_customer/general/enabled 1
70-
* @magentoApiDataFixture Magento/LoginAsCustomer/_files/customer_with_second_store.php
71-
* @throws Exception
72-
*/
73-
public function testGenerateCustomerValidTokenAsAdminWithStore()
74-
{
75-
$customerEmail = '[email protected]';
76-
77-
$mutation = $this->getQuery($customerEmail);
78-
79-
$response = $this->graphQlMutation(
80-
$mutation,
81-
[],
82-
'',
83-
$this->getAdminHeaderAuthenticationWithStore(
84-
'TestAdmin1',
85-
\Magento\TestFramework\Bootstrap::ADMIN_PASSWORD,
86-
'fixture_second_store'
87-
)
88-
);
89-
$this->assertArrayHasKey('generateCustomerTokenAsAdmin', $response);
90-
$this->assertIsArray($response['generateCustomerTokenAsAdmin']);
91-
}
92-
9365
/**
9466
* Verify with Admin email ID and Magento_LoginAsCustomer::login is disabled
9567
*
@@ -252,28 +224,4 @@ private function getAdminHeaderAuthentication(string $userName, string $password
252224
);
253225
}
254226
}
255-
256-
/**
257-
* To get admin access token with store
258-
*
259-
* @param string $userName
260-
* @param string $password
261-
* @param string $storeCode
262-
* @return string[]
263-
* @throws AuthenticationException
264-
*/
265-
private function getAdminHeaderAuthenticationWithStore(string $userName, string $password, string $storeCode)
266-
{
267-
try {
268-
$adminAccessToken = $this->adminTokenService->createAdminAccessToken($userName, $password);
269-
return ['Authorization' => 'Bearer ' . $adminAccessToken, 'store' => $storeCode];
270-
} catch (\Exception $e) {
271-
throw new AuthenticationException(
272-
__(
273-
'The account sign-in was incorrect or your account is disabled temporarily. '
274-
. 'Please wait and try again later.'
275-
)
276-
);
277-
}
278-
}
279227
}

dev/tests/integration/testsuite/Magento/LoginAsCustomer/_files/customer_with_second_store.php

Lines changed: 0 additions & 67 deletions
This file was deleted.

0 commit comments

Comments
 (0)