Laravel Dusk忽略了Vue按钮

时间:2017-11-01 18:44:15

标签: laravel unit-testing testing vuejs2 laravel-dusk

在测试Laravel + Vue时,测试编译没有错误,但忽略“ - > click()”方法

黄昏代码

    $this->browse(function (Browser $browser) {
        $browser->visit('/')
                ->maximize()
                ->assertSee('Comments')
                ->value('#comment-form', 'ffs')
                ->click('@comment-add-0')
                ->pause(1000)
                ->assertSee('ffs');

评论表单模板

<form @submit.prevent="letsGo">
<div class="form-group">
  <textarea class="form-control" rows="2" id="comment-form"
  v-model="commentReplyForm.body" v-focus placeholder="Write here :)"></textarea>
</div>
<button :dusk="getId()" class="btn btn-primary" type="submit">Leave comment</button>

0 个答案:

没有答案