Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
UpdateCustomerGroupEntityTest.php
Go to the documentation of this file.
1 <?php
8 
10 use Magento\Customer\Test\Page\Adminhtml\CustomerGroupIndex;
11 use Magento\Customer\Test\Page\Adminhtml\CustomerGroupNew;
12 use Magento\Mtf\TestCase\Injectable;
13 
31 class UpdateCustomerGroupEntityTest extends Injectable
32 {
33  /* tags */
34  const MVP = 'yes';
35  const TO_MAINTAIN = 'yes';
36  /* end tags */
37 
44 
50  protected $customerGroupNew;
51 
59  public function __inject(
60  CustomerGroupIndex $customerGroupIndex,
61  CustomerGroupNew $customerGroupNew
62  ) {
63  $this->customerGroupIndex = $customerGroupIndex;
64  $this->customerGroupNew = $customerGroupNew;
65  }
66 
74  public function test(
75  CustomerGroup $customerGroupOriginal,
76  CustomerGroup $customerGroup
77  ) {
78  // Precondition
79  $customerGroupOriginal->persist();
80  $filter = ['code' => $customerGroupOriginal->getCustomerGroupCode()];
81 
82  // Steps
83  $this->customerGroupIndex->open();
84  $this->customerGroupIndex->getCustomerGroupGrid()->searchAndOpen($filter);
85  $this->customerGroupNew->getPageMainForm()->fill($customerGroup);
86  $this->customerGroupNew->getPageMainActions()->save();
87  }
88 }
__inject(CustomerGroupIndex $customerGroupIndex, CustomerGroupNew $customerGroupNew)
test(CustomerGroup $customerGroupOriginal, CustomerGroup $customerGroup)