You are here

public function CartBlockTest::testCartCollapse in Ubercart 8.4

Test cart block collapse functionality.

File

uc_cart/tests/src/Functional/CartBlockTest.php, line 106

Class

CartBlockTest
Tests the cart block functionality.

Namespace

Drupal\Tests\uc_cart\Functional

Code

public function testCartCollapse() {

  /** @var \Drupal\Tests\WebAssert $assert */
  $assert = $this
    ->assertSession();
  $this
    ->drupalGet('');
  $assert
    ->responseContains('cart-block-arrow');
  $assert
    ->responseContains('collapsed');
  $this->block
    ->getPlugin()
    ->setConfigurationValue('collapsed', FALSE);
  $this->block
    ->save();
  $this
    ->drupalGet('');
  $assert
    ->responseNotContains('collapsed');
  $this->block
    ->getPlugin()
    ->setConfigurationValue('collapsible', FALSE);
  $this->block
    ->save();
  $this
    ->drupalGet('');
  $assert
    ->responseNotContains('cart-block-arrow');
}