/** * Assert existing tax rule on manage tax rule grid * * @param TaxRule $fixture */ protected function _assertOnGrid(TaxRule $fixture) { //Data $filter = ['code' => $fixture->getCode(), 'tax_rate' => implode(', ', $fixture->getTaxRate())]; if ($fixture->getTaxCustomerClass() !== null) { $filter['tax_customer_class'] = implode(', ', $fixture->getTaxCustomerClass()); } if ($fixture->getTaxProductClass() !== null) { $filter['tax_product_class'] = implode(', ', $fixture->getTaxProductClass()); } //Verification $taxGridPage = Factory::getPageFactory()->getTaxRuleIndex(); $taxGridPage->open(); $this->assertTrue($taxGridPage->getTaxRuleGrid()->isRowVisible($filter), 'New tax rule was not found.'); }