10 use Magento\Customer\Test\Page\Adminhtml\CustomerGroupIndex;
11 use Magento\Customer\Test\Page\Adminhtml\CustomerGroupNew;
12 use Magento\Mtf\Constraint\AbstractConstraint;
42 CustomerGroupIndex $customerGroupIndex,
43 CustomerGroupNew $customerGroupNew,
44 CustomerGroup $customerGroup,
45 CustomerGroup $customerGroupOriginal =
null 47 $data = ($customerGroupOriginal !==
null)
48 ? array_merge($customerGroupOriginal->getData(), $customerGroup->getData())
49 : $customerGroup->getData();
51 'code' =>
$data[
'customer_group_code'],
54 $customerGroupIndex->open();
55 $customerGroupIndex->getCustomerGroupGrid()->searchAndOpen($filter);
56 $formData = $customerGroupNew->getPageMainForm()->getData();
58 \PHPUnit\Framework\Assert::assertTrue(
60 'Customer Group form was filled incorrectly.' 61 .
"\nLog:\n" . implode(
";\n", $dataDiff)
72 protected function verifyForm(array $formData, array $fixtureData)
76 foreach ($fixtureData as $key =>
$value) {
77 if (in_array($key, $this->skippedFields)) {
80 if (
$value !== $formData[$key]) {
81 $errorMessages[] =
"Data in " . $key .
" field is not equal." 83 .
"\nActual: " . $formData[$key];
87 return $errorMessages;
97 return 'Customer Group form was filled correctly.';