@@ -44,17 +44,42 @@ describe('Double binding', function(done){
44
44
} ) ;
45
45
} ) ;
46
46
47
+ describe ( 'Custom Elements with dash attributes' , function ( ) {
48
+ // Build in setup, check expectations in tests
49
+ var ngElement , polymerElement ;
50
+
51
+ beforeEach ( function ( done ) {
52
+ // The angular element is the first child (the <pre> tag)
53
+ ngElement = container2 . children [ 0 ] ;
54
+ polymerElement = container2 . children [ 1 ] ;
55
+
56
+ polymerElement . setAttribute ( 'in' , '2' ) ;
57
+
58
+ // Must wait one event loop for ??? to do its thing
59
+ setTimeout ( done , 0 ) ; // One event loop for Polymer to process
60
+ } ) ;
61
+
62
+ it ( 'sees polymer update properly' , function ( ) {
63
+ expect ( polymerElement . getAttribute ( 'out-value' ) ) . toEqual ( '4' ) ;
64
+ } ) ;
65
+
66
+ // The actual test
67
+ it ( 'sees values from polymer' , function ( ) {
68
+ expect ( ngElement . innerHTML ) . toEqual ( '4' ) ;
69
+ } ) ;
70
+ } ) ;
71
+
47
72
describe ( 'Double binding multiple polymer instances' , function ( done ) {
48
73
// Build in setup, check expectations in tests
49
74
var ngElementA , polymerElementA ;
50
75
var ngElementB , polymerElementB ;
51
76
52
77
beforeEach ( function ( done ) {
53
78
// The angular element is the first child (the <pre> tag)
54
- ngElementA = container2 . children [ 0 ] ;
55
- polymerElementA = container2 . children [ 1 ] ;
56
- ngElementB = container2 . children [ 2 ] ;
57
- polymerElementB = container2 . children [ 3 ] ;
79
+ ngElementA = container3 . children [ 0 ] ;
80
+ polymerElementA = container3 . children [ 1 ] ;
81
+ ngElementB = container3 . children [ 2 ] ;
82
+ polymerElementB = container3 . children [ 3 ] ;
58
83
59
84
polymerElementA . setAttribute ( 'in' , '2' ) ;
60
85
polymerElementB . setAttribute ( 'in' , '4' ) ;
0 commit comments