Skip to content

Commit e5324cb

Browse files
committed
Revert "#30218 Write api functional tests tests for getting and setting, new address without telephone."
This reverts commit 04c9e4a
1 parent 04c9e4a commit e5324cb

File tree

6 files changed

+273
-187
lines changed

6 files changed

+273
-187
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
/**
3+
* Magento console installer options for Web API functional tests. Are used in functional tests bootstrap.
4+
*
5+
* Copyright © Magento, Inc. All rights reserved.
6+
* See COPYING.txt for license details.
7+
*/
8+
return [
9+
'language' => 'en_US',
10+
'timezone' => 'America/Los_Angeles',
11+
'currency' => 'USD',
12+
'db-host' => 'localhost',
13+
'db-name' => 'magento_functional_tests',
14+
'db-user' => 'root',
15+
'db-password' => '',
16+
'backend-frontname' => 'backend',
17+
'base-url' => 'http://localhost/',
18+
'use-secure' => '0',
19+
'use-rewrites' => '0',
20+
'admin-lastname' => 'Admin',
21+
'admin-firstname' => 'Admin',
22+
'admin-email' => 'admin@example.com',
23+
'admin-user' => 'admin',
24+
'admin-password' => '123123q',
25+
'admin-use-security-key' => '0',
26+
/* PayPal has limitation for order number - 20 characters. 10 digits prefix + 8 digits number is good enough */
27+
'sales-order-increment-prefix' => time(),
28+
'session-save' => 'db',
29+
'cleanup-database' => true,
30+
];
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* PHPUnit configuration for REST web API functional tests.
5+
*
6+
* Copyright © Magento, Inc. All rights reserved.
7+
* See COPYING.txt for license details.
8+
*/
9+
-->
10+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
11+
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/9.1/phpunit.xsd"
12+
colors="true"
13+
columns="max"
14+
beStrictAboutTestsThatDoNotTestAnything="false"
15+
bootstrap="./framework/bootstrap.php"
16+
testSuiteLoaderClass="Magento\TestFramework\ApiSuiteLoader"
17+
testSuiteLoaderFile="framework/Magento/TestFramework/ApiSuiteLoader.php"
18+
>
19+
<!-- Test suites definition -->
20+
<testsuites>
21+
<testsuite name="Magento REST web API functional tests">
22+
<file>testsuite/Magento/WebApiTest.php</file>
23+
</testsuite>
24+
<testsuite name="Magento REST web API functional tests real suite">
25+
<directory>testsuite</directory>
26+
<directory>../../../app/code/*/*/Test/Api</directory>
27+
<exclude>testsuite/Magento/GraphQl</exclude>
28+
</testsuite>
29+
</testsuites>
30+
31+
<!-- PHP INI settings and constants definition -->
32+
<php>
33+
<includePath>./testsuite</includePath>
34+
<const name="TESTS_INSTALL_CONFIG_FILE" value="config/install-config-mysql.php"/>
35+
<const name="TESTS_GLOBAL_CONFIG_FILE" value="config/config-global.php"/>
36+
<!-- WebSerivice Type -->
37+
<const name="TESTS_WEB_API_ADAPTER" value="rest"/>
38+
<!-- Webserver URL -->
39+
<const name="TESTS_BASE_URL" value="http://magento.url"/>
40+
<!-- Webserver API user -->
41+
<const name="TESTS_WEBSERVICE_USER" value="admin"/>
42+
<!-- Webserver API key -->
43+
<const name="TESTS_WEBSERVICE_APIKEY" value="123123q"/>
44+
<!-- Define if debugger should be started using XDEBUG_SESSION cookie -->
45+
<const name="TESTS_XDEBUG_ENABLED" value="false"/>
46+
<!-- Define XDEBUG_SESSION cookie value-->
47+
<const name="TESTS_XDEBUG_SESSION" value="phpstorm" />
48+
<!--Generate documentation from REST tests and put it into var/log/rest-documentation directory-->
49+
<const name="GENERATE_REST_DOCUMENTATION" value="false" />
50+
51+
<ini name="date.timezone" value="America/Los_Angeles"/>
52+
53+
<!-- Semicolon-separated 'glob' patterns, that match global XML configuration files -->
54+
<const name="TESTS_GLOBAL_CONFIG_DIR" value="../../../app/etc"/>
55+
<!-- Whether to cleanup the application before running tests or not -->
56+
<const name="TESTS_CLEANUP" value="enabled"/>
57+
<!--Defines if Magento should be installed before tests execution-->
58+
<const name="TESTS_MAGENTO_INSTALLATION" value="disabled"/>
59+
<!-- Magento mode for tests execution. Possible values are "default", "developer" and "production". -->
60+
<const name="TESTS_MAGENTO_MODE" value="default"/>
61+
<const name="USE_OVERRIDE_CONFIG" value="enabled"/>
62+
</php>
63+
64+
<!-- Test listeners -->
65+
<listeners>
66+
<listener class="Magento\TestFramework\Event\PhpUnit"/>
67+
<listener class="Yandex\Allure\Adapter\AllureAdapter">
68+
<arguments>
69+
<string>var/allure-results</string> <!-- XML files output folder -->
70+
<boolean>true</boolean> <!-- Whether to delete previous results on rerun -->
71+
<array> <!-- A list of custom annotations to ignore (optional) -->
72+
<element key="codingStandardsIgnoreStart">
73+
<string>codingStandardsIgnoreStart</string>
74+
</element>
75+
<element key="codingStandardsIgnoreEnd">
76+
<string>codingStandardsIgnoreEnd</string>
77+
</element>
78+
<element key="expectedExceptionMessageRegExp">
79+
<string>expectedExceptionMessageRegExp</string>
80+
</element>
81+
<element key="magentoAdminConfigFixture">
82+
<string>magentoAdminConfigFixture</string>
83+
</element>
84+
<element key="magentoAppArea">
85+
<string>magentoAppArea</string>
86+
</element>
87+
<element key="magentoAppIsolation">
88+
<string>magentoAppIsolation</string>
89+
</element>
90+
<element key="magentoCache">
91+
<string>magentoCache</string>
92+
</element>
93+
<element key="magentoComponentsDir">
94+
<string>magentoComponentsDir</string>
95+
</element>
96+
<element key="magentoConfigFixture">
97+
<string>magentoConfigFixture</string>
98+
</element>
99+
<element key="magentoDataFixture">
100+
<string>magentoDataFixture</string>
101+
</element>
102+
<element key="magentoDataFixtureBeforeTransaction">
103+
<string>magentoDataFixtureBeforeTransaction</string>
104+
</element>
105+
<element key="magentoDbIsolation">
106+
<string>magentoDbIsolation</string>
107+
</element>
108+
<element key="magentoIndexerDimensionMode">
109+
<string>magentoIndexerDimensionMode</string>
110+
</element>
111+
<element key="magentoApiDataFixture">
112+
<string>magentoApiDataFixture</string>
113+
</element>
114+
<element key="Override">
115+
<string>Override</string>
116+
</element>
117+
</array>
118+
</arguments>
119+
</listener>
120+
</listeners>
121+
</phpunit>
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* PHPUnit configuration for SOAP web API functional tests.
5+
*
6+
* Copyright © Magento, Inc. All rights reserved.
7+
* See COPYING.txt for license details.
8+
*/
9+
-->
10+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
11+
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/9.1/phpunit.xsd"
12+
colors="true"
13+
columns="max"
14+
beStrictAboutTestsThatDoNotTestAnything="false"
15+
bootstrap="./framework/bootstrap.php"
16+
testSuiteLoaderClass="Magento\TestFramework\ApiSuiteLoader"
17+
testSuiteLoaderFile="framework/Magento/TestFramework/ApiSuiteLoader.php"
18+
>
19+
<!-- Test suites definition -->
20+
<testsuites>
21+
<testsuite name="Magento SOAP web API functional tests">
22+
<file>testsuite/Magento/WebApiTest.php</file>
23+
</testsuite>
24+
<testsuite name="Magento SOAP web API functional tests real suite">
25+
<directory>testsuite</directory>
26+
<!-- <exclude>testsuite/Magento/GraphQl</exclude> -->
27+
<directory>../../../app/code/*/*/Test/Api</directory>
28+
</testsuite>
29+
</testsuites>
30+
31+
<!-- PHP INI settings and constants definition -->
32+
<php>
33+
<includePath>./testsuite</includePath>
34+
<const name="TESTS_INSTALL_CONFIG_FILE" value="config/install-config-mysql.php"/>
35+
<const name="TESTS_GLOBAL_CONFIG_FILE" value="config/config-global.php"/>
36+
<!-- WebSerivice Type -->
37+
<const name="TESTS_WEB_API_ADAPTER" value="soap"/>
38+
<!-- Webserver URL -->
39+
<const name="TESTS_BASE_URL" value="http://magento.url"/>
40+
<!-- Webserver API user -->
41+
<const name="TESTS_WEBSERVICE_USER" value="admin"/>
42+
<!-- Webserver API key -->
43+
<const name="TESTS_WEBSERVICE_APIKEY" value="123123q"/>
44+
<!-- Define if debugger should be started using XDEBUG_SESSION cookie -->
45+
<const name="TESTS_XDEBUG_ENABLED" value="false"/>
46+
<!-- Define XDEBUG_SESSION cookie value-->
47+
<const name="TESTS_XDEBUG_SESSION" value="phpstorm" />
48+
49+
<ini name="date.timezone" value="America/Los_Angeles"/>
50+
<ini name="soap.wsdl_cache_enabled" value="0" />
51+
52+
<!-- Semicolon-separated 'glob' patterns, that match global XML configuration files -->
53+
<const name="TESTS_GLOBAL_CONFIG_DIR" value="../../../app/etc"/>
54+
<!-- Whether to cleanup the application before running tests or not -->
55+
<const name="TESTS_CLEANUP" value="enabled"/>
56+
<!--Defines if Magento should be installed before tests execution-->
57+
<const name="TESTS_MAGENTO_INSTALLATION" value="disabled"/>
58+
<!-- Magento mode for tests execution. Possible values are "default", "developer" and "production". -->
59+
<const name="TESTS_MAGENTO_MODE" value="default"/>
60+
<const name="USE_OVERRIDE_CONFIG" value="enabled"/>
61+
</php>
62+
63+
<!-- Test listeners -->
64+
<listeners>
65+
<listener class="Magento\TestFramework\Event\PhpUnit"/>
66+
<listener class="Yandex\Allure\Adapter\AllureAdapter">
67+
<arguments>
68+
<string>var/allure-results</string> <!-- XML files output folder -->
69+
<boolean>true</boolean> <!-- Whether to delete previous results on rerun -->
70+
<array> <!-- A list of custom annotations to ignore (optional) -->
71+
<element key="codingStandardsIgnoreStart">
72+
<string>codingStandardsIgnoreStart</string>
73+
</element>
74+
<element key="codingStandardsIgnoreEnd">
75+
<string>codingStandardsIgnoreEnd</string>
76+
</element>
77+
<element key="expectedExceptionMessageRegExp">
78+
<string>expectedExceptionMessageRegExp</string>
79+
</element>
80+
<element key="magentoAdminConfigFixture">
81+
<string>magentoAdminConfigFixture</string>
82+
</element>
83+
<element key="magentoAppArea">
84+
<string>magentoAppArea</string>
85+
</element>
86+
<element key="magentoAppIsolation">
87+
<string>magentoAppIsolation</string>
88+
</element>
89+
<element key="magentoCache">
90+
<string>magentoCache</string>
91+
</element>
92+
<element key="magentoComponentsDir">
93+
<string>magentoComponentsDir</string>
94+
</element>
95+
<element key="magentoConfigFixture">
96+
<string>magentoConfigFixture</string>
97+
</element>
98+
<element key="magentoDataFixture">
99+
<string>magentoDataFixture</string>
100+
</element>
101+
<element key="magentoDataFixtureBeforeTransaction">
102+
<string>magentoDataFixtureBeforeTransaction</string>
103+
</element>
104+
<element key="magentoDbIsolation">
105+
<string>magentoDbIsolation</string>
106+
</element>
107+
<element key="magentoIndexerDimensionMode">
108+
<string>magentoIndexerDimensionMode</string>
109+
</element>
110+
<element key="magentoApiDataFixture">
111+
<string>magentoApiDataFixture</string>
112+
</element>
113+
<element key="Override">
114+
<string>Override</string>
115+
</element>
116+
</array>
117+
</arguments>
118+
</listener>
119+
</listeners>
120+
</phpunit>

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

Lines changed: 2 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,13 @@ private function getQuery(string $maskedQuoteId): string
164164
company
165165
street
166166
city
167-
region
167+
region
168168
{
169169
code
170170
label
171171
}
172172
postcode
173-
country
173+
country
174174
{
175175
code
176176
label
@@ -195,44 +195,4 @@ private function getHeaderMap(string $username = 'customer@example.com', string
195195
$headerMap = ['Authorization' => 'Bearer ' . $customerToken];
196196
return $headerMap;
197197
}
198-
199-
/**
200-
* @magentoApiDataFixture Magento/Customer/_files/customer.php
201-
* @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php
202-
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php
203-
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php
204-
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_billing_address_without_telephone.php
205-
*/
206-
public function testGetSpecifiedBillingAddressWithoutTelephone()
207-
{
208-
$maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_quote');
209-
$query = $this->getQuery($maskedQuoteId);
210-
211-
$response = $this->graphQlQuery($query, [], '', $this->getHeaderMap());
212-
self::assertArrayHasKey('cart', $response);
213-
self::assertArrayHasKey('billing_address', $response['cart']);
214-
215-
$expectedBillingAddressData = [
216-
'firstname' => 'John',
217-
'lastname' => 'Smith',
218-
'company' => 'CompanyName',
219-
'street' => [
220-
'Green str, 67'
221-
],
222-
'city' => 'CityM',
223-
'region' => [
224-
'code' => 'AL',
225-
'label' => 'Alabama',
226-
],
227-
'postcode' => '75477',
228-
'country' => [
229-
'code' => 'US',
230-
'label' => 'US',
231-
],
232-
'telephone' => '',
233-
'__typename' => 'BillingCartAddress',
234-
'customer_notes' => null,
235-
];
236-
self::assertEquals($expectedBillingAddressData, $response['cart']['billing_address']);
237-
}
238198
}

0 commit comments

Comments
 (0)