-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/develop' into PR-4
- Loading branch information
Showing
122 changed files
with
2,136 additions
and
575 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
dev/tests/functional/tests/app/Magento/Backend/Test/Block/Cache/Grid.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
/** | ||
* Copyright © 2015 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Magento\Backend\Test\Block\Cache; | ||
|
||
use Magento\Backend\Test\Block\Widget\Grid as ParentGrid; | ||
|
||
/** | ||
* Backend Cache Management grid. | ||
*/ | ||
class Grid extends ParentGrid | ||
{ | ||
/** | ||
* Search for item and select it. | ||
* | ||
* @param array $filter | ||
* @return void | ||
* @throws \Exception | ||
*/ | ||
public function searchAndSelect(array $filter) | ||
{ | ||
$selectItem = $this->getRow($filter, false)->find($this->selectItem); | ||
if ($selectItem->isVisible()) { | ||
$selectItem->click(); | ||
} else { | ||
throw new \Exception('Searched item was not found.'); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
...onal/tests/app/Magento/Backend/Test/Constraint/AssertCacheIsRefreshableAndInvalidated.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?php | ||
/** | ||
* Copyright © 2015 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Magento\Backend\Test\Constraint; | ||
|
||
use Magento\Mtf\Constraint\AbstractConstraint; | ||
use Magento\Backend\Test\Page\Adminhtml\AdminCache; | ||
|
||
/** | ||
* Assert Cache is Invalidated and Refreshable. | ||
*/ | ||
class AssertCacheIsRefreshableAndInvalidated extends AbstractConstraint | ||
{ | ||
/** | ||
* Success message of refreshed cache. | ||
*/ | ||
const SUCCESS_MESSAGE = '%d cache type(s) refreshed.'; | ||
|
||
/** | ||
* Assert Cache is Invalidated and Refreshable. | ||
* | ||
* @param AdminCache $adminCache | ||
* @param array $cacheTags | ||
* @return void | ||
*/ | ||
public function processAssert(AdminCache $adminCache, $cacheTags) | ||
{ | ||
$items = []; | ||
foreach ($cacheTags as $cacheTag) { | ||
$items[] = [ | ||
'tags' => $cacheTag, | ||
'status' => 'Invalidated' | ||
]; | ||
} | ||
|
||
$adminCache->open(); | ||
$adminCache->getGridBlock()->massaction($items, 'Refresh'); | ||
|
||
\PHPUnit_Framework_Assert::assertEquals( | ||
sprintf(self::SUCCESS_MESSAGE, count($items)), | ||
$adminCache->getMessagesBlock()->getSuccessMessages(), | ||
'Cache is Invalid and refreshable.' | ||
); | ||
} | ||
|
||
/** | ||
* Returns a string representation of the object. | ||
* | ||
* @return string | ||
*/ | ||
public function toString() | ||
{ | ||
return 'Cache is not Invalid or not refreshable.'; | ||
} | ||
} |
Oops, something went wrong.