-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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 'upstream/develop' into MAGETWO-58017-gi…
…thub-error-creating-configurable-products
- Loading branch information
Showing
38 changed files
with
912 additions
and
18 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
52 changes: 52 additions & 0 deletions
52
dev/tests/functional/tests/app/Magento/Cms/Test/Constraint/AssertCmsPageOnFrontend.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,52 @@ | ||
<?php | ||
/** | ||
* Copyright © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Magento\Cms\Test\Constraint; | ||
|
||
use Magento\Cms\Test\Fixture\CmsPage; | ||
use Magento\Cms\Test\Page\CmsPage as FrontCmsPage; | ||
use Magento\Mtf\Client\BrowserInterface; | ||
use Magento\Mtf\Constraint\AbstractConstraint; | ||
|
||
/** | ||
* Assert that created CMS page with expected contents displayed on Frontend. | ||
*/ | ||
class AssertCmsPageOnFrontend extends AbstractConstraint | ||
{ | ||
/** | ||
* Assert that created CMS page with expected contents displayed on Frontend. | ||
* | ||
* @param CmsPage $cms | ||
* @param FrontCmsPage $frontCmsPage, | ||
* @param BrowserInterface $browser | ||
* @param string $displayContent | ||
* @return void | ||
*/ | ||
public function processAssert( | ||
CmsPage $cms, | ||
FrontCmsPage $frontCmsPage, | ||
BrowserInterface $browser, | ||
$displayContent = null | ||
) { | ||
$browser->open($_ENV['app_frontend_url'] . $cms->getIdentifier()); | ||
$fixtureContent = $cms->getContent(); | ||
\PHPUnit_Framework_Assert::assertContains( | ||
$displayContent != null ? $displayContent : $fixtureContent['content'], | ||
$frontCmsPage->getCmsPageBlock()->getPageContent(), | ||
'Wrong content is displayed.' | ||
); | ||
} | ||
|
||
/** | ||
* CMS Page content equals to data from fixture. | ||
* | ||
* @return string | ||
*/ | ||
public function toString() | ||
{ | ||
return 'CMS Page content equals to data from fixture.'; | ||
} | ||
} |
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
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
Oops, something went wrong.