Skip to content

Commit a8e6f18

Browse files
author
Guillaume Chau
committed
Add Events Tab tests
1 parent 5847dd0 commit a8e6f18

File tree

4 files changed

+28
-5
lines changed

4 files changed

+28
-5
lines changed

shells/dev/target/EventChild.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<template>
22
<div>
3-
<button @click="emitEvent">Emit</button>
4-
<button @click="emitEvent1">Emit</button>
5-
<button @click="emitEvent2">Emit</button>
3+
<button class="btn-emit-event" @click="emitEvent">Emit</button>
4+
<button class="btn-emit-event1" @click="emitEvent1">Emit</button>
5+
<button class="btn-emit-event2" @click="emitEvent2">Emit</button>
66
</div>
77
</template>
88

shells/dev/target/EventChild1.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div>
3-
<button @click="emitLogEvent">Emit</button>
3+
<button class="btn-emit-log-event" @click="emitLogEvent">Emit</button>
44
</div>
55
</template>
66

shells/dev/target/EventChildCond.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div>
3-
<button @click="emitLogEvent">Emit from cond</button>
3+
<button class="btn-emit-event-cond" @click="emitLogEvent">Emit from cond</button>
44
</div>
55
</template>
66

test/specs/test.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,29 @@ module.exports = {
205205
.click('.import')
206206
.waitForElementNotPresent('.import-state', 2000)
207207

208+
// Events
209+
.frame('target')
210+
.click('.btn-emit-event')
211+
.click('.btn-emit-event1')
212+
.click('.btn-emit-event2')
213+
.frame(null)
214+
.assert.containsText('.event-count', 3)
215+
.click('.button.events')
216+
.assert.elementNotPresent('.event-count')
217+
.assert.count('.history .entry', 3)
218+
.frame('target')
219+
.click('.btn-emit-log-event')
220+
.frame(null)
221+
.assert.count('.history .entry', 4)
222+
.setValue('.search input', 'event')
223+
.assert.count('.history .entry', 3)
224+
.clearValue('.search input')
225+
.setValue('.search input', 'EventChild1')
226+
.assert.count('.history .entry', 1)
227+
.clearValue('.search input')
228+
.click('.button.reset')
229+
.assert.count('.history .entry', 0)
230+
208231
// done
209232
.end()
210233
}

0 commit comments

Comments
 (0)