sdc_client 0.57.12 → 0.57.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.idea/workspace.xml +11 -20
- package/dist/index.js +7 -7
- package/dist/ugly.index.js +1 -1
- package/package.json +1 -1
- package/src/simpleDomControl/AbstractSDC.js +4 -4
- package/src/simpleDomControl/sdc_controller.js +69 -17
- package/src/simpleDomControl/sdc_dom_events.js +1 -1
- package/src/simpleDomControl/sdc_main.js +361 -367
- package/src/simpleDomControl/sdc_socket.js +7 -4
- package/src/simpleDomControl/sdc_utils.js +1 -1
- package/src/simpleDomControl/sdc_view.js +357 -313
- package/test/dist.test.js +1 -1
- package/test/view.test.js +18 -1
package/test/dist.test.js
CHANGED
package/test/view.test.js
CHANGED
|
@@ -79,6 +79,23 @@ describe('Test reconcile', () => {
|
|
|
79
79
|
|
|
80
80
|
});
|
|
81
81
|
|
|
82
|
+
test('Load content 3', () => {
|
|
83
|
+
const a = '<div>' +
|
|
84
|
+
'<div><p>A1</p><p>B1</p></div>' +
|
|
85
|
+
'<div><p>A2</p><p>B2</p></div>' +
|
|
86
|
+
'</div>';
|
|
87
|
+
|
|
88
|
+
const b = '<div>' +
|
|
89
|
+
'<div><p>A2</p><p>B3</p></div>' +
|
|
90
|
+
'<div><p>A2</p><p>B4</p></div>' +
|
|
91
|
+
'</div>';
|
|
92
|
+
const $b = $(b);
|
|
93
|
+
const $a = $(a);
|
|
94
|
+
reconcile($b, $a);
|
|
95
|
+
expect($a.html()).toBe($(b).html());
|
|
96
|
+
|
|
97
|
+
});
|
|
98
|
+
|
|
82
99
|
|
|
83
100
|
test('Load Content Split', async () => {
|
|
84
101
|
const a = '<div>' +
|
|
@@ -133,7 +150,7 @@ describe('Controller reconcile', () => {
|
|
|
133
150
|
const newList = $('body').find('input').toArray();
|
|
134
151
|
expect(newList.length).toBe(5);
|
|
135
152
|
newList.forEach((x, i) => {
|
|
136
|
-
|
|
153
|
+
expect(x).toBe(oldList[i]);
|
|
137
154
|
});
|
|
138
155
|
|
|
139
156
|
|