You are here

public function StoreTest::testEditStore in Commerce Core 8.2

Tests editing a store.

File

modules/store/tests/src/FunctionalJavascript/StoreTest.php, line 72

Class

StoreTest
Tests the store UI.

Namespace

Drupal\Tests\commerce_store\FunctionalJavascript

Code

public function testEditStore() {
  $store = $this
    ->createStore('Test');
  $this
    ->drupalGet($store
    ->toUrl('edit-form'));
  $edit = [
    'name[0][value]' => 'Test!',
  ];
  $this
    ->submitForm($edit, 'Save');
  $this
    ->assertSession()
    ->pageTextContains("Saved the Test! store.");
  $store = $this
    ->reloadEntity($store);
  $this
    ->assertEquals('Test!', $store
    ->label());
}