Loading tests/src/FunctionalJavascript/FeeTest.php +3 −3 Original line number Diff line number Diff line Loading @@ -70,13 +70,13 @@ class FeeTest extends CommerceWebDriverTestBase { $this->submitForm([], t('Save')); $this->assertSession()->pageTextContains("Saved the $name fee."); $fee_count = $this->getSession()->getPage()->find('xpath', '//table/tbody/tr/td[text()="' . $name . '"]'); $fee_count = $this->getSession()->getPage()->findAll('xpath', "//table/tbody/tr/td[text()[contains(., '$name')]]"); $this->assertEquals(count($fee_count), 1, 'fees exists in the table.'); /** @var \Drupal\commerce_fee\Entity\FeeInterface $fee */ $fee = Fee::load(1); $this->assertEquals($name, $fee->getName()); $this->assertEquals('Discount', $fee->getDisplayName()); $this->assertEquals('Fee', $fee->getDisplayName()); /** @var \Drupal\commerce\Plugin\Field\FieldType\PluginItem $plugin_field */ $plugin_field = $fee->get('plugin')->first(); $this->assertEquals('0.10', $plugin_field->target_plugin_configuration['percentage']); Loading Loading @@ -112,7 +112,7 @@ class FeeTest extends CommerceWebDriverTestBase { $this->submitForm($edit, t('Save')); $this->assertSession()->pageTextContains("Saved the $name fee."); $fee_count = $this->getSession()->getPage()->find('xpath', '//table/tbody/tr/td[text()="' . $name . '"]'); $fee_count = $this->getSession()->getPage()->findAll('xpath', "//table/tbody/tr/td[text()[contains(., '$name')]]"); $this->assertEquals(count($fee_count), 1, 'fees exists in the table.'); /** @var \Drupal\commerce\Plugin\Field\FieldType\PluginItem $plugin_field */ Loading Loading
tests/src/FunctionalJavascript/FeeTest.php +3 −3 Original line number Diff line number Diff line Loading @@ -70,13 +70,13 @@ class FeeTest extends CommerceWebDriverTestBase { $this->submitForm([], t('Save')); $this->assertSession()->pageTextContains("Saved the $name fee."); $fee_count = $this->getSession()->getPage()->find('xpath', '//table/tbody/tr/td[text()="' . $name . '"]'); $fee_count = $this->getSession()->getPage()->findAll('xpath', "//table/tbody/tr/td[text()[contains(., '$name')]]"); $this->assertEquals(count($fee_count), 1, 'fees exists in the table.'); /** @var \Drupal\commerce_fee\Entity\FeeInterface $fee */ $fee = Fee::load(1); $this->assertEquals($name, $fee->getName()); $this->assertEquals('Discount', $fee->getDisplayName()); $this->assertEquals('Fee', $fee->getDisplayName()); /** @var \Drupal\commerce\Plugin\Field\FieldType\PluginItem $plugin_field */ $plugin_field = $fee->get('plugin')->first(); $this->assertEquals('0.10', $plugin_field->target_plugin_configuration['percentage']); Loading Loading @@ -112,7 +112,7 @@ class FeeTest extends CommerceWebDriverTestBase { $this->submitForm($edit, t('Save')); $this->assertSession()->pageTextContains("Saved the $name fee."); $fee_count = $this->getSession()->getPage()->find('xpath', '//table/tbody/tr/td[text()="' . $name . '"]'); $fee_count = $this->getSession()->getPage()->findAll('xpath', "//table/tbody/tr/td[text()[contains(., '$name')]]"); $this->assertEquals(count($fee_count), 1, 'fees exists in the table.'); /** @var \Drupal\commerce\Plugin\Field\FieldType\PluginItem $plugin_field */ Loading