Skip to content

Commit 5fdb6d0

Browse files
committed
fixed build issue
1 parent 961d728 commit 5fdb6d0

File tree

4 files changed

+39
-3
lines changed

4 files changed

+39
-3
lines changed

src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@
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(),

test/unit/specs/globalsearch.spec.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import { mount } from '@vue/test-utils'
22
import VueBootstrap4Table from "../../../src/components/VueBootstrap4Table.vue";
3-
import data from "../../../src/assets/toy_data/users_500.json"
43
var should = require('chai').should()
54
var expect = require('chai').expect
5+
import { testdata } from "../utils"
6+
var data = testdata();
7+
68
describe('Global Search', () => {
79

810
it('show global search text box & placeholder should be "Enter search text" if no global search config was provided', (done) => {

test/unit/specs/refresh-reset-buttons.spec.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { mount } from '@vue/test-utils'
22
import 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();
45
describe('Refresh and Reset Buttons ', () => {
56

67
it('hide refresh and reset button if the config is false', (done) => {

test/unit/utils.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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+
}

0 commit comments

Comments
 (0)