Skip to content
Snippets Groups Projects
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
No related branches found
Tags 8.x-2.4
No related merge requests found
......@@ -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);
}
......
......@@ -240,7 +240,7 @@ class ProductVariationResourceTest extends ResourceTestBase {
'sku' => 'ABC123',
'price' => [
'currency_code' => 'USD',
'number' => '8.99',
'number' => $this->entity->getPrice()->getNumber(),
],
],
'relationships' => $relationships,
......
......@@ -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');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment