File tree Expand file tree Collapse file tree 4 files changed +39
-3
lines changed
Expand file tree Collapse file tree 4 files changed +39
-3
lines changed Original file line number Diff line number Diff line change 213213 city: chance .city (),
214214 street: chance .address (),
215215 postcode: chance .postcode (),
216- country: chance .country ()
216+ country: chance .country ({ full : true } )
217217 },
218218 salary: chance .integer ({ min: 1500 , max: 3000 }),
219219 email: chance .email (),
Original file line number Diff line number Diff line change 11import { mount } from '@vue/test-utils'
22import VueBootstrap4Table from "../../../src/components/VueBootstrap4Table.vue" ;
3- import data from "../../../src/assets/toy_data/users_500.json"
43var should = require ( 'chai' ) . should ( )
54var expect = require ( 'chai' ) . expect
5+ import { testdata } from "../utils"
6+ var data = testdata ( ) ;
7+
68describe ( 'Global Search' , ( ) => {
79
810 it ( 'show global search text box & placeholder should be "Enter search text" if no global search config was provided' , ( done ) => {
Original file line number Diff line number Diff line change 11import { mount } from '@vue/test-utils'
22import VueBootstrap4Table from "../../../src/components/VueBootstrap4Table.vue" ;
3- import data from "../../../src/assets/toy_data/users_500.json"
3+ import { testdata } from "../utils"
4+ var data = testdata ( ) ;
45describe ( 'Refresh and Reset Buttons ' , ( ) => {
56
67 it ( 'hide refresh and reset button if the config is false' , ( done ) => {
Original file line number Diff line number Diff line change 1+ var chance = require ( 'chance' ) . Chance ( 88 ) ;
2+
3+ export function testdata ( ) {
4+ let user ;
5+ let users = [ ] ;
6+ for ( let i = 1 ; i <= 500 ; i ++ ) {
7+ user = {
8+ id : i ,
9+ name : {
10+ first_name : chance . first ( ) ,
11+ last_name : chance . last ( ) ,
12+ } ,
13+ age : chance . age ( ) ,
14+ address : {
15+ city : chance . city ( ) ,
16+ street : chance . address ( ) ,
17+ postcode : chance . postcode ( ) ,
18+ country : chance . country ( {
19+ full : true
20+ } )
21+ } ,
22+ salary : chance . integer ( {
23+ min : 1500 ,
24+ max : 3000
25+ } ) ,
26+ email : chance . email ( ) ,
27+ website : chance . domain ( ) ,
28+ mobile : chance . phone ( )
29+ }
30+ users . push ( user ) ;
31+ }
32+ return users ;
33+ }
You can’t perform that action at this time.
0 commit comments