diff --git a/modules/product/src/Tests/AddToCartFormTest.php b/modules/product/src/Tests/AddToCartFormTest.php
new file mode 100644
index 0000000..26316bf
--- /dev/null
+++ b/modules/product/src/Tests/AddToCartFormTest.php
@@ -0,0 +1,77 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\commerce_product\Tests\AddToCartFormTest.
+ */
+
+namespace Drupal\commerce_product\Tests;
+
+use Drupal\commerce_cart\Tests\CartTestBase;
+use Drupal\commerce_order\Entity\Order;
+use Drupal\commerce_product\Entity\ProductVariation;
+
+/**
+ * Functional tests for the add to cart form.
+ *
+ * @group commerce
+ */
+class AddToCartFormTest extends CartTestBase {
+
+  /**
+   * Tests for product Add to cart form.
+   */
+  public function testProductAddToCartForm() {
+    // Test adding an existing product.
+    // Get the existing product page and submit Add to cart form.
+    $this->drupalGet('product/' . $this->variation->getProductId());
+    $this->assertField('edit-submit', t('Add to cart button exists.'));
+    $edit = [
+      'variation' => $this->variation->id(),
+    ];
+    $this->drupalPostForm(NULL, $edit, t('Add to cart'));
+
+    // Check if the quantity was increased for the existing line item.
+    \Drupal::service('entity_type.manager')->getStorage('commerce_order')->resetCache();
+    $cart = Order::load($this->cart->id());
+    $line_items = $cart->getLineItems();
+    $line_item = $line_items[0];
+    $this->assertTrue(($line_item->getQuantity() == 2), t('The product @product has been added to cart. Product quantity was increased by 1 unit.', ['@product' => $line_item->getTitle()]));
+
+    // Test adding a new product.
+    // Create a second product variation.
+    $values = [
+      'type' => 'default',
+      'sku' => $this->randomMachineName(),
+      'price' => [
+        'amount' => 999,
+        'currency_code' => 'EUR',
+      ]
+    ];
+    $new_variation = ProductVariation::create($values);
+    $new_variation->save();
+
+    // Create a new product for this variation.
+    $new_product = $this->createEntity('commerce_product', [
+      'type' => 'default',
+      'title' => $this->randomMachineName(),
+      'variations' => [$new_variation],
+    ]);
+
+    // Get the product page and submit Add to cart form.
+    $this->drupalGet('product/' . $new_product->id());
+    $this->assertField('edit-submit', t('Add to cart button exists.'));
+    $edit = [
+      'variation' => $new_variation->id(),
+    ];
+    $this->drupalPostForm(NULL, $edit, t('Add to cart'));
+
+    // Check if the product was added to cart.
+    \Drupal::service('entity_type.manager')->getStorage('commerce_order')->resetCache();
+    $cart = Order::load($this->cart->id());
+    $line_item = $this->cartManager->createLineItem($new_variation);
+    $matching_line_item = \Drupal::service('commerce_cart.line_item_matcher')->match($line_item, $cart->getLineItems());
+    $this->assertNotNull($matching_line_item, t('The product @product has been added to cart.', ['@product' => $line_item->getTitle()]));
+  }
+
+}
