You are here

public function ProductTypeTest::testDefault in Commerce Core 8.2

Tests whether the default product type was created.

File

modules/product/tests/src/Functional/ProductTypeTest.php, line 19

Class

ProductTypeTest
Tests the product type UI.

Namespace

Drupal\Tests\commerce_product\Functional

Code

public function testDefault() {
  $product_type = ProductType::load('default');
  $this
    ->assertNotEmpty($product_type);
  $this
    ->drupalGet('admin/commerce/config/product-types');
  $rows = $this
    ->getSession()
    ->getPage()
    ->findAll('css', 'table tbody tr');
  $this
    ->assertCount(1, $rows);
}