From b381a5c7a6e4480ccce838109a373eccf4de2805 Mon Sep 17 00:00:00 2001 From: Anurag Date: Fri, 12 Apr 2024 09:42:06 +0530 Subject: [PATCH 1/4] Added HongKong to countries.php --- app/config/locale/countries.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/config/locale/countries.php b/app/config/locale/countries.php index 6dc5c6348..33673cdc9 100644 --- a/app/config/locale/countries.php +++ b/app/config/locale/countries.php @@ -73,6 +73,7 @@ return [ 'GD', 'GT', 'GY', + 'HK', 'HN', 'HR', 'HT', From ed65c3809cbfb2d1fd2de61889979e42d75611a6 Mon Sep 17 00:00:00 2001 From: Anurag Date: Tue, 16 Apr 2024 00:16:00 +0530 Subject: [PATCH 2/4] Updated BatchTest for GraphQL --- tests/e2e/Services/GraphQL/BatchTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/Services/GraphQL/BatchTest.php b/tests/e2e/Services/GraphQL/BatchTest.php index 1449c33be..0abcd2a11 100644 --- a/tests/e2e/Services/GraphQL/BatchTest.php +++ b/tests/e2e/Services/GraphQL/BatchTest.php @@ -33,7 +33,7 @@ class BatchTest extends Scope $this->assertArrayNotHasKey('errors', $response['body'][1]); $this->assertArrayHasKey('localeListCountries', $response['body'][0]['data']); $this->assertArrayHasKey('localeListContinents', $response['body'][1]['data']); - $this->assertEquals(195, $response['body'][0]['data']['localeListCountries']['total']); + $this->assertEquals(196, $response['body'][0]['data']['localeListCountries']['total']); $this->assertEquals(7, $response['body'][1]['data']['localeListContinents']['total']); } From 69a342c3cb27049bb47165e41f488d14308147fc Mon Sep 17 00:00:00 2001 From: Anurag Date: Tue, 16 Apr 2024 00:34:36 +0530 Subject: [PATCH 3/4] Updated Tests --- tests/e2e/Services/GraphQL/BatchTest.php | 14 +++++++------- tests/e2e/Services/GraphQL/ContentTypeTest.php | 8 ++++---- tests/e2e/Services/Locale/LocaleBase.php | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/e2e/Services/GraphQL/BatchTest.php b/tests/e2e/Services/GraphQL/BatchTest.php index 0abcd2a11..6f5e945c3 100644 --- a/tests/e2e/Services/GraphQL/BatchTest.php +++ b/tests/e2e/Services/GraphQL/BatchTest.php @@ -56,8 +56,8 @@ class BatchTest extends Scope $this->assertArrayNotHasKey('errors', $response['body'][1]); $this->assertArrayHasKey('localeListCountries', $response['body'][0]['data']); $this->assertArrayHasKey('localeListCountries', $response['body'][1]['data']); - $this->assertEquals(195, $response['body'][0]['data']['localeListCountries']['total']); - $this->assertEquals(195, $response['body'][1]['data']['localeListCountries']['total']); + $this->assertEquals(196, $response['body'][0]['data']['localeListCountries']['total']); + $this->assertEquals(196, $response['body'][1]['data']['localeListCountries']['total']); } public function testArrayBatchedMutations() @@ -184,7 +184,7 @@ class BatchTest extends Scope $this->assertArrayHasKey('localeListCountries', $response['body'][0]['data']); $this->assertArrayHasKey('localeListContinents', $response['body'][1]['data']); $this->assertArrayHasKey('accountCreate', $response['body'][2]['data']); - $this->assertEquals(195, $response['body'][0]['data']['localeListCountries']['total']); + $this->assertEquals(196, $response['body'][0]['data']['localeListCountries']['total']); $this->assertEquals(7, $response['body'][1]['data']['localeListContinents']['total']); $this->assertEquals('Tester 1', $response['body'][2]['data']['accountCreate']['name']); } @@ -225,8 +225,8 @@ class BatchTest extends Scope $this->assertArrayHasKey('localeListCountries', $response['body'][0]['data']); $this->assertArrayHasKey('localeListCountries', $response['body'][1]['data']); $this->assertArrayHasKey('accountCreate', $response['body'][2]['data']); - $this->assertEquals(195, $response['body'][0]['data']['localeListCountries']['total']); - $this->assertEquals(195, $response['body'][1]['data']['localeListCountries']['total']); + $this->assertEquals(196, $response['body'][0]['data']['localeListCountries']['total']); + $this->assertEquals(196, $response['body'][1]['data']['localeListCountries']['total']); $this->assertArrayHasKey('_id', $response['body'][2]['data']['accountCreate']); } @@ -251,7 +251,7 @@ class BatchTest extends Scope $this->assertArrayNotHasKey('errors', $response['body']); $this->assertArrayHasKey('localeListCountries', $response['body']['data']); $this->assertArrayHasKey('localeListContinents', $response['body']['data']); - $this->assertEquals(195, $response['body']['data']['localeListCountries']['total']); + $this->assertEquals(196, $response['body']['data']['localeListCountries']['total']); $this->assertEquals(7, $response['body']['data']['localeListContinents']['total']); } @@ -275,7 +275,7 @@ class BatchTest extends Scope $this->assertIsArray($response['body']['data']); $this->assertArrayNotHasKey('errors', $response['body']); $this->assertArrayHasKey('localeListCountries', $response['body']['data']); - $this->assertEquals(195, $response['body']['data']['localeListCountries']['total']); + $this->assertEquals(196, $response['body']['data']['localeListCountries']['total']); } public function testQueryBatchedMutations() diff --git a/tests/e2e/Services/GraphQL/ContentTypeTest.php b/tests/e2e/Services/GraphQL/ContentTypeTest.php index 125836909..707dfbecf 100644 --- a/tests/e2e/Services/GraphQL/ContentTypeTest.php +++ b/tests/e2e/Services/GraphQL/ContentTypeTest.php @@ -30,7 +30,7 @@ class ContentTypeTest extends Scope $this->assertIsArray($response['body']['data']); $this->assertArrayNotHasKey('errors', $response['body']); $response = $response['body']['data']['localeListCountries']; - $this->assertEquals(195, $response['total']); + $this->assertEquals(196, $response['total']); } public function testSingleQueryJSONContentType() @@ -46,7 +46,7 @@ class ContentTypeTest extends Scope $this->assertIsArray($response['body']['data']); $this->assertArrayNotHasKey('errors', $response['body']); $response = $response['body']['data']['localeListCountries']; - $this->assertEquals(195, $response['total']); + $this->assertEquals(196, $response['total']); } public function testArrayBatchedJSONContentType() @@ -69,7 +69,7 @@ class ContentTypeTest extends Scope $this->assertArrayNotHasKey('errors', $response['body'][1]); $this->assertArrayHasKey('localeListCountries', $response['body'][0]['data']); $this->assertArrayHasKey('localeListContinents', $response['body'][1]['data']); - $this->assertEquals(195, $response['body'][0]['data']['localeListCountries']['total']); + $this->assertEquals(196, $response['body'][0]['data']['localeListCountries']['total']); $this->assertEquals(7, $response['body'][1]['data']['localeListContinents']['total']); } @@ -94,7 +94,7 @@ class ContentTypeTest extends Scope $this->assertArrayNotHasKey('errors', $response['body']); $this->assertArrayHasKey('localeListCountries', $response['body']['data']); $this->assertArrayHasKey('localeListContinents', $response['body']['data']); - $this->assertEquals(195, $response['body']['data']['localeListCountries']['total']); + $this->assertEquals(196, $response['body']['data']['localeListCountries']['total']); $this->assertEquals(7, $response['body']['data']['localeListContinents']['total']); } diff --git a/tests/e2e/Services/Locale/LocaleBase.php b/tests/e2e/Services/Locale/LocaleBase.php index c0485532b..8d280f0b2 100644 --- a/tests/e2e/Services/Locale/LocaleBase.php +++ b/tests/e2e/Services/Locale/LocaleBase.php @@ -45,7 +45,7 @@ trait LocaleBase $this->assertEquals($response['headers']['status-code'], 200); $this->assertIsArray($response['body']); - $this->assertEquals(195, $response['body']['total']); + $this->assertEquals(196, $response['body']['total']); $this->assertEquals($response['body']['countries'][0]['name'], 'Afghanistan'); $this->assertEquals($response['body']['countries'][0]['code'], 'AF'); @@ -59,7 +59,7 @@ trait LocaleBase $this->assertEquals($response['headers']['status-code'], 200); $this->assertIsArray($response['body']); - $this->assertEquals(195, $response['body']['total']); + $this->assertEquals(196, $response['body']['total']); $this->assertEquals($response['body']['countries'][0]['name'], 'Afganistán'); $this->assertEquals($response['body']['countries'][0]['code'], 'AF'); From c1eaacf1f96b382e8631ae540a934599bd8ca64d Mon Sep 17 00:00:00 2001 From: Anurag Date: Fri, 19 Apr 2024 09:51:25 +0530 Subject: [PATCH 4/4] Updated Locale E2E Service Test --- tests/e2e/Services/Locale/LocaleBase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/Services/Locale/LocaleBase.php b/tests/e2e/Services/Locale/LocaleBase.php index 8d280f0b2..beffa8796 100644 --- a/tests/e2e/Services/Locale/LocaleBase.php +++ b/tests/e2e/Services/Locale/LocaleBase.php @@ -247,7 +247,7 @@ trait LocaleBase } $this->assertEquals($response['headers']['status-code'], 200); - $this->assertEquals(195, $response['body']['total']); + $this->assertEquals(196, $response['body']['total']); $response = $this->client->call(Client::METHOD_GET, '/locale/continents', [ 'content-type' => 'application/json',