Skip to content

Commit 3d97b22

Browse files
author
Oleg Zinoviev
committed
MAGETWO-32302: Create New Order
- Fixed tests
1 parent 6be12b9 commit 3d97b22

File tree

6 files changed

+14
-15
lines changed
  • app
    • code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset
    • design/adminhtml/Magento/backend/Magento_Sales/web/css/source/module
  • dev/tests
    • functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order
    • integration/testsuite/Magento
  • lib/internal/Magento/Framework/Data/Form/Element

6 files changed

+14
-15
lines changed

app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/qty.phtml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,9 @@
1313
<fieldset id="product_composite_configure_fields_qty"
1414
class="fieldset product-composite-qty-block admin__fieldset <?php echo $block->getIsLastFieldset() ? 'last-fieldset' : '' ?>">
1515
<div class="field admin__field">
16-
<label class="label admin__field-label">
17-
<span><?php echo __('Quantity') ?></span>
18-
</label>
16+
<label class="label admin__field-label"><span><?php echo __('Quantity') ?></span></label>
1917
<div class="control admin__field-control">
20-
<input id="product_composite_configure_input_qty"
21-
class="input-text admin__control-text qty"
22-
type="text"
23-
name="qty"
24-
value="<?php echo $block->getQtyValue() * 1 ?>" />
18+
<input id="product_composite_configure_input_qty" class="input-text admin__control-text qty" type="text" name="qty" value="<?php echo $block->getQtyValue() * 1 ?>">
2519
</div>
2620
</div>
2721
</fieldset>

app/design/adminhtml/Magento/backend/Magento_Sales/web/css/source/module/_order-create.less

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,11 @@
130130
.action-configure {
131131
float: right;
132132
}
133+
.col-id,
134+
.col-price,
135+
.col-in_products {
136+
width: 10rem;
137+
}
133138
}
134139
}
135140

dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class Create extends Block
8585
*
8686
* @var string
8787
*/
88-
protected $updateItems = '#order-items_grid p button';
88+
protected $updateItems = '#order-items_grid button[onclick="order.itemsUpdate()"]';
8989

9090
/**
9191
* 'Add Selected Product(s) to Order' button.

dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/Cart/Product/Composite/CartTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function testConfigureAction()
5858
$this->getRequest()->setParam('id', $itemId);
5959
$this->dispatch('backend/customer/cart_product_composite_cart/configure');
6060
$this->assertContains(
61-
'<input id="product_composite_configure_input_qty" class="input-text admin__control-text"'
61+
'<input id="product_composite_configure_input_qty" class="input-text admin__control-text qty"'
6262
. ' type="text" name="qty" value="1">',
6363
$this->getResponse()->getBody()
6464
);

dev/tests/integration/testsuite/Magento/Sales/Controller/Adminhtml/Order/CreateTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ public function testConfigureProductToAddAction()
152152
$body = $this->getResponse()->getBody();
153153

154154
$this->assertNotEmpty($body);
155-
$this->assertContains('>Quantity</label>', $body);
155+
$this->assertContains('><span>Quantity</span></label>', $body);
156156
$this->assertContains('>Test Configurable</label>', $body);
157157
$this->assertContains('"code":"test_configurable","label":"Test Configurable"', $body);
158158
$this->assertContains('"productId":"1"', $body);

lib/internal/Magento/Framework/Data/Form/Element/AbstractElement.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -415,10 +415,10 @@ public function getLabelHtml($idSuffix = '')
415415
if ($this->getLabel() !== null) {
416416
$html = '<label class="label admin__field-label" for="' .
417417
$this->getHtmlId() . $idSuffix . '"' . $this->_getUiId(
418-
'label'
419-
) . '><span>' . $this->_escape(
420-
$this->getLabel()
421-
) . '</span></label>' . "\n";
418+
'label'
419+
) . '><span>' . $this->_escape(
420+
$this->getLabel()
421+
) . '</span></label>' . "\n";
422422
} else {
423423
$html = '';
424424
}

0 commit comments

Comments
 (0)