File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616var htmlAnchorDirective = valueFn ( {
1717 restrict : 'E' ,
1818 compile : function ( element , attr ) {
19- if ( ! attr . href && ! attr . xlinkHref && ! attr . name ) {
19+ if ( ! attr . href && ! attr . xlinkHref ) {
2020 return function ( scope , element ) {
2121 // If the linked element is not an anchor tag anymore, do nothing
2222 if ( element [ 0 ] . nodeName . toLowerCase ( ) !== 'a' ) return ;
Original file line number Diff line number Diff line change 6868 }, 5000, 'page should navigate to /123');
6969 });
7070
71- xit ('should execute ng-click but not reload when href empty string and name specified', function() {
71+ it ('should execute ng-click but not reload when href empty string and name specified', function() {
7272 element(by.id('link-4')).click();
7373 expect(element(by.model('value')).getAttribute('value')).toEqual('4');
7474 expect(element(by.id('link-4')).getAttribute('href')).toBe('');
Original file line number Diff line number Diff line change @@ -82,19 +82,6 @@ describe('a', function() {
8282 } ) ;
8383
8484
85- it ( 'should not link and hookup an event if name is present at compile' , function ( ) {
86- var jq = jQuery || jqLite ;
87- element = jq ( '<a name="bobby">hello@you</a>' ) ;
88- var linker = $compile ( element ) ;
89-
90- spyOn ( jq . prototype , 'on' ) ;
91-
92- linker ( $rootScope ) ;
93-
94- expect ( jq . prototype . on ) . not . toHaveBeenCalled ( ) ;
95- } ) ;
96-
97-
9885 it ( 'should not preventDefault if anchor element is replaced with href-containing element' , function ( ) {
9986 spyOn ( jqLite . prototype , 'on' ) . andCallThrough ( ) ;
10087 element = $compile ( '<a link-to="https://www.google.com">' ) ( $rootScope ) ;
@@ -168,19 +155,6 @@ describe('a', function() {
168155
169156 expect ( jq . prototype . on ) . not . toHaveBeenCalled ( ) ;
170157 } ) ;
171-
172-
173- it ( 'should not link and hookup an event if name is present at compile' , function ( ) {
174- var jq = jQuery || jqLite ;
175- element = jq ( '<svg><a name="bobby">hello@you</a></svg>' ) ;
176- var linker = $compile ( element ) ;
177-
178- spyOn ( jq . prototype , 'on' ) ;
179-
180- linker ( $rootScope ) ;
181-
182- expect ( jq . prototype . on ) . not . toHaveBeenCalled ( ) ;
183- } ) ;
184158 } ) ;
185159 }
186160} ) ;
You can’t perform that action at this time.
0 commit comments