Skip to content

Conversation

lolmaus
Copy link

@lolmaus lolmaus commented Oct 3, 2023

Updated via pnpx ember-cli-update --to 3.28, followed by a few manual fixes.

@lolmaus lolmaus force-pushed the update-ember branch 2 times, most recently from 2b3fa53 to 2bf7ae5 Compare October 4, 2023 09:49
@codecov
Copy link

codecov bot commented Oct 4, 2023

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.08%. Comparing base (94e197a) to head (128f6ae).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #240   +/-   ##
=======================================
  Coverage   82.08%   82.08%           
=======================================
  Files         136      136           
  Lines        1016     1016           
=======================================
  Hits          834      834           
  Misses        182      182           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lolmaus
Copy link
Author

lolmaus commented Oct 4, 2023

@kategengler This is ready for review! 🙏

>
{{#if addonName.isFullSearchLink}}
<LinkTo @route="index" @query={{hash query=options.searchText}} class="jump-to-full-search test-search-result-jump-to-full-search-link">
<span class="jump-to-full-search test-search-result test-search-result-jump-to-full-search-link">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You've lost behavior here, however -- you can no longer right click -> open in new tab from the results in the typeahead.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kategengler I have reverted that commit and found no other solution to it. The problem is very weird:

When an <a> inside a PowerSelect's <li> is clicked, a hard redirect happens. The action attached to the <a> never fires.

The event target is <a>, while the event handler is attached to the <li>.

My guess is that it's the browser that's causing a hard redirect as it processes the click on <a>. But event.preventDefault() and event.stopPropagation() don't prevent this. :(

It only happens programmatically. I. e. when I replace click() with pauseTest(), click by hand and resume, the test passes.

I worked around the issue by replacing click(find('a')) with click(find('a').parentElement). This is not a good solution as it's not what the user is actually doing. But it happens to resolve the issue, and the issue only happens in test.

If you have any other ideas to fix this, please tell me. One possibility is to upgrade Ember further, maybe it's a regression that has been fixed.

CC @mansona

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants