-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a438ecf
commit c5c1037
Showing
4 changed files
with
84 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import Component from './src/QInputNumber.vue'; | ||
|
||
describe('QInputNumber', () => { | ||
it('should match snapshot', async () => { | ||
const { element } = shallowMount(Component); | ||
|
||
expect(element).toMatchSnapshot(); | ||
}); | ||
|
||
it('should match snapshot without controls', async () => { | ||
const { element } = shallowMount(Component, { | ||
propsData: { | ||
controls: false | ||
} | ||
}); | ||
|
||
expect(element).toMatchSnapshot(); | ||
}); | ||
|
||
it('data should match snapshot', () => { | ||
expect(Component.data()).toMatchSnapshot(); | ||
}); | ||
}); |
55 changes: 55 additions & 0 deletions
55
src/qComponents/QInputNumber/__snapshots__/QInputNumber.test.js.snap
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`QInputNumber data should match snapshot 1`] = ` | ||
Object { | ||
"number": null, | ||
"prevNumber": null, | ||
"userNumber": null, | ||
} | ||
`; | ||
|
||
exports[`QInputNumber should match snapshot 1`] = ` | ||
<div | ||
class="q-input-number q-input-number_with-controls" | ||
> | ||
<button | ||
class="q-input-number__button_decrease q-input-number__button q-icon-minus" | ||
/> | ||
<q-input-stub | ||
autocomplete="off" | ||
class="q-input-number__input" | ||
label="" | ||
suffixicon="" | ||
tabindex="" | ||
type="text" | ||
validateevent="true" | ||
value="" | ||
/> | ||
<button | ||
class="q-input-number__button_increase q-input-number__button q-icon-plus" | ||
/> | ||
</div> | ||
`; | ||
|
||
exports[`QInputNumber should match snapshot without controls 1`] = ` | ||
<div | ||
class="q-input-number" | ||
> | ||
<!----> | ||
<q-input-stub | ||
autocomplete="off" | ||
class="q-input-number__input" | ||
label="" | ||
suffixicon="" | ||
tabindex="" | ||
type="text" | ||
validateevent="true" | ||
value="" | ||
/> | ||
<!----> | ||
</div> | ||
`; |
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
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