Extend pipe to sync input element
Change-Id: I38f9bc810b571fcbee0d5572d4f5b2d03a8f0a9c
diff --git a/dev/js/spec/pipeSpec.js b/dev/js/spec/pipeSpec.js
index 46cd5b9..078d4b1 100644
--- a/dev/js/spec/pipeSpec.js
+++ b/dev/js/spec/pipeSpec.js
@@ -88,5 +88,17 @@
p.remove('service0')
expect(p.toString()).toEqual('service1,service2,service3');
});
+
+ it('should sync with an element', function () {
+ let p = pipeClass.create();
+ let e = p.element();
+ expect(e.tagName).toEqual("INPUT");
+ p.append('service1');
+ expect(e.getAttribute("value")).toEqual("service1");
+ p.append('service2');
+ expect(e.getAttribute("value")).toEqual("service1,service2");
+ p.remove('service1');
+ expect(e.getAttribute("value")).toEqual("service2");
+ });
});
});