Skip to content
This repository was archived by the owner on Dec 19, 2019. It is now read-only.

Commit 678bb29

Browse files
Merge branch 'develop' of github.com:magento/magento2ce into bugs
2 parents 0bd99ee + 4df438c commit 678bb29

Some content is hidden

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

43 files changed

+1205
-444
lines changed

app/design/adminhtml/Magento/backend/web/app/setup/styles/less/_setup.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
// Updater pages
9999
//@import '../../../updater/styles/less/pages/_common.less';
100100
//@import '../../../updater/styles/less/pages/_home.less';
101-
//@import '../../../updater/styles/less/pages/_component-manager.less';
101+
//@import '../../../updater/styles/less/pages/_extension-manager.less';
102102
//@import '../../../updater/styles/less/pages/_login.less';
103103

104104
//

app/design/adminhtml/Magento/backend/web/app/setup/styles/less/pages/_readiness-check.less

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,64 @@
6666
margin-top: .3rem;
6767
}
6868

69+
.extensions-information {
70+
margin-bottom: 5rem;
71+
72+
h3 {
73+
font-size: @base__font-size;
74+
margin-bottom: 1.3rem;
75+
}
76+
77+
.message {
78+
margin-bottom: @indent__m;
79+
80+
&:before {
81+
margin-top: 0;
82+
top: 1.8rem;
83+
}
84+
}
85+
86+
.extensions-container {
87+
padding: 0 @indent__base;
88+
}
89+
90+
.list {
91+
margin-bottom: @indent__s;
92+
93+
select {
94+
cursor: pointer;
95+
96+
&:disabled {
97+
background: @color-gray80;
98+
cursor: default;
99+
}
100+
}
101+
102+
.extension-delete {
103+
&:extend(.abs-action-delete all);
104+
font-size: 1.7rem;
105+
padding-top: 0;
106+
}
107+
}
108+
}
109+
110+
.delete-modal-wrap {
111+
padding: 0 4% @indent__xl;
112+
113+
h3 {
114+
.lib-font-size(34);
115+
display: inline-block;
116+
font-weight: @font-weight__light;
117+
margin: 0 0 @indent__base;
118+
padding: .9rem 0 0;
119+
vertical-align: top;
120+
}
121+
122+
.actions {
123+
padding: @indent__l 0 0;
124+
}
125+
}
126+
69127
//
70128
// Mobile
71129
// _____________________________________________

app/design/adminhtml/Magento/backend/web/app/updater/styles/less/components/_data-grid.less

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,26 @@
112112
}
113113
}
114114
}
115+
116+
&._tooltip {
117+
background: transparent;
118+
margin: 0px 0px 8px 5px;
119+
120+
a {
121+
width: 21px;
122+
123+
&:hover {
124+
text-decoration: none;
125+
}
126+
127+
&:before {
128+
color: @color-tertiary;
129+
content: @icon-help__content;
130+
font-family: @icons__font-family;
131+
font-size: @component-indicator__size;
132+
}
133+
}
134+
}
115135
}
116136

117137
.col-manager-item-name {

dev/tests/functional/tests/app/Magento/Setup/Test/Block/Extension/AbstractGrid.php

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ abstract class AbstractGrid extends Block
3636
*/
3737
protected $extensionName = "//*[contains(text(), '%s')]";
3838

39+
/**
40+
* Checkbox for select extension.
41+
*
42+
* @var string
43+
*/
44+
protected $extensionCheckbox = "//tr[td/*[contains(text(), '%s')]]//*[contains(@ng-checked, 'selectedExtension')]";
45+
3946
/**
4047
* Find Extension on the grid by name.
4148
*
@@ -85,4 +92,42 @@ protected function clickNextPageButton()
8592

8693
return false;
8794
}
95+
96+
/**
97+
* Select several extensions to install on grid.
98+
*
99+
* @param Extension[] $extensions
100+
* @return Extension[]
101+
*/
102+
public function selectSeveralExtensions(array $extensions)
103+
{
104+
while (true) {
105+
foreach ($extensions as $key => $extension) {
106+
if ($this->isExtensionOnGrid($extension->getExtensionName())) {
107+
$this->selectExtension($extension->getExtensionName());
108+
unset($extensions[$key]);
109+
}
110+
}
111+
112+
if (empty($extensions) || !$this->clickNextPageButton()) {
113+
break;
114+
}
115+
}
116+
117+
return $extensions;
118+
}
119+
120+
/**
121+
* Select extension on grid, check checkbox.
122+
*
123+
* @param string $extensionName
124+
* @return void
125+
*/
126+
protected function selectExtension($extensionName)
127+
{
128+
$this->_rootElement->find(
129+
sprintf($this->extensionCheckbox, $extensionName),
130+
Locator::SELECTOR_XPATH
131+
)->click();
132+
}
88133
}

dev/tests/functional/tests/app/Magento/Setup/Test/Block/Extension/Grid.php

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ class Grid extends AbstractGrid
2121
*/
2222
protected $installButton = "//button[contains(@class, 'goInstall')]";
2323

24+
/**
25+
* 'Review Updates' button that opens grid with extensions for update.
26+
*
27+
* @var string
28+
*/
29+
protected $updateButton = "//button[contains(@class, 'goUpdate')]";
30+
2431
/**
2532
* Select action of extension on the grid.
2633
*
@@ -80,6 +87,16 @@ public function clickInstallButton()
8087
$this->_rootElement->find($this->installButton, Locator::SELECTOR_XPATH)->click();
8188
}
8289

90+
/**
91+
* Click 'Review Updates' button.
92+
*
93+
* @return void
94+
*/
95+
public function clickUpdateButton()
96+
{
97+
$this->_rootElement->find($this->updateButton, Locator::SELECTOR_XPATH)->click();
98+
}
99+
83100
/**
84101
* Click to uninstall button.
85102
*
@@ -119,7 +136,7 @@ public function getVersion(Extension $extension)
119136
* @param Extension $extension
120137
* @return void
121138
*/
122-
public function clickUpdateButton(Extension $extension)
139+
public function clickUpdateActionButton(Extension $extension)
123140
{
124141
$this->clickSelectActionButton($extension);
125142
$button = $this->_rootElement->find(
@@ -137,6 +154,8 @@ public function clickUpdateButton(Extension $extension)
137154
*/
138155
public function findExtensionOnGrid(Extension $extension)
139156
{
157+
sleep(3);
158+
140159
$this->_rootElement->waitUntil(
141160
function () {
142161
$message = $this->_rootElement->find($this->notFoundMessage)->isVisible();

dev/tests/functional/tests/app/Magento/Setup/Test/Block/Extension/InstallGrid.php

Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class InstallGrid extends AbstractGrid
1616
{
1717
/**
1818
* "Install" button of extension.
19-
*
19+
*
2020
* @var string
2121
*/
2222
protected $extensionInstall = "//tr[td/*[contains(text(), '%s')]]//*[contains(@class, 'action-wrap')]//button";
@@ -28,13 +28,6 @@ class InstallGrid extends AbstractGrid
2828
*/
2929
protected $extensionSelectVersion = "//tr[td/*[contains(text(), '%s')]]//*[contains(@id, 'selectedVersion')]";
3030

31-
/**
32-
* Checkbox for select extension.
33-
*
34-
* @var string
35-
*/
36-
protected $extensionCheckbox = "//tr[td/*[contains(text(), '%s')]]//*[contains(@ng-checked, 'selectedExtension')]";
37-
3831
/**
3932
* "Install All" button.
4033
*
@@ -75,42 +68,4 @@ public function clickInstallAll()
7568
{
7669
$this->_rootElement->find($this->installAllButton, Locator::SELECTOR_CSS)->click();
7770
}
78-
79-
/**
80-
* Select several extensions to install on grid.
81-
*
82-
* @param Extension[] $extensions
83-
* @return Extension[]
84-
*/
85-
public function selectSeveralExtensions(array $extensions)
86-
{
87-
while (true) {
88-
foreach ($extensions as $key => $extension) {
89-
if ($this->isExtensionOnGrid($extension->getExtensionName())) {
90-
$this->selectExtension($extension->getExtensionName());
91-
unset($extensions[$key]);
92-
}
93-
}
94-
95-
if (empty($extensions) || !$this->clickNextPageButton()) {
96-
break;
97-
}
98-
}
99-
100-
return $extensions;
101-
}
102-
103-
/**
104-
* Select extension on grid, check checkbox.
105-
*
106-
* @param string $extensionName
107-
* @return void
108-
*/
109-
protected function selectExtension($extensionName)
110-
{
111-
$this->_rootElement->find(
112-
sprintf($this->extensionCheckbox, $extensionName),
113-
Locator::SELECTOR_XPATH
114-
)->click();
115-
}
11671
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?php
2+
/**
3+
* Copyright © 2016 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
namespace Magento\Setup\Test\Block\Extension;
7+
8+
use Magento\Mtf\Client\Locator;
9+
use Magento\Setup\Test\Fixture\Extension;
10+
11+
/**
12+
* Class UpdateGrid
13+
*
14+
* Grid with extension updates.
15+
*/
16+
class UpdateGrid extends AbstractGrid
17+
{
18+
/**
19+
* 'Update All' button.
20+
*
21+
* @var string
22+
*/
23+
protected $updateAllButton = "[ng-click*='updateAll']";
24+
25+
/**
26+
* Grid that contains the list of extensions.
27+
*
28+
* @var string
29+
*/
30+
protected $dataGrid = '#updateExtensionGrid';
31+
32+
/**
33+
* Click to update all button.
34+
*
35+
* @return void
36+
*/
37+
public function clickUpdateAllButton()
38+
{
39+
$this->_rootElement->find($this->updateAllButton, Locator::SELECTOR_CSS)->click();
40+
}
41+
}

dev/tests/functional/tests/app/Magento/Setup/Test/Block/Readiness.php

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
use Magento\Mtf\Block\Block;
1010
use Magento\Mtf\Client\Locator;
11+
use Magento\Setup\Test\Fixture\Extension;
1112

1213
/**
1314
* Readiness block.
@@ -28,6 +29,34 @@ class Readiness extends Block
2829
*/
2930
protected $next = "[ng-click*='next']";
3031

32+
/**
33+
* 'Try Again' button.
34+
*
35+
* @var string
36+
*/
37+
protected $tryAgain = "[ng-click*='forceReload']";
38+
39+
/**
40+
* Trash Bin icon.
41+
*
42+
* @var string
43+
*/
44+
protected $removeExtension = '//li[contains(text(), \'%s\')]//button';
45+
46+
/**
47+
* Remove button on modal.
48+
*
49+
* @var string
50+
*/
51+
protected $removeExtensionButtonOnModal = "[ng-click*='removeExtension']";
52+
53+
/**
54+
* Remove popup modal.
55+
*
56+
* @var string
57+
*/
58+
protected $popupRemoveModal = '.modal-popup';
59+
3160
/**
3261
* 'Completed!' message.
3362
* [ng-switch-when="true"]
@@ -98,6 +127,41 @@ public function clickNext()
98127
$this->_rootElement->find($this->next, Locator::SELECTOR_CSS)->click();
99128
}
100129

130+
/**
131+
* Click on 'Try Again' button.
132+
*
133+
* @return void
134+
*/
135+
public function clickTryAgain()
136+
{
137+
$this->_rootElement->find($this->tryAgain, Locator::SELECTOR_CSS)->click();
138+
$this->waitForElementVisible($this->completedMessage, Locator::SELECTOR_CSS);
139+
}
140+
141+
/**
142+
* Click Trash Bin icon.
143+
*
144+
* @param Extension $extension
145+
* @return void
146+
*/
147+
public function clickRemoveExtension(Extension $extension)
148+
{
149+
$removeExtension = sprintf($this->removeExtension, $extension->getExtensionName());
150+
151+
$this->_rootElement->find($removeExtension, Locator::SELECTOR_XPATH)->click();
152+
}
153+
154+
/**
155+
* Click Remove button on modal.
156+
*
157+
* @return void
158+
*/
159+
public function clickRemoveExtensionOnModal()
160+
{
161+
$this->_rootElement->find($this->removeExtensionButtonOnModal, Locator::SELECTOR_CSS)->click();
162+
$this->waitForElementNotVisible($this->popupRemoveModal, Locator::SELECTOR_CSS);
163+
}
164+
101165
/**
102166
* Get Updater application check result.
103167
*

0 commit comments

Comments
 (0)