@@ -28,7 +28,7 @@ import {
2828 ComponentWithUnregistered ,
2929 ComponentWithImperativeEvent ,
3030 ComponentWithDeclarativeEvent ,
31- ComponentWithMethods
31+ ComponentWithoutProperties
3232} from "./components" ;
3333
3434beforeEach ( function ( ) {
@@ -42,7 +42,7 @@ beforeEach(function() {
4242 ComponentWithUnregistered ,
4343 ComponentWithImperativeEvent ,
4444 ComponentWithDeclarativeEvent ,
45- ComponentWithMethods
45+ ComponentWithoutProperties
4646 ] ,
4747 schemas : [ CUSTOM_ELEMENTS_SCHEMA ]
4848 } ) ;
@@ -149,11 +149,15 @@ describe("basic support", function() {
149149 expect ( data ) . to . eql ( "Angular" ) ;
150150 } ) ;
151151
152- it ( 'will not overwrite methods ' , function ( ) {
153- let fixture = TestBed . createComponent ( ComponentWithMethods ) ;
152+ it ( 'will not overwrite unwriteable properties ' , function ( ) {
153+ let fixture = TestBed . createComponent ( ComponentWithoutProperties ) ;
154154 fixture . detectChanges ( ) ;
155155 let root = fixture . debugElement . nativeElement ;
156- expect ( root . innerText ) . to . eql ( 'Success' )
156+ let wc = root . querySelector ( "#wc" ) ;
157+ expect ( wc . getAttribute ( 'amethod' ) ) . to . eql ( 'method' ) ;
158+ expect ( wc . getAttribute ( 'agetter' ) ) . to . eql ( 'getter' ) ;
159+ expect ( wc . getAttribute ( 'areadonly' ) ) . to . eql ( 'readonly' ) ;
160+ expect ( wc . innerHTML ) . to . eql ( 'Success' ) ;
157161 } ) ;
158162 } ) ;
159163
0 commit comments