-
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.
MAGETWO-56941: CLONE - CLONE - [Github] Allowed countries for custome…
…r address in admin using storeview configuration #2946
- Loading branch information
Sergey Kovalenko
committed
Aug 23, 2016
1 parent
3fa291e
commit 674dc4d
Showing
6 changed files
with
269 additions
and
4 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
53 changes: 53 additions & 0 deletions
53
...ional/tests/app/Magento/Customer/Test/Constraint/AssertChangingWebsiteChangeCountries.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,53 @@ | ||
<?php | ||
/** | ||
* Copyright © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Magento\Customer\Test\Constraint; | ||
|
||
use Magento\Customer\Test\Fixture\Customer; | ||
use Magento\Customer\Test\Page\Adminhtml\CustomerIndexNew; | ||
use Magento\Mtf\Constraint\AbstractConstraint; | ||
|
||
/** | ||
* Assert required fields on customer form. | ||
*/ | ||
class AssertChangingWebsiteChangeCountries extends AbstractConstraint | ||
{ | ||
/** | ||
* Assert required fields on customer form. | ||
* | ||
* @param CustomerIndexNew $customerNewPage | ||
* @param array $expectedRequiredFields | ||
* @return void | ||
*/ | ||
public function processAssert(CustomerIndexNew $customerIndexNew, Customer $customer, \Magento\Customer\Test\Fixture\Address $address, $expectedList) | ||
{ | ||
$customerIndexNew->getCustomerForm() | ||
->openTab('account_information'); | ||
$customerIndexNew->getCustomerForm()->fillCustomer($customer); | ||
$customerIndexNew->getCustomerForm() | ||
->openTab('addresses'); | ||
$tab = $customerIndexNew->getCustomerForm() | ||
->getTab('addresses'); | ||
$countriesList = $tab->getCountriesList(1); | ||
sort($countriesList); | ||
sort($expectedList); | ||
\PHPUnit_Framework_Assert::assertEquals( | ||
$countriesList, | ||
$expectedList, | ||
'Wrong country list is displayed.' | ||
); | ||
} | ||
|
||
/** | ||
* Return string representation of object. | ||
* | ||
* @return string | ||
*/ | ||
public function toString() | ||
{ | ||
return 'All required fields on customer form are highlighted.'; | ||
} | ||
} |
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