@@ -272,19 +272,17 @@ describe("Component Behavior", () => {
272
272
assert . strictEqual ( input . getValue ( ) , "Application 2" , "Input value is set by click event of the second menu item" ) ;
273
273
} ) ;
274
274
275
- it ( "tests if searchfield appears when clicking on search icon" , ( ) => {
275
+ it ( "tests if searchfield toggles when clicking on search icon" , ( ) => {
276
276
const searchIcon = browser . $ ( "#shellbar" ) . shadow$ ( ".ui5-shellbar-search-button" ) ;
277
277
const searchField = browser . $ ( "#shellbar ui5-input" ) ;
278
- const blockLayer = browser . $ ( "#shellbar" ) . shadow$ ( ".ui5-shellbar-block-layer" ) ;
279
278
280
279
assert . strictEqual ( searchField . isDisplayed ( ) , false , "Search is hidden by default" ) ;
281
280
282
281
searchIcon . click ( ) ;
283
282
assert . strictEqual ( searchField . isDisplayed ( ) , true , "Search is visible after clicking on icon" ) ;
284
283
285
- // focus out the input
286
- blockLayer . click ( ) ;
287
- assert . strictEqual ( searchField . isDisplayed ( ) , false , "Search is hidden when focussed out" ) ;
284
+ searchIcon . click ( ) ;
285
+ assert . strictEqual ( searchField . isDisplayed ( ) , false , "Search is hidden after clicking again on the icon" ) ;
288
286
} ) ;
289
287
} ) ;
290
288
@@ -345,25 +343,23 @@ describe("Component Behavior", () => {
345
343
assert . strictEqual ( input . getValue ( ) , "Product Switch" , "Input value is set by click event of Product Switch icon" ) ;
346
344
} ) ;
347
345
348
- it ( "tests if searchfield appears when clicking on search icon" , ( ) => {
346
+ it ( "tests if searchfield toggles when clicking on search icon" , ( ) => {
349
347
const overflowButton = browser . $ ( "#shellbar" ) . shadow$ ( ".ui5-shellbar-overflow-button" ) ;
350
348
const searchField = browser . $ ( "#shellbar ui5-input" ) ;
351
349
const staticAreaItemClassName = browser . getStaticAreaItemClassName ( "#shellbar" )
352
350
const overflowPopover = browser . $ ( `.${ staticAreaItemClassName } ` ) . shadow$ ( ".ui5-shellbar-overflow-popover" ) ;
353
351
const searchListItem = overflowPopover . $ ( "ui5-list ui5-li:nth-child(1)" ) ;
354
- const blockLayer = browser . $ ( "#shellbar" ) . shadow$ ( ".ui5-shellbar-block-layer" ) ;
355
-
356
352
357
353
assert . strictEqual ( searchField . isDisplayed ( ) , false , "Search is hidden by default" ) ;
358
354
359
355
overflowButton . click ( ) ;
360
356
searchListItem . click ( ) ;
361
357
362
- assert . strictEqual ( searchField . isDisplayed ( ) , true , "Search is visible after clicking on icon" ) ;
358
+ assert . strictEqual ( searchField . isDisplayed ( ) , true , "Search is visible after clicking on the search icon within the overflow " ) ;
363
359
364
- // focus out the input
365
- blockLayer . click ( ) ;
366
- assert . strictEqual ( searchField . isDisplayed ( ) , false , "Search is hidden when focussed out " ) ;
360
+ overflowButton . click ( ) ;
361
+ searchListItem . click ( ) ;
362
+ assert . strictEqual ( searchField . isDisplayed ( ) , false , "Search is hidden after clicking on the search icon agian " ) ;
367
363
} ) ;
368
364
} ) ;
369
365
} ) ;
0 commit comments