Last active
December 20, 2018 20:51
-
-
Save jxc876/f7a77cd326b41cac74c1ce5550b9fa02 to your computer and use it in GitHub Desktop.
vue test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ------------- component (template) ---------------- | |
<v-chip id='example-chip' v-show="showChip">Example Chip</v-chip> | |
<v-btn color="info" @click="showChip = true">Click Me</v-btn> | |
// ------------- component (data) ---------------- | |
data: () => ({ | |
showChip: false, | |
name: "mike" | |
}) | |
// ------------- component test ---------------- | |
it('should contain show a v-chip after clicking the button', () => { | |
let chip = wrapper.find('#example-chip'); | |
expect(chip.isVisible()).to.be.false; | |
wrapper.find('button').trigger('click'); | |
expect(chip.isVisible()).to.be.true; | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment