Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
OpenSalesOrderOnFrontendForGuestStep.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Cms\Test\Page\CmsIndex;
12 use Magento\Sales\Test\Page\SalesGuestForm;
13 use Magento\Mtf\TestStep\TestStepInterface;
14 
18 class OpenSalesOrderOnFrontendForGuestStep implements TestStepInterface
19 {
26 
32  protected $cmsIndex;
33 
39  protected $salesGuestForm;
40 
46  protected $order;
47 
55  public function __construct(
57  CmsIndex $cmsIndex,
58  SalesGuestForm $salesGuestForm,
59  OrderInjectable $order
60  ) {
61  $this->customerAccountLogout = $customerAccountLogout;
62  $this->cmsIndex = $cmsIndex;
63  $this->salesGuestForm = $salesGuestForm;
64  $this->order = $order;
65  }
66 
72  public function run()
73  {
74  $this->customerAccountLogout->open();
75  $this->cmsIndex->getFooterBlock()->clickLink('Orders and Returns');
76  $this->salesGuestForm->getSearchForm()->fill($this->order);
77  $this->salesGuestForm->getSearchForm()->submit();
78  }
79 }
__construct(CustomerAccountLogout $customerAccountLogout, CmsIndex $cmsIndex, SalesGuestForm $salesGuestForm, OrderInjectable $order)