Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
CustomizeStore.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Mtf\Block\Form;
10 use Magento\Mtf\Client\Element\SimpleElement;
11 use Magento\Mtf\Client\Locator;
12 use Magento\Mtf\Fixture\FixtureInterface;
13 
17 class CustomizeStore extends Form
18 {
24  protected $next = "[ng-click*='checkModuleConstraints']";
25 
31  protected $moduleConfiguration = '.customize-your-store-advanced';
32 
38  public function clickNext()
39  {
40  $this->_rootElement->find($this->next, Locator::SELECTOR_CSS)->click();
41  }
42 
50  public function fill(FixtureInterface $fixture, SimpleElement $element = null)
51  {
52  $this->waitForElementVisible($this->moduleConfiguration);
53  $data = $fixture->getData();
54  $storeData = [];
55  foreach ($data as $key => $value) {
56  if (strpos($key, 'store') === 0) {
57  $storeData[$key] = $value;
58  }
59  }
60  $mapping = $this->dataMapping($storeData);
61  $this->_fill($mapping, $element);
62 
63  return $this;
64  }
65 }
$value
Definition: gender.phtml:16
fill(FixtureInterface $fixture, SimpleElement $element=null)
$element
Definition: element.phtml:12