Commit 0cd7fb9e authored by Jonathan Sacksick's avatar Jonathan Sacksick
Browse files

Issue #3274739 followup by jsacksick: Fix additional failing tests.

parent 0bef0fb1
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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']);
@@ -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 */