MCPcopy
hub / github.com/layerJS/layerJS / detectChildrenChanges

Function detectChildrenChanges

test/e2e/observer/observer_spec.js:21–39  ·  view source on GitHub ↗
(elementId, childType)

Source from the content-addressed store, hash-verified

19 };
20
21 var detectChildrenChanges = function(elementId, childType) {
22 it('can detect new children', function() {
23 browser.get('observer/observer.html').then(function() {
24 utilities.getChildrenIds(elementId).then(function(beforeChildren) {
25 browser.driver.executeAsyncScript(function(id, type, callback) {
26 var element = document.getElementById(id);
27 var child = document.createElement('div');
28 child.setAttribute('data-lj-type', type);
29 element.appendChild(child);
30 callback();
31 }, elementId, childType).then(function() {
32 utilities.getChildrenIds(elementId).then(function(afterChildren) {
33 expect(afterChildren.length).toBe(beforeChildren.length + 1);
34 });
35 });
36 });
37 });
38 });
39 };
40
41 describe('frameView', function() {
42 // detectAttributeChanges('frame', 'data-lj-x', 'x', '100');

Callers 1

observer_spec.jsFile · 0.85

Calls 1

callbackFunction · 0.50

Tested by

no test coverage detected