public function EnforcementBrowserTest::testAvailableStock in Commerce Stock 8
Test that the add to cart button is displayed.
File
- modules/
enforcement/ tests/ src/ Functional/ EnforcementBrowserTest.php, line 34
Class
- EnforcementBrowserTest
- Tests out of stock functionality.
Namespace
Drupal\Tests\commerce_stock_enforcement\FunctionalCode
public function testAvailableStock() {
$this
->drupalGet('product/' . $this->product
->id());
$this
->assertSession()
->buttonExists('Add to cart');
}