10 use Magento\Catalog\Test\Page\Product\CatalogProductView;
11 use Magento\Checkout\Test\Page\CheckoutCart;
12 use Magento\Customer\Test\Fixture\Address;
15 use Magento\Mtf\Client\BrowserInterface;
16 use Magento\Mtf\Constraint\AbstractConstraint;
17 use Magento\Mtf\Fixture\FixtureFactory;
71 abstract protected function assert();
91 public function processAssert(
92 FixtureFactory $fixtureFactory,
95 CatalogProductView $catalogProductView,
99 BrowserInterface $browser,
107 if ($this->initialTaxRule !==
null) {
108 $this->taxRuleCode = ($this->taxRule->hasData(
'code'))
109 ? $this->taxRule->getCode()
110 : $this->initialTaxRule->getCode();
112 $this->taxRuleCode = $this->taxRule->getCode();
116 $taxProductClass =
$taxRule->getDataFieldConfig(
'tax_product_class')[
'source']->getFixture()[0];
117 $this->productSimple = $fixtureFactory->createByCode(
118 'catalogProductSimple',
120 'dataset' =>
'product_100_dollar_for_tax_rule',
122 'tax_class_id' => [
'tax_product_class' => $taxProductClass],
126 $this->productSimple->persist();
128 $this->objectManager->create(
129 \
Magento\Customer\Test\TestStep\LoginCustomerOnFrontendStep::class,
134 $browser->open($_ENV[
'app_frontend_url'] . $this->productSimple->getUrlKey() .
'.html');
135 $catalogProductView->getViewBlock()->clickAddToCart();
136 $catalogProductView->getMessagesBlock()->waitSuccessMessage();