Commit 5718035b authored by Jonathan Sacksick's avatar Jonathan Sacksick
Browse files

Issue #3262228 by jsacksick: Fix the failing tests on 9.4.x.

parent 75dcf0c9
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -318,8 +318,13 @@ class AddressBookTest extends OrderWebDriverTestBase {
    $this->assertNotEmpty($rendered_address);
    $this->assertStringContainsString('38 Rue du Sentier', $rendered_address->getText());

    $addressbook_edit_form = Url::fromRoute('commerce_order.address_book.edit_form', [
      'user' => $customer->id(),
      'profile' => 1,
    ]);
    // Confirm that a profile can be edited.
    $this->getSession()->getPage()->clickLink('Edit');
    $this->assertSession()->linkByHrefExists($addressbook_edit_form->toString());
    $this->drupalGet($addressbook_edit_form);
    foreach ($this->fourthAddress as $property => $value) {
      $this->assertSession()->fieldValueEquals("address[0][address][$property]", $value);
    }
+1 −1
Original line number Diff line number Diff line
@@ -240,7 +240,7 @@ class ProductVariationResourceTest extends ResourceTestBase {
          'sku' => 'ABC123',
          'price' => [
            'currency_code' => 'USD',
            'number' => '8.99',
            'number' => $this->entity->getPrice()->getNumber(),
          ],
        ],
        'relationships' => $relationships,
+5 −2
Original line number Diff line number Diff line
@@ -72,6 +72,7 @@ class ProductTranslationTest extends ProductBrowserTestBase {
   * Test translating a product and its variations.
   */
  public function testProductTranslation() {
    /** @var \Drupal\commerce_product\Entity\ProductInterface $product */
    $product = $this->createEntity('commerce_product', [
      'type' => 'default',
      'title' => 'Translation test product',
@@ -94,8 +95,10 @@ class ProductTranslationTest extends ProductBrowserTestBase {
    $this->drupalGet(Url::fromRoute('entity.commerce_product_variation.collection', [
      'commerce_product' => $product->id(),
    ]));
    $this->assertSession()->linkByHrefExists('/product/1/variations/1/translations');
    $this->getSession()->getPage()->clickLink('Translate');
    $variation = $product->getVariations()[0];
    $translation_overview_url = $variation->toUrl('drupal:content-translation-overview');
    $this->assertSession()->linkByHrefExists($translation_overview_url->toString());
    $this->drupalGet($translation_overview_url);
    $this->assertSession()->linkByHrefExists('/fr/product/1/variations/1/translations/add/en/fr');
    $this->getSession()->getPage()->clickLink('Add');
    $this->getSession()->getPage()->pressButton('Save');