You are here

protected function AddToCartMultiAttributeTest::setUp in Commerce Core 8.2

Overrides CartWebDriverTestBase::setUp

File

modules/cart/tests/src/FunctionalJavascript/AddToCartMultiAttributeTest.php, line 19

Class

AddToCartMultiAttributeTest
Tests the add to cart form.

Namespace

Drupal\Tests\commerce_cart\FunctionalJavascript

Code

protected function setUp() : void {
  parent::setUp();

  /** @var \Drupal\Core\Entity\Entity\EntityViewDisplay $variation_view_display */
  $variation_view_display = commerce_get_entity_display('commerce_product_variation', 'default', 'view');

  // Show the SKU by default.
  $variation_view_display
    ->setComponent('sku', [
    'label' => 'hidden',
    'type' => 'string',
  ]);
  $variation_view_display
    ->save();
}