Skip to content

Commit 0e5c82f

Browse files
committed
MC-22838: Required input type values validation does not work correctly
- Resolve remaining test issues
1 parent 0e6fb0e commit 0e5c82f

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public function testCreateCustomerAccountWithoutPassword()
114114

115115
/**
116116
* @expectedException \Exception
117-
* @expectedExceptionMessage Field CustomerInput.email of required type String! was not provided
117+
* @expectedExceptionMessage "input" value should be specified
118118
*/
119119
public function testCreateCustomerIfInputDataIsEmpty()
120120
{
@@ -140,7 +140,7 @@ public function testCreateCustomerIfInputDataIsEmpty()
140140

141141
/**
142142
* @expectedException \Exception
143-
* @expectedExceptionMessage Field CustomerInput.email of required type String! was not provided
143+
* @expectedExceptionMessage Required parameters are missing: Email
144144
*/
145145
public function testCreateCustomerIfEmailMissed()
146146
{

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,6 @@ public function testAddVirtualProductToCartIfCartIdIsEmpty()
109109

110110
/**
111111
* @magentoApiDataFixture Magento/Customer/_files/customer.php
112-
* @expectedException Exception
113-
* @expectedExceptionMessage Required parameter "cart_items" is missing
114112
*/
115113
public function testAddVirtualProductToCartIfCartItemsAreMissed()
116114
{
@@ -129,6 +127,11 @@ public function testAddVirtualProductToCartIfCartItemsAreMissed()
129127
}
130128
}
131129
QUERY;
130+
$this->expectException(\Exception::class);
131+
$this->expectExceptionMessage(
132+
'Field AddSimpleProductsToCartInput.cart_items of required type [SimpleProductCartItemInput]!'
133+
. ' was not provided.'
134+
);
132135

133136
$this->graphQlMutation($query, [], '', $this->getHeaderMap());
134137
}

0 commit comments

Comments
 (0)