Skip to content
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

Introduce resumeTest to complement pauseTest? #146

Closed
trentmwillis opened this issue Jun 3, 2016 · 11 comments
Closed

Introduce resumeTest to complement pauseTest? #146

trentmwillis opened this issue Jun 3, 2016 · 11 comments

Comments

@trentmwillis
Copy link
Member

The current implementation of pauseTest does its job well but it would be nicely complemented by introducing a way to resume the test that gets paused.

One particular use case for wanting this is to encourage developers to enable easier debugging/development against Acceptance tests. It's great to pause a test and try changing some things and then resume the test to ensure the rest of the flow works.

One drawback, however, is that any "resume" function would need to be bound to the global context (window in almost all cases) so that users can easily invoke it from the console.

I know I've seen implementations of this before, but couldn't seem to find any issue pointing to whether or not discussion was had on adding it to the core test helper.

@rwjblue
Copy link
Member

rwjblue commented Jun 3, 2016

The implementation that I have seen was a gist from @stefanpenner, maybe he still has it handy?

@trentmwillis
Copy link
Member Author

There was also this in the original PR (seems to have gone largely unnoticed): emberjs/ember.js#9383 (comment)

@stefanpenner
Copy link
Member

https://gist.github.com/stefanpenner/0baadd08d0733f9e8ae0#file-pause-test-js although that example uses a getter, which may or may not be of value.

@trentmwillis
Copy link
Member Author

Would a PR adding this into core be welcome? If so, I'll pull it together with some tests

@mixonic
Copy link
Sponsor Member

mixonic commented Jun 4, 2016

I'm not certain how well making a change and resuming will work in practice, but this would be pretty low hanging fruit to add behind a feature flag and experiment with. I'd be +1 to see a PR. :-D

@rwjblue
Copy link
Member

rwjblue commented Jun 4, 2016

Agree

@trentmwillis
Copy link
Member Author

I'm not certain how well making a change and resuming will work in practice

True, but at the very least this will enable the ability to use more than one pauseTest to walk through an Acceptance test (which means I can stop using andThen(() => { debugger; })).

@stefanpenner
Copy link
Member

I'm not certain how well making a change and resuming will work in practice,

its less about resuming after a change, and more about being able to emulate debugger, without blocking the entire thread of execution. I can say with confidence this pause/resume works really well with acceptance tests. So +1 from me.

@dgeb
Copy link
Member

dgeb commented Sep 30, 2016

Note: To make the Final Comment Period official, we need to announce it here and on Twitter, so we're restarting the period now.


This RFC is now entering a "final comment period". This period is intended to focus the community's attention for a final round of consideration and feedback before an RFC is merged.

Please carefully consider the implications of this RFC and how it will affect your Ember projects. Now would be a good time to re-raise any concerns that you feel haven't been fully addressed.

If no significant blockers are raised by October 7, we plan to merge this RFC and make plans for its implementation. :shipit:

@rwjblue
Copy link
Member

rwjblue commented Oct 7, 2016

FCP didn't drum up any additional feedback, and we are still 👍 on the feature. Lets do it!

@rwjblue
Copy link
Member

rwjblue commented Oct 7, 2016

Closing this issue in favor of emberjs/ember.js#13663

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

No branches or pull requests

5 participants