Skip to content

Commit a400ef7

Browse files
committed
attributetesting
1 parent ecdf59d commit a400ef7

File tree

1 file changed

+84
-0
lines changed

1 file changed

+84
-0
lines changed
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
/* eslint-disable */
2+
/**
3+
* @jest-environment jsdom
4+
*/
5+
import mutations from "../../../src/store/mutations";
6+
import actions from "../../../src/store/actions";
7+
8+
import * as All from "quasar";
9+
import { inRange } from "lodash";
10+
import { iterate } from "localforage";
11+
const { Quasar, date } = All;
12+
13+
/**
14+
* @description: Tests for adding/changing attributes
15+
* @summary:
16+
* `addBinding mutation should alter/add binding property on hmtlList or hmtlAttribute
17+
* `
18+
* `
19+
*/
20+
21+
let hardB = {
22+
componentName: "b",
23+
htmlList: [{
24+
children: [{
25+
children: [{
26+
text: 'button',
27+
children: [],
28+
id: Date.now() + 1,
29+
binding: '',
30+
class: ''
31+
}],
32+
text: 'form',
33+
id: Date.now() + 2
34+
}],
35+
text: "div",
36+
id: Date.now() + 3
37+
}],
38+
children: [],
39+
parent: {},
40+
isActive: false
41+
}
42+
43+
const newState = {
44+
componentMap: {
45+
App: {
46+
componentName: 'App',
47+
children: ['HomeView'],
48+
htmlList: []
49+
},
50+
HomeView: {
51+
componentName: 'HomeView',
52+
children: ['b'],
53+
children: [],
54+
htmlList: []
55+
},
56+
a: hardB
57+
},
58+
routes: {
59+
HomeView: [hardB],
60+
NewView: []
61+
},
62+
componentNameInputValue: '',
63+
activeRoute: 'HomeView',
64+
activeComponent: '',
65+
activeHTML: '',
66+
activeLayer: {
67+
id: '',
68+
lineage: []
69+
},
70+
71+
selectedElementList: [],
72+
}
73+
74+
describe("testing for binding attribute", () => {
75+
let state;
76+
beforeEach(() => {
77+
state = newState;
78+
state.activeComponent = 'b';
79+
state.componentMap.b = hardB;
80+
});
81+
it("adding a binding attribute", () => {
82+
sa
83+
})
84+
})

0 commit comments

Comments
 (0)