This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree 3 files changed +2
-28
lines changed
3 files changed +2
-28
lines changed Original file line number Diff line number Diff line change 16
16
var htmlAnchorDirective = valueFn ( {
17
17
restrict : 'E' ,
18
18
compile : function ( element , attr ) {
19
- if ( ! attr . href && ! attr . xlinkHref && ! attr . name ) {
19
+ if ( ! attr . href && ! attr . xlinkHref ) {
20
20
return function ( scope , element ) {
21
21
// If the linked element is not an anchor tag anymore, do nothing
22
22
if ( element [ 0 ] . nodeName . toLowerCase ( ) !== 'a' ) return ;
Original file line number Diff line number Diff line change 68
68
}, 5000, 'page should navigate to /123');
69
69
});
70
70
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() {
72
72
element(by.id('link-4')).click();
73
73
expect(element(by.model('value')).getAttribute('value')).toEqual('4');
74
74
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() {
82
82
} ) ;
83
83
84
84
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
-
98
85
it ( 'should not preventDefault if anchor element is replaced with href-containing element' , function ( ) {
99
86
spyOn ( jqLite . prototype , 'on' ) . andCallThrough ( ) ;
100
87
element = $compile ( '<a link-to="https://www.google.com">' ) ( $rootScope ) ;
@@ -168,19 +155,6 @@ describe('a', function() {
168
155
169
156
expect ( jq . prototype . on ) . not . toHaveBeenCalled ( ) ;
170
157
} ) ;
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
- } ) ;
184
158
} ) ;
185
159
}
186
160
} ) ;
You can’t perform that action at this time.
0 commit comments