You are here

public function OutOfStockTest::testAvailableStock in Commerce Stock 8

Test that the add to cart button is displayed.

File

modules/enforcement/tests/src/Functional/OutOfStockTest.php, line 34

Class

OutOfStockTest
Tests out of stock functionality.

Namespace

Drupal\Tests\commerce_stock_enforcement\Functional

Code

public function testAvailableStock() {
  $this
    ->drupalGet('product/' . $this->product
    ->id());
  $this
    ->assertSession()
    ->buttonExists('Add to cart');
}