Loading modules/order/tests/src/FunctionalJavascript/AddressBookTest.php +6 −1 Original line number Diff line number Diff line Loading @@ -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); } Loading modules/product/tests/src/Functional/Jsonapi/ProductVariationResourceTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -240,7 +240,7 @@ class ProductVariationResourceTest extends ResourceTestBase { 'sku' => 'ABC123', 'price' => [ 'currency_code' => 'USD', 'number' => '8.99', 'number' => $this->entity->getPrice()->getNumber(), ], ], 'relationships' => $relationships, Loading modules/product/tests/src/Functional/ProductTranslationTest.php +5 −2 Original line number Diff line number Diff line Loading @@ -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', Loading @@ -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'); Loading Loading
modules/order/tests/src/FunctionalJavascript/AddressBookTest.php +6 −1 Original line number Diff line number Diff line Loading @@ -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); } Loading
modules/product/tests/src/Functional/Jsonapi/ProductVariationResourceTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -240,7 +240,7 @@ class ProductVariationResourceTest extends ResourceTestBase { 'sku' => 'ABC123', 'price' => [ 'currency_code' => 'USD', 'number' => '8.99', 'number' => $this->entity->getPrice()->getNumber(), ], ], 'relationships' => $relationships, Loading
modules/product/tests/src/Functional/ProductTranslationTest.php +5 −2 Original line number Diff line number Diff line Loading @@ -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', Loading @@ -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'); Loading