You are here

public function CommerceProductUIAdminTest::testCommerceProductUICancelEditProduct in Commerce Core 7

Test the delete link in the product form.

File

modules/product/tests/commerce_product_ui.test, line 250
Functional tests for the commerce product ui module.

Class

CommerceProductUIAdminTest
Test the product and product type CRUD.

Code

public function testCommerceProductUICancelEditProduct() {

  // Login with store admin.
  $this
    ->drupalLogin($this->store_admin);

  // Access to the admin product list.
  $this
    ->drupalGet('admin/commerce/products/add/product');

  // Click on cancel link.
  $this
    ->clickLink(t('Cancel'));
  $this
    ->assertTrue($this->url == url('admin/commerce/products', array(
    'absolute' => TRUE,
  )), t('Landing page after cancel is the product listing page'));
}