You are here

public function ProductVariationTypeTest::testDefault in Commerce Core 8.2

Tests whether the default product variation type was created.

File

modules/product/tests/src/Functional/ProductVariationTypeTest.php, line 33

Class

ProductVariationTypeTest
Tests the product variation type UI.

Namespace

Drupal\Tests\commerce_product\Functional

Code

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