9 use Magento\Customer\Test\Page\CustomerAccountIndex;
10 use Magento\Downloadable\Test\Page\DownloadableCustomerProducts;
11 use Magento\Mtf\Client\BrowserInterface;
12 use Magento\Mtf\Fixture\FixtureFactory;
13 use Magento\Mtf\TestCase\Injectable;
64 private $fixtureFactory;
76 FixtureFactory $fixtureFactory,
81 $this->fixtureFactory = $fixtureFactory;
100 $cart = $this->fixtureFactory->createByCode(
'cart',
$cart);
101 $invoice = $this->objectManager->create(
102 \
Magento\Sales\Test\TestStep\CreateInvoiceStep::class,
118 $customerLogin = $this->objectManager->create(
119 \
Magento\Customer\Test\TestStep\LoginCustomerOnFrontendStep::class,
120 [
'customer' =>
$order->getDataFieldConfig(
'customer_id')[
'source']->getCustomer()]
122 $customerLogin->run();
123 $this->customerAccount->getAccountMenuBlock()->openMenuItem(
'My Downloadable Products');
124 $downloadableProductsUrl = $this->browser->getUrl();
126 foreach (
$product->getDownloadableLinks()[
'downloadable'][
'link'] as
$link) {
127 for (
$i = 0;
$i < $downloads;
$i++) {
128 $this->browser->open($this->customerProducts->getMainBlock()->getLinkUrl(
$link[
'title']));
129 $this->browser->open($downloadableProductsUrl);
test(OrderInjectable $order, $downloads)
__inject(FixtureFactory $fixtureFactory, CustomerAccountIndex $customerAccount, DownloadableCustomerProducts $customerProducts, BrowserInterface $browser)
openDownloadableLink(OrderInjectable $order, $downloads)