You are here

protected function CartBrowserTestTrait::assertAttributeDoesNotExist in Commerce Core 8.2

Asserts that an attribute option does not exist.

Parameters

string $selector: The element selector.

string $option: The option.

2 calls to CartBrowserTestTrait::assertAttributeDoesNotExist()
AddToCartMultiAttributeTest::testMultipleVariations in modules/cart/tests/src/FunctionalJavascript/AddToCartMultiAttributeTest.php
Tests adding a product to the cart when there are multiple variations.
AddToCartMultilingualTest::testProductVariationAttributesWidget in modules/cart/tests/src/FunctionalJavascript/AddToCartMultilingualTest.php
Tests that the attribute widget uses translated items.

File

modules/cart/tests/src/Traits/CartBrowserTestTrait.php, line 64

Class

CartBrowserTestTrait
Defines a trait for commerce_cart functional tests.

Namespace

Drupal\Tests\commerce_cart\Traits

Code

protected function assertAttributeDoesNotExist($selector, $option) {
  $this
    ->assertSession()
    ->elementNotExists('xpath', '//select[@name="' . $selector . '"]//option[@value="' . $option . '"]');
}