Skip to content

Commit d0a033e

Browse files
committed
Add version 2.0.10
1 parent 7940c46 commit d0a033e

File tree

79 files changed

+3074
-418
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+3074
-418
lines changed

.php_cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ return Symfony\CS\Config\Config::create()
3333
'extra_empty_lines',
3434
'include',
3535
'join_function',
36-
'multiline_array_trailing_comma',
3736
'namespace_no_leading_whitespace',
3837
'new_with_braces',
3938
'object_operator',

app/bootstrap.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,17 @@
3535
$mask = file_exists($umaskFile) ? octdec(file_get_contents($umaskFile)) : 002;
3636
umask($mask);
3737

38+
if (empty($_SERVER['ENABLE_IIS_REWRITES']) || ($_SERVER['ENABLE_IIS_REWRITES'] != 1)) {
39+
/*
40+
* Unset headers used by IIS URL rewrites.
41+
*/
42+
unset($_SERVER['HTTP_X_REWRITE_URL']);
43+
unset($_SERVER['HTTP_X_ORIGINAL_URL']);
44+
unset($_SERVER['IIS_WasUrlRewritten']);
45+
unset($_SERVER['UNENCODED_URL']);
46+
unset($_SERVER['ORIG_PATH_INFO']);
47+
}
48+
3849
if (!empty($_SERVER['MAGE_PROFILER'])
3950
&& isset($_SERVER['HTTP_ACCEPT'])
4051
&& strpos($_SERVER['HTTP_ACCEPT'], 'text/html') !== false

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/project-community-edition",
33
"description": "eCommerce Platform for Growth (Community Edition)",
44
"type": "project",
5-
"version": "2.0.9",
5+
"version": "2.0.10",
66
"license": [
77
"OSL-3.0",
88
"AFL-3.0"
@@ -14,7 +14,7 @@
1414
}
1515
],
1616
"require": {
17-
"magento/product-community-edition": "2.0.9",
17+
"magento/product-community-edition": "2.0.10",
1818
"composer/composer": "@alpha"
1919
},
2020
"require-dev": {

composer.lock

Lines changed: 157 additions & 148 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
<?php
2+
/**
3+
* Copyright © 2016 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
namespace Magento\Sales\Service\V1;
7+
8+
/**
9+
* API test for creation of Invoice for certain Order.
10+
*/
11+
class OrderInvoiceCreateTest extends \Magento\TestFramework\TestCase\WebapiAbstract
12+
{
13+
const SERVICE_READ_NAME = 'salesInvoiceOrderV1';
14+
const SERVICE_VERSION = 'V1';
15+
16+
/**
17+
* @var \Magento\Framework\ObjectManagerInterface
18+
*/
19+
private $objectManager;
20+
21+
/**
22+
* @var \Magento\Sales\Api\InvoiceRepositoryInterface
23+
*/
24+
private $invoiceRepository;
25+
26+
protected function setUp()
27+
{
28+
$this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
29+
30+
$this->invoiceRepository = $this->objectManager->get(
31+
\Magento\Sales\Api\InvoiceRepositoryInterface::class
32+
);
33+
}
34+
35+
/**
36+
* @magentoApiDataFixture Magento/Sales/_files/order_new.php
37+
*/
38+
public function testInvoiceCreate()
39+
{
40+
/** @var \Magento\Sales\Model\Order $existingOrder */
41+
$existingOrder = $this->objectManager->create(\Magento\Sales\Model\Order::class)
42+
->loadByIncrementId('100000001');
43+
44+
$serviceInfo = [
45+
'rest' => [
46+
'resourcePath' => '/V1/order/' . $existingOrder->getId() . '/invoice',
47+
'httpMethod' => \Magento\Framework\Webapi\Rest\Request::HTTP_METHOD_POST
48+
],
49+
'soap' => [
50+
'service' => self::SERVICE_READ_NAME,
51+
'serviceVersion' => self::SERVICE_VERSION,
52+
'operation' => self::SERVICE_READ_NAME . 'execute'
53+
]
54+
];
55+
56+
$requestData = [
57+
'orderId' => $existingOrder->getId(),
58+
'items' => [],
59+
'comment' => [
60+
'comment' => 'Test Comment',
61+
'is_visible_on_front' => 1
62+
]
63+
];
64+
65+
/** @var \Magento\Sales\Api\Data\OrderItemInterface $item */
66+
foreach ($existingOrder->getAllItems() as $item) {
67+
$requestData['items'][] = [
68+
'order_item_id' => $item->getItemId(),
69+
'qty' => $item->getQtyOrdered()
70+
];
71+
}
72+
73+
$result = $this->_webApiCall($serviceInfo, $requestData);
74+
75+
$this->assertNotEmpty($result);
76+
77+
try {
78+
$this->invoiceRepository->get($result);
79+
} catch (\Magento\Framework\Exception\NoSuchEntityException $e) {
80+
$this->fail('Failed asserting that Invoice was created');
81+
}
82+
83+
/** @var \Magento\Sales\Model\Order $updatedOrder */
84+
$updatedOrder = $this->objectManager->create(\Magento\Sales\Model\Order::class)
85+
->loadByIncrementId('100000001');
86+
87+
$this->assertNotEquals(
88+
$existingOrder->getStatus(),
89+
$updatedOrder->getStatus(),
90+
'Failed asserting that Order status was changed'
91+
);
92+
}
93+
}
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
<?php
2+
/**
3+
* Copyright © 2016 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
namespace Magento\Sales\Service\V1;
7+
8+
/**
9+
* API test for creation of Shipment for certain Order.
10+
*/
11+
class ShipOrderTest extends \Magento\TestFramework\TestCase\WebapiAbstract
12+
{
13+
const SERVICE_READ_NAME = 'salesShipOrderV1';
14+
const SERVICE_VERSION = 'V1';
15+
16+
/**
17+
* @var \Magento\Framework\ObjectManagerInterface
18+
*/
19+
private $objectManager;
20+
21+
/**
22+
* @var \Magento\Sales\Api\ShipmentRepositoryInterface
23+
*/
24+
private $shipmentRepository;
25+
26+
protected function setUp()
27+
{
28+
$this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
29+
30+
$this->shipmentRepository = $this->objectManager->get(
31+
\Magento\Sales\Api\ShipmentRepositoryInterface::class
32+
);
33+
}
34+
35+
/**
36+
* @magentoApiDataFixture Magento/Sales/_files/order_new.php
37+
*/
38+
public function testShipOrder()
39+
{
40+
/** @var \Magento\Sales\Model\Order $existingOrder */
41+
$existingOrder = $this->objectManager->create(\Magento\Sales\Model\Order::class)
42+
->loadByIncrementId('100000001');
43+
44+
$serviceInfo = [
45+
'rest' => [
46+
'resourcePath' => '/V1/order/' . $existingOrder->getId() . '/ship',
47+
'httpMethod' => \Magento\Framework\Webapi\Rest\Request::HTTP_METHOD_POST,
48+
],
49+
'soap' => [
50+
'service' => self::SERVICE_READ_NAME,
51+
'serviceVersion' => self::SERVICE_VERSION,
52+
'operation' => self::SERVICE_READ_NAME . 'execute',
53+
],
54+
];
55+
56+
$requestData = [
57+
'orderId' => $existingOrder->getId(),
58+
'items' => [],
59+
'comment' => [
60+
'comment' => 'Test Comment',
61+
'is_visible_on_front' => 1,
62+
],
63+
'tracks' => [
64+
[
65+
'track_number' => 'TEST_TRACK_0001',
66+
'title' => 'Simple shipment track',
67+
'carrier_code' => 'UPS'
68+
]
69+
]
70+
];
71+
72+
/** @var \Magento\Sales\Api\Data\OrderItemInterface $item */
73+
foreach ($existingOrder->getAllItems() as $item) {
74+
$requestData['items'][] = [
75+
'order_item_id' => $item->getItemId(),
76+
'qty' => $item->getQtyOrdered(),
77+
];
78+
}
79+
80+
$result = $this->_webApiCall($serviceInfo, $requestData);
81+
82+
$this->assertNotEmpty($result);
83+
84+
try {
85+
$this->shipmentRepository->get($result);
86+
} catch (\Magento\Framework\Exception\NoSuchEntityException $e) {
87+
$this->fail('Failed asserting that Shipment was created');
88+
}
89+
90+
/** @var \Magento\Sales\Model\Order $updatedOrder */
91+
$updatedOrder = $this->objectManager->create(\Magento\Sales\Model\Order::class)
92+
->loadByIncrementId('100000001');
93+
94+
$this->assertNotEquals(
95+
$existingOrder->getStatus(),
96+
$updatedOrder->getStatus(),
97+
'Failed asserting that Order status was changed'
98+
);
99+
}
100+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
/**
3+
* Copyright © 2016 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\Mtf\Client\Element;
8+
9+
use Magento\Mtf\Client\Locator;
10+
11+
/**
12+
* Custom checkbox that hidden by label
13+
*/
14+
class CheckboxwithlabelElement extends CheckboxElement
15+
{
16+
/**
17+
* Set checkbox value by clicking on label
18+
*
19+
* @param string $value
20+
*/
21+
public function setValue($value)
22+
{
23+
$this->eventManager->dispatchEvent(['set_value'], [__METHOD__, $this->getAbsoluteSelector()]);
24+
if (($this->isSelected() && $value == 'No') || (!$this->isSelected() && $value == 'Yes')) {
25+
$this->find('./following-sibling::label', Locator::SELECTOR_XPATH)->click();
26+
}
27+
}
28+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
/**
3+
* Copyright © 2016 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\Backend\Test\Block;
8+
9+
use Magento\Mtf\Block\Block;
10+
use Magento\Mtf\Client\Locator;
11+
12+
class Version extends Block
13+
{
14+
/**
15+
* @var string
16+
*/
17+
protected $backendVersion = 'magento-version';
18+
19+
/**
20+
* Returns dashboard application version
21+
*
22+
* @return string
23+
*/
24+
public function getVersion()
25+
{
26+
return $this->_rootElement->find($this->backendVersion, Locator::SELECTOR_CLASS_NAME)->getText();
27+
}
28+
}

dev/tests/functional/tests/app/Magento/Backend/Test/Page/Adminhtml/Dashboard.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@
1515
<block name="errorBlock" class="Magento\Backend\Test\Block\Page\Error" locator="[id='page:main-container']" strategy="css selector" />
1616
<block name="accessDeniedBlock" class="Magento\Backend\Test\Block\Denied" locator="#anchor-content" strategy="css selector" />
1717
<block name="systemMessageDialog" class="Magento\AdminNotification\Test\Block\System\Messages" locator='[role="dialog"].ui-popup-message' strategy="css selector" />
18+
<block name="applicationVersion" class="Magento\Backend\Test\Block\Version" locator="body" strategy="css selector" />
1819
</page>
1920
</config>
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<?php
2+
/**
3+
* Copyright © 2016 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\Upgrade\Test\Block;
8+
9+
use Magento\Mtf\Block\Form;
10+
use Magento\Mtf\Client\Element\SimpleElement;
11+
use Magento\Mtf\Client\Locator;
12+
use Magento\Mtf\Fixture\FixtureInterface;
13+
14+
/**
15+
* Perform Authentication block.
16+
*/
17+
class Authentication extends Form
18+
{
19+
/**
20+
* 'Save Config' button.
21+
*
22+
* @var string
23+
*/
24+
protected $save = "[ng-click*='saveAuthJson']";
25+
26+
/**
27+
* First field selector
28+
*
29+
* @var string
30+
*/
31+
protected $firstField = '[name="username"]';
32+
33+
/**
34+
* Click on 'Save Config' button.
35+
*
36+
* @return void
37+
*/
38+
public function clickSaveConfig()
39+
{
40+
$this->_rootElement->find($this->save, Locator::SELECTOR_CSS)->click();
41+
}
42+
43+
/**
44+
* Ensure the form is loaded and fill the root form
45+
*
46+
* @param FixtureInterface $fixture
47+
* @param SimpleElement|null $element
48+
* @return $this
49+
*/
50+
public function fill(FixtureInterface $fixture, SimpleElement $element = null)
51+
{
52+
$this->waitForElementVisible($this->firstField);
53+
return parent::fill($fixture, $element);
54+
}
55+
}

0 commit comments

Comments
 (0)