1- import  {  click ,  fillIn ,  currentURL  }  from  '@ember/test-helpers' ; 
1+ import  {  click ,  fillIn ,  find ,   currentURL  }  from  '@ember/test-helpers' ; 
22import  {  module ,  test  }  from  'qunit' ; 
33import  {  setupEmberObserverTest  }  from  '../helpers/setup-ember-observer-test' ; 
44import  {  selectChoose  }  from  'ember-power-select/test-support/helpers' ; 
@@ -122,7 +122,19 @@ module('Acceptance | header search', function (hooks) {
122122
123123    await  fillIn ( '.test-header-search input' ,  'test' ) ; 
124124
125-     await  click ( findByText ( '.test-search-result-addon-link' ,  'addon-test' ) ) ; 
125+     /** 
126+      * Note: Parent element <li> is being clicked here, whereas in real life user 
127+      * clicks <a> inside <li>. The problem is that current implementation of the 
128+      * component has an <a> inside PowerSelect that attaches a listener to <li>. 
129+      * After upgrading to 3.28, this started producing a hard redirect that breaks 
130+      * the flow of test and causes a browser timeout. 
131+      * This only happens with programmatic click, while real mouse click behaves 
132+      * as expected. 
133+      * `.parentElement` should be removed once the hard redirect is figured out. 
134+      */ 
135+     await  click ( 
136+       findByText ( '.test-search-result-addon-link' ,  'addon-test' ) . parentElement 
137+     ) ; 
126138
127139    assert . equal ( 
128140      currentURL ( ) , 
@@ -132,7 +144,9 @@ module('Acceptance | header search', function (hooks) {
132144
133145    await  fillIn ( '.test-header-search input' ,  'foo' ) ; 
134146
135-     await  click ( '.test-search-result-jump-to-full-search-link' ) ; 
147+     await  click ( 
148+       find ( '.test-search-result-jump-to-full-search-link' ) . parentElement 
149+     ) ; 
136150
137151    assert . equal ( 
138152      currentURL ( ) , 
0 commit comments