Laravel - Browser Tests - Assert Vue

Dusk even allows you to make assertions on the state of Vue component data. For example, imagine your application contains the following Vue component:

    
    // HTML...
    
    
    
    // Component Definition...
    
    Vue.component('profile', {
        template: '
{{ user.name }}
', data: function () { return { user: { name: 'Taylor' } }; } });

You may assert on the state of the Vue component like so:

    
    /**
     * A basic Vue test example.
     *
     * @return void
     */
    public function testVue()
    {
        $this->browse(function (Browser $browser) {
            $browser->visit('/')
                    ->assertVue('user.name', 'Taylor', '@profile-component');
        });
    }