@@ -25,7 +25,6 @@ class ShipOrderTest extends \Magento\TestFramework\TestCase\WebapiAbstract
25
25
26
26
protected function setUp ()
27
27
{
28
- $ this ->markTestIncomplete ('https://github.com/magento-engcom/msi/issues/1335 ' );
29
28
$ this ->objectManager = \Magento \TestFramework \Helper \Bootstrap::getObjectManager ();
30
29
31
30
$ this ->shipmentRepository = $ this ->objectManager ->get (
@@ -38,6 +37,7 @@ protected function setUp()
38
37
*/
39
38
public function testConfigurableShipOrder ()
40
39
{
40
+ $ this ->markTestIncomplete ('https://github.com/magento-engcom/msi/issues/1335 ' );
41
41
$ productsQuantity = 1 ;
42
42
43
43
/** @var \Magento\Sales\Model\Order $existingOrder */
@@ -132,6 +132,35 @@ public function testShipOrder()
132
132
);
133
133
}
134
134
135
+ /**
136
+ * Tests that not providing a tracking number produces the correct error. See MAGETWO-95429
137
+ * @expectedException \Exception
138
+ * @expectedExceptionMessageRegExp /Shipment Document Validation Error\(s\):(?:\n|\\n)Please enter a tracking number./
139
+ * @magentoApiDataFixture Magento/Sales/_files/order_new.php
140
+ */
141
+ public function testShipOrderWithoutTrackingNumberReturnsError ()
142
+ {
143
+ /** @var \Magento\Sales\Model\Order $existingOrder */
144
+ $ existingOrder = $ this ->objectManager ->create (\Magento \Sales \Model \Order::class)
145
+ ->loadByIncrementId ('100000001 ' );
146
+
147
+ $ requestData = [
148
+ 'orderId ' => $ existingOrder ->getId (),
149
+ 'comment ' => [
150
+ 'comment ' => 'Test Comment ' ,
151
+ 'is_visible_on_front ' => 1 ,
152
+ ],
153
+ 'tracks ' => [
154
+ [
155
+ 'title ' => 'Simple shipment track ' ,
156
+ 'carrier_code ' => 'UPS '
157
+ ]
158
+ ]
159
+ ];
160
+
161
+ $ this ->_webApiCall ($ this ->getServiceInfo ($ existingOrder ), $ requestData );
162
+ }
163
+
135
164
/**
136
165
* @magentoApiDataFixture Magento/Bundle/_files/order_with_bundle_shipped_separately.php
137
166
*/
0 commit comments