forked from magento/graphql-ce
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into Fearless-Kiwis-MAGETWO-50123-Unable-to-as…
…sign-blank-value-to-attribute
- Loading branch information
Showing
18 changed files
with
464 additions
and
2 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
24 changes: 24 additions & 0 deletions
24
dev/tests/functional/tests/app/Magento/Config/Test/Block/System/Config/AdminForm.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,24 @@ | ||
<?php | ||
/** | ||
* Copyright © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
namespace Magento\Config\Test\Block\System\Config; | ||
|
||
use Magento\Mtf\Block\Form; | ||
use Magento\Mtf\Client\Locator; | ||
|
||
/** | ||
* Admin Security form in admin configurations. | ||
* | ||
* Locate Admin account sharing settings, see if its visible | ||
*/ | ||
class AdminForm extends Form | ||
{ | ||
private $adminAccountSharingField = '#admin_security_admin_account_sharing'; | ||
|
||
public function adminAccountSharingAvailability() | ||
{ | ||
return $this->_rootElement->find($this->adminAccountSharingField, Locator::SELECTOR_CSS)->isVisible(); | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
dev/tests/functional/tests/app/Magento/Config/Test/Constraint/AssertAdminAccountSharing.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,38 @@ | ||
<?php | ||
/** | ||
* Copyright © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Magento\Config\Test\Constraint; | ||
|
||
use Magento\Mtf\Constraint\AbstractConstraint; | ||
use Magento\Config\Test\Page\Adminhtml\AdminAccountSharing; | ||
|
||
/** | ||
* Assert Admin account sharing is available in Stores>Configuration>advanced>admin grid. | ||
*/ | ||
class AssertAdminAccountSharing extends AbstractConstraint | ||
{ | ||
/** | ||
* Assert Admin account sharing is available in Stores>Configuration>advanced>admin grid. | ||
* @param AdminAccountSharing $adminAccountSharing | ||
*/ | ||
public function processAssert(AdminAccountSharing $adminAccountSharing) | ||
{ | ||
\PHPUnit_Framework_Assert::assertTrue( | ||
$adminAccountSharing->getAdminForm()->adminAccountSharingAvailability(), | ||
'Admin Account Sharing Option is not available' | ||
); | ||
} | ||
|
||
/** | ||
* Returns a string representation of the object. | ||
* | ||
* @return string | ||
*/ | ||
public function toString() | ||
{ | ||
return 'Admin Account Sharing option is available and present in Stores>Configuration>Advanced>Admin Grid.'; | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
dev/tests/functional/tests/app/Magento/Config/Test/Page/Adminhtml/AdminAccountSharing.xml
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,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../vendor/magento/mtf/etc/pages.xsd"> | ||
<page name="AdminAccountSharing" area="Adminhtml" mca="admin/system_config/edit/section/admin/" module="Magento_Config"> | ||
<block name="adminForm" class="Magento\Config\Test\Block\System\Config\AdminForm" locator="[id='page:main-container']" strategy="css selector" /> | ||
</page> | ||
</config> |
55 changes: 55 additions & 0 deletions
55
...functional/tests/app/Magento/Config/Test/TestCase/VerifyAdminAccountSharingEntityTest.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,55 @@ | ||
<?php | ||
/** | ||
* Copyright © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Magento\Config\Test\TestCase; | ||
|
||
use Magento\Mtf\TestCase\Injectable; | ||
use Magento\Config\Test\Page\Adminhtml\AdminAccountSharing; | ||
|
||
/** | ||
* Steps: | ||
* 1. Log in to Admin. | ||
* 2. Go to Stores>Configuration>Advanced>admin>Security. | ||
* 3. * 7. Verify admin Acoount Sharing option availability. | ||
* | ||
* @group Config_(PS) | ||
* @ZephyrId MAGETWO-47822 | ||
*/ | ||
class VerifyAdminAccountSharingEntityTest extends Injectable | ||
{ | ||
/* tags */ | ||
const MVP = 'yes'; | ||
const DOMAIN = 'PS'; | ||
const TEST_TYPE = 'extended_acceptance_test'; | ||
/* end tags */ | ||
|
||
/** | ||
* Admin account settings page. | ||
* | ||
* @var adminAccountSharing | ||
*/ | ||
private $adminAccountSharing; | ||
|
||
/** | ||
* @param AdminAccountSharing $adminAccountSharing | ||
*/ | ||
public function __inject( | ||
AdminAccountSharing $adminAccountSharing | ||
) { | ||
$this->adminAccountSharing = $adminAccountSharing; | ||
} | ||
|
||
/** | ||
* Create Verify Admin Account Sharing test. | ||
* | ||
* @return void | ||
*/ | ||
public function test() | ||
{ | ||
$this->adminAccountSharing->open(); | ||
sleep(10); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
...functional/tests/app/Magento/Config/Test/TestCase/VerifyAdminAccountSharingEntityTest.xml
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,14 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
/** | ||
* Copyright © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/variations.xsd"> | ||
<testCase name="Magento\Config\Test\TestCase\VerifyAdminAccountSharingEntityTest" summary="Verify admin account sharing option availability" ticketId="MAGETWO-47822"> | ||
<variation name="VerifyAdminAccountSharingEntityTestVariation1" summary="Verify Admin Account Sharing is available by default"> | ||
<constraint name="Magento\Config\Test\Constraint\AssertAdminAccountSharing" /> | ||
</variation> | ||
</testCase> | ||
</config> |
27 changes: 27 additions & 0 deletions
27
...ts/functional/tests/app/Magento/Email/Test/Block/Adminhtml/Template/Edit/TemplateForm.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,27 @@ | ||
<?php | ||
/** | ||
* Copyright © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
namespace Magento\Email\Test\Block\Adminhtml\Template\Edit; | ||
|
||
use Magento\Mtf\Block\Form; | ||
use Magento\Mtf\Client\Locator; | ||
|
||
/** | ||
* Click Load button in Email template form. | ||
* this class needs to be created because we need a customized click on the 'Load' button, its not a standard click | ||
*/ | ||
class TemplateForm extends Form | ||
{ | ||
private $loadButton = '#load'; | ||
|
||
/** | ||
* @return void | ||
*/ | ||
public function clickLoadTemplate() | ||
{ | ||
$element = $this->_rootElement->find($this->loadButton, Locator::SELECTOR_CSS); // locate the Load button | ||
$element->click(); // click the load button | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
...ts/functional/tests/app/Magento/Email/Test/Block/Adminhtml/Template/Edit/TemplateForm.xml
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,16 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
/** | ||
* Copyright © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<mapping strict="1"> | ||
<fields> | ||
<template_select> | ||
<selector>#template_select</selector> | ||
<input>select</input> | ||
</template_select> | ||
<template_code/> | ||
</fields> | ||
</mapping> |
42 changes: 42 additions & 0 deletions
42
...ctional/tests/app/Magento/Email/Test/Constraint/AssertEmailTemplateSuccessSaveMessage.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,42 @@ | ||
<?php | ||
/** | ||
* Copyright © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
namespace Magento\Email\Test\Constraint; | ||
|
||
use Magento\Email\Test\Page\Adminhtml\EmailTemplateIndex; | ||
use Magento\Mtf\Constraint\AbstractConstraint; | ||
|
||
/** | ||
* Assertion to check Success Save Message for Email Template. | ||
*/ | ||
class AssertEmailTemplateSuccessSaveMessage extends AbstractConstraint | ||
{ | ||
const SUCCESS_MESSAGE = 'You saved the email template.'; | ||
|
||
/** | ||
* @param EmailTemplateIndex $emailTemplateIndex | ||
*/ | ||
public function processAssert(EmailTemplateIndex $emailTemplateIndex) | ||
{ | ||
$actualMessage = $emailTemplateIndex->getMessagesBlock()->getSuccessMessage(); | ||
\PHPUnit_Framework_Assert::assertEquals( | ||
self::SUCCESS_MESSAGE, | ||
$actualMessage, | ||
'Wrong success message is displayed.' | ||
. "\nExpected: " . self::SUCCESS_MESSAGE | ||
. "\nActual: " . $actualMessage | ||
); | ||
} | ||
|
||
/** | ||
* Text success save message is displayed | ||
* | ||
* @return string | ||
*/ | ||
public function toString() | ||
{ | ||
return 'Assert that success message is displayed.'; | ||
} | ||
} |
Oops, something went wrong.