@@ -20,7 +20,7 @@ define([
2020 defaultContext = require . s . contexts . _ ,
2121 menuItem = $ (
2222 '<li class="level0 category-item">' +
23- '<a href="http://localhost.com/cat1.html" id="ui-id-3" >Cat1</a>' +
23+ '<a href="http://localhost.com/cat1.html">Cat1</a>' +
2424 '</li>'
2525 ) [ 0 ] ,
2626
@@ -116,14 +116,14 @@ define([
116116 } ) ;
117117
118118 it ( 'Check _getCategoryCrumb call' , function ( ) {
119- var item = $ ( '<a href="http://localhost.com/cat1.html" id="ui-id-3" >Cat1</a>' ) ;
119+ var item = $ ( '<a href="http://localhost.com/cat1.html">Cat1</a>' ) ;
120120
121121 expect ( widget ) . toBeDefined ( ) ;
122122 expect ( widget ) . toEqual ( jasmine . any ( Function ) ) ;
123123 expect ( widget . prototype . _getCategoryCrumb ) . toBeDefined ( ) ;
124124 expect ( widget . prototype . _getCategoryCrumb ( item ) ) . toEqual ( jasmine . objectContaining (
125125 {
126- 'name' : 'category3 ' ,
126+ 'name' : 'category ' ,
127127 'label' : 'Cat1' ,
128128 'link' : 'http://localhost.com/cat1.html'
129129 }
@@ -232,7 +232,7 @@ define([
232232 expect ( result . length ) . toBe ( 1 ) ;
233233 expect ( result [ 0 ] ) . toEqual ( jasmine . objectContaining (
234234 {
235- 'name' : 'category3 ' ,
235+ 'name' : 'category ' ,
236236 'label' : 'Cat1' ,
237237 'link' : 'http://localhost.com/cat1.html'
238238 }
@@ -243,10 +243,10 @@ define([
243243 var result ,
244244 menuItems = $ (
245245 '<li class="level0 nav-1">' +
246- '<a href="http://localhost.com/cat1.html" id="ui-id-3" >cat1</a>' +
246+ '<a href="http://localhost.com/cat1.html">cat1</a>' +
247247 '<ul>' +
248248 '<li class="level1 nav-1-1">' +
249- '<a href="http://localhost.com/cat1/cat21.html" id="ui-id-9" >cat21</a>' +
249+ '<a href="http://localhost.com/cat1/cat21.html">cat21</a>' +
250250 '</li>' +
251251 '</ul>' +
252252 '</li>'
@@ -262,14 +262,14 @@ define([
262262
263263 context = createContext ( widget . prototype ) ;
264264 getParentMenuHandler = widget . prototype . _getParentMenuItem . bind ( context ) ;
265- result = getParentMenuHandler ( $ ( '#ui-id-9 ' ) ) ;
265+ result = getParentMenuHandler ( $ ( '[href="http://localhost.com/cat1/cat21.html"] ' ) ) ;
266266
267267 expect ( result ) . toBeDefined ( ) ;
268268 expect ( result . length ) . toBe ( 1 ) ;
269269 expect ( result [ 0 ] . tagName . toLowerCase ( ) ) . toEqual ( 'a' ) ;
270- expect ( result . attr ( 'id ' ) ) . toEqual ( 'ui-id-3 ' ) ;
270+ expect ( result . attr ( 'href ' ) ) . toEqual ( 'http://localhost.com/cat1.html ' ) ;
271271
272- result = getParentMenuHandler ( $ ( '#ui-id-3 ' ) ) ;
272+ result = getParentMenuHandler ( $ ( '[href="http://localhost.com/cat1.html"] ' ) ) ;
273273
274274 expect ( result ) . toBeNull ( ) ;
275275 } ) ;
0 commit comments