You are here

public function WishlistAnonymousTest::testNotAllowed in Commerce Wishlist 8.3

Test add to wishlist access.

File

tests/src/FunctionalJavascript/WishlistAnonymousTest.php, line 117

Class

WishlistAnonymousTest
Tests the wishlist anonymous access.

Namespace

Drupal\Tests\commerce_wishlist\FunctionalJavascript

Code

public function testNotAllowed() {
  $this
    ->drupalGet('product/1');
  $this
    ->assertSession()
    ->buttonExists('Add to wishlist');
  $this
    ->drupalLogout();
  drupal_flush_all_caches();
  $this
    ->drupalGet('product/1');
  $this
    ->assertSession()
    ->buttonNotExists('Add to wishlist');
}