New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly wait for a non-pending item #1006

Merged
merged 2 commits into from Mar 26, 2018

Conversation

Projects
None yet
1 participant
@smashwilson
Member

smashwilson commented Mar 26, 2018

The work in atom/atom#17021 causes this spec to fail:

ResultsView
  opening results
    it opens the file containing the result in a non-pending state when the search result is double-clicked
      Expected <TextEditor 1552> to be null.
        Error: Expected <TextEditor 1552> to be null.
        at /Users/distiller/atom/node_modules/find-and-replace/spec/results-view-spec.js:417:75
        at Generator.next (<anonymous>)
        at step (/Users/distiller/atom/node_modules/find-and-replace/spec/results-view-spec.js:1:428)
        at <anonymous>

This is because await paneItemOpening() now resolves after the single-click's Workspace.open() call resolves, but before the double-click's does to activate the item as non-pending. By explicitly waiting for a non-pending item to appear before resolving the helper we can make this more reliable.

smashwilson added some commits Mar 26, 2018

@smashwilson smashwilson merged commit 50147b1 into master Mar 26, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@smashwilson smashwilson deleted the aw/double-click-spec branch Mar 26, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment