You are here

public function VueRenderTest::testExample1V3Renders in Decoupled Blocks: Vue.js 8

Test that a Vue instance renders.

File

tests/src/FunctionalJavascript/VueRenderTest.php, line 52

Class

VueRenderTest
Vue Render tests.

Namespace

Drupal\Tests\pdb_vue\FunctionalJavascript

Code

public function testExample1V3Renders() {
  $assert = $this
    ->assertSession();
  $config = $this
    ->config('pdb_vue.settings');

  // Set the values the user submitted in the form.
  $config
    ->set('version', 'vue3');
  $config
    ->set('development_mode', TRUE);
  $config
    ->save();

  // Place the "Vue Example 1" block.
  $this
    ->drupalPlaceBlock('vue_component:vue3_example_1');
  $this
    ->drupalGet('<front>');
  $assert
    ->waitForElement('css', '.test');
  $assert
    ->pageTextContains("Hello Vue");
}