ember-cli-blueprint-test-helpers icon indicating copy to clipboard operation
ember-cli-blueprint-test-helpers copied to clipboard

Test with prompts

Open offirgolan opened this issue 8 years ago • 7 comments

I checked open and closed issues and I havent found anything about this. How do I pass a prompt in the middle of a running test?

screen shot 2016-06-23 at 6 16 11 pm

offirgolan avatar Jun 24 '16 01:06 offirgolan

Unfortunately there is currently no solution for this built into the project. If you have an idea on how to implement it please let us know.

Turbo87 avatar Jun 24 '16 04:06 Turbo87

Damn thats a bummer... Ill try to dig around and see if I can find a workaround.

offirgolan avatar Jun 24 '16 07:06 offirgolan

@offirgolan in the Ember CLI codebase we replace ui with a MockUI instance, that let's us mock the prompt() method. maybe that helps in some way.

Turbo87 avatar Jun 24 '16 08:06 Turbo87

@offirgolan have a look at https://github.com/ember-cli/ember-cli-eslint/pull/114 for an example on how to mock the inquirer prompt. it's not pretty yet, but it's a start...

Turbo87 avatar Aug 26 '16 18:08 Turbo87

@Turbo87 thats def. a great start! Thanks for updating me on this 😸. Feel free to close the issue!

offirgolan avatar Aug 27 '16 05:08 offirgolan

@Turbo87 Maybe use https://github.com/ceasbz/mockirer for mock inquirer prompt 😸

cauealvesbraz avatar Oct 21 '16 02:10 cauealvesbraz

Anyone know of anything that solves this issue? 😂

mansona avatar Jul 28 '20 19:07 mansona