diff --git a/commerce_discount.test b/commerce_discount.test
index 8a28948..5b7112f 100644
--- a/commerce_discount.test
+++ b/commerce_discount.test
@@ -78,7 +78,7 @@ class CommerceDiscountTestBase extends CommerceBaseTestCase {
    * @return
    *   The newly created commerce_discount entity.
    */
-  protected function createDiscount($discount_type, $offer_type, $amount, $name = '') {
+  protected function createDiscount($discount_type, $offer_type, $amount, $name = '', $component_title = '') {
     // Create the discount offer.
     $commerce_discount_offer = entity_create('commerce_discount_offer', array('type' => $offer_type));
     $wrapper = entity_metadata_wrapper('commerce_discount_offer', $commerce_discount_offer);
@@ -96,12 +96,14 @@ class CommerceDiscountTestBase extends CommerceBaseTestCase {
 
     // Provide default name.
     $name = $name ? $name : $discount_type . '_' . $offer_type;
+    $component_title = $component_title ? $component_title : $name;
 
     // Create the discount.
     $values = array(
       'name' => $name,
       'label' => $name,
       'type' => $discount_type,
+      'component_title' => $component_title,
       'enabled' => TRUE,
       'status' => TRUE,
     );
@@ -175,6 +177,7 @@ class CommerceDiscountTest extends CommerceDiscountTestBase {
     // Check the integrity of the add form.
     $this->assertFieldByName('commerce_discount_type', NULL, t('Discount type field is present'));
     $this->assertFieldByName('label', NULL, t('Label field is present'));
+    $this->assertFieldByName('component_title', NULL, t('Name field is present'));
     $this->assertFieldByName('commerce_discount_fields[commerce_discount_offer][und][form][type]', NULL, t('Offer type field is present'));
     $this->assertFieldByName('commerce_discount_fields[commerce_discount_offer][und][form][commerce_fixed_amount][und][0][amount]', NULL, t('Amount field is present'));
     $this->assertFieldByName('enabled', NULL, t('Status field is present'));
@@ -185,6 +188,7 @@ class CommerceDiscountTest extends CommerceDiscountTestBase {
 
     $this->assertText(t('Admin title field is required.'), t('Validation message for missing label.'));
     $this->assertText(t('Machine-readable name field is required.'), t('Validation message for missing machine-name.'));
+    $this->assertText(t('Name field is required.'), t('Validation message for missing name.'));
     $this->assertText(t('Fixed amount field is required.'), t('Validation message for missing amount.'));
 
     // Load a clean discount add form.
@@ -193,6 +197,7 @@ class CommerceDiscountTest extends CommerceDiscountTestBase {
     $values = array(
       'label' => 'Order discount - fixed',
       'name' => 'order_discount_fixed',
+      'component_title' => 'Order discount',
       'commerce_discount_fields[commerce_discount_offer][und][form][commerce_fixed_amount][und][0][amount]' => 12.77,
     );
     $this->drupalPost(NULL, $values, t('Save discount'));
@@ -204,6 +209,7 @@ class CommerceDiscountTest extends CommerceDiscountTestBase {
     // Check the stored discount.
     $this->assertTrue($discount->label == $values['label'], t('Label stored correctly.'));
     $this->assertTrue($discount->name == 'discount_' . $values['name'], t('Name stored correctly.'));
+    $this->assertTrue($discount->component_title == $values['component_title'], t('Name for customer stored correctly.'));
     $this->assertTrue($discount->enabled == 1, t('Enabled stored correctly.'));
 
     $this->assertTrue($wrapper->commerce_discount_offer->type->value() == 'fixed_amount', t('Offer type stored correctly.'));
@@ -212,6 +218,116 @@ class CommerceDiscountTest extends CommerceDiscountTestBase {
     // Check the discounts listing
     $this->assertTrue($this->url == url('admin/commerce/store/discounts', array('absolute' => TRUE)), t('Landing page after save is the discounts list.'));
     $this->assertText($values['label'], t('Label of the discount is present.'));
+    $this->assertText($values['component_title'], t('Name of the discount is present.'));
+  }
+  
+  /**
+   * Test the Edit discount UI.
+   */
+  public function testCommerceDiscountUIEditDiscount() {
+     // Create a discount.
+    $discount = $this->createDiscount('order_discount', 'fixed_amount', 300);
+
+    // Login with normal user.
+    $this->drupalLogin($this->store_customer);
+
+    // Access to the admin discount edit page.
+    $this->drupalGet('admin/commerce/store/discounts/manage/' . $discount->name);
+
+    $this->assertResponse(403, t('Normal user is not able to edit a discount using the admin interface'));
+
+    // Login with store admin.
+    $this->drupalLogin($this->store_admin);
+
+    // Access to the admin discount edit page.
+    $this->drupalGet('admin/commerce/store/discounts/manage/' . $discount->name);
+
+    $this->assertResponse(200, t('Store admin user is allowed to edit a discount using the admin interface'));
+
+    // Check the integrity of the add form.
+    $this->assertFieldByName('commerce_discount_type', NULL, t('Discount type field is present'));
+    $this->assertFieldByName('label', NULL, t('Label field is present'));
+    $this->assertFieldByName('component_title', NULL, t('Name field is present'));
+    $this->assertFieldByName('commerce_discount_fields[commerce_discount_offer][und][form][type]', NULL, t('Offer type field is present'));
+    $this->assertFieldByName('commerce_discount_fields[commerce_discount_offer][und][form][commerce_fixed_amount][und][0][amount]', NULL, t('Amount field is present'));
+    $this->assertFieldByName('enabled', NULL, t('Status field is present'));
+    $this->assertFieldById('edit-submit', t('Save discount'), t('Save discount button is present'));
+    $this->assertFieldById('edit-delete', t('Delete discount'), t('Delete discount button is present'));
+
+    // Try to save the product and check validation messages.
+    $this->drupalPost(NULL, array(), t('Save discount'));
+
+    $this->assertText(t('Admin title field is required.'), t('Validation message for missing label.'));
+    $this->assertText(t('Machine-readable name field is required.'), t('Validation message for missing machine-name.'));
+    $this->assertText(t('Name field is required.'), t('Validation message for missing name.'));
+    $this->assertText(t('Fixed amount field is required.'), t('Validation message for missing amount.'));
+
+    // Create a discount.
+    $values = array(
+      'label' => 'Order discount - fixed',
+      'name' => 'order_discount_fixed',
+      'component_title' => 'Order discount',
+      'commerce_discount_fields[commerce_discount_offer][und][form][commerce_fixed_amount][und][0][amount]' => 12.77,
+    );
+    $this->drupalPost(NULL, $values, t('Save discount'));
+
+    // Load the discount and wrap it.
+    $discount = entity_load_single('commerce_discount', 1);
+    $wrapper = entity_metadata_wrapper('commerce_discount', $discount);
+
+    // Check the stored discount.
+    $this->assertTrue($discount->label == $values['label'], t('Label stored correctly.'));
+    $this->assertTrue($discount->name == 'discount_' . $values['name'], t('Name stored correctly.'));
+    $this->assertTrue($discount->component_title == $values['component_title'], t('Name for customer stored correctly.'));
+    $this->assertTrue($discount->enabled == 1, t('Enabled stored correctly.'));
+
+    $this->assertTrue($wrapper->commerce_discount_offer->type->value() == 'fixed_amount', t('Offer type stored correctly.'));
+    $this->assertTrue($wrapper->commerce_discount_offer->commerce_fixed_amount->amount->value() == 1277, t('Amount stored correctly.'));
+
+    // Check the discounts listing
+    $this->assertTrue($this->url == url('admin/commerce/store/discounts', array('absolute' => TRUE)), t('Landing page after save is the discounts list.'));
+    $this->assertText($values['label'], t('Label of the discount is present.'));
+    $this->assertText($values['component_title'], t('Name of the discount is present.'));
+  }
+
+  /**
+   * Test the delete discount UI.
+   */
+  public function testCommerceDiscountUIDeleteDiscount() {
+     // Create a discount.
+    $discount = $this->createDiscount('order_discount', 'fixed_amount', 300);
+
+    // Login with normal user.
+    $this->drupalLogin($this->store_customer);
+
+    // Access to the admin discount edit page.
+    $this->drupalGet('admin/commerce/store/discounts/manage/' . $discount->name . '/delete');
+
+    $this->assertResponse(403, t('Normal user is not able to delete a discount using the admin interface'));
+
+    // Login with store admin.
+    $this->drupalLogin($this->store_admin);
+
+    // Access to the admin discount edit page.
+    $this->drupalGet('admin/commerce/store/discounts/manage/' . $discount->name . '/delete');
+
+    $this->assertResponse(200, t('Store admin user is allowed to delete a discount using the admin interface'));
+
+    // Check the integrity of the add form.
+    $this->pass('Test the discount delete confirmation form:');
+    $this->assertTitle(t('Are you sure you want to delete the !label discount?', array('!label' => $discount->label)) . ' | Drupal', t('The confirmation message is displayed'));
+    $this->assertText(t('This action cannot be undone'), t('A warning notifying the user about the action can\'t be undone is displayed.'));
+    $this->assertFieldById('edit-submit', t('Delete'), t('Delete button is present'));
+    $this->assertText(t('Cancel'), t('Cancel is present'));
+
+    // Try to save the product and check validation messages.
+    $this->drupalPost(NULL, array(), t('Delete'));
+
+    // Check the url after deleting and if the discount has been deleted in
+    // database.
+    $this->assertTrue($this->url == url('admin/commerce/store/discounts', array('absolute' => TRUE)), t('Landing page after deleting a discount is the discounts listing page'));
+    $this->assertRaw(t('The discount %label has been deleted.', array('%label' => $discount->label)), t('\'Discount has been deleted\' message is displayed'));
+    $this->assertRaw(t('There are no discount yet. <a href="@link">Add a discount</a>.', array('@link' => url('admin/commerce/store/discounts/add'))), t('Empty discount listing message is displayed'));
   }
 
   /**
@@ -226,24 +342,26 @@ class CommerceDiscountTest extends CommerceDiscountTestBase {
     $this->assertResponse(200, t('Store admin is allowed in the discounts import page'));
 
     $exported_discount = '{
-  "name" : "pf",
-  "label" : "PF",
-  "type" : "product_discount",
-  "enabled" : "1",
-  "commerce_discount_offer" : {
-    "type" : "fixed_amount",
-    "commerce_fixed_amount" : { "und" : [
-        {
-          "amount" : "1200",
-          "currency_code" : "USD",
-          "data" : { "components" : [] }
-        }
-      ]
-    },
-    "rdf_mapping" : []
-  },
-  "rdf_mapping" : []
-}';
+      "name" : "pf",
+      "label" : "PF",
+      "type" : "product_discount",
+      "enabled" : "1",
+      "component_title" : "PF",
+      "commerce_discount_offer" : {
+        "type" : "fixed_amount",
+        "commerce_fixed_amount" : { "und" : [
+            {
+              "amount" : "1200",
+              "currency_code" : "USD",
+              "data" : { "components" : [] }
+            }
+          ]
+        },
+        "rdf_mapping" : []
+      },
+      "inline_conditions" : [],
+      "rdf_mapping" : []
+    }';
 
     // Import the discount.
     $this->drupalPost(NULL, array('import' => $exported_discount), t('Import'));
diff --git a/modules/commerce_discount_date/commerce_discount_date.test b/modules/commerce_discount_date/commerce_discount_date.test
index ada012a..a846565 100644
--- a/modules/commerce_discount_date/commerce_discount_date.test
+++ b/modules/commerce_discount_date/commerce_discount_date.test
@@ -51,6 +51,7 @@ class CommerceDiscountDateTest extends CommerceDiscountTestBase {
     $values = array(
       'label' => 'Order discount - fixed',
       'name' => 'order_discount_fixed',
+      'component_title' => 'Order discount',
       'commerce_discount_fields[commerce_discount_offer][und][form][commerce_fixed_amount][und][0][amount]' => 12.77,
       'commerce_discount_fields[commerce_discount_date][und][0][value][date]' => $start_date,
       'commerce_discount_fields[commerce_discount_date][und][0][value2][date]' => $end_date,
diff --git a/modules/commerce_discount_usage/commerce_discount_usage.test b/modules/commerce_discount_usage/commerce_discount_usage.test
index 2675f3a..16574c1 100644
--- a/modules/commerce_discount_usage/commerce_discount_usage.test
+++ b/modules/commerce_discount_usage/commerce_discount_usage.test
@@ -50,13 +50,14 @@ class CommerceDiscountUsageTest extends CommerceDiscountTest {
     $values = array(
       'label' => 'Order discount - fixed',
       'name' => 'order_discount_fixed',
+      'component_title' => 'Order discount',
       'commerce_discount_fields[commerce_discount_offer][und][form][commerce_fixed_amount][und][0][amount]' => 12.77,
       'commerce_discount_fields[commerce_discount_max_uses][und][0][value]' => 5,
     );
     $this->drupalPost(NULL, $values, t('Save commerce discount'));
 
     // Load the discount and wrap it.
-    $discount = commerce_discount_load(1);
+    $discount = entity_load_single('commerce_discount', 1);
     $wrapper = entity_metadata_wrapper('commerce_discount', $discount);
 
     // Check the usage fields of the stored discount.
