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

Scenario outlines redux #155

Closed

Conversation

vantreeseba
Copy link
Contributor

A different implementation of #75, this addresses #10 as well.

Currently, this spec does NOT rename the scenarios generated from the outline scenario.

Everything should be covered by spec tests.

Please suggest any changes to implementation, hopefully we can all get this feature completed and integrated :)

hairyhum and others added 30 commits May 28, 2012 01:00
[*] Fixed data table example mapping
@vantreeseba
Copy link
Contributor Author

@jbpros I noticed in the other pull request you mentioned that this needs to be tested thoroughly in the cucumber-tck.

From what I can tell, the cucumber-tck is a "base line for all implementations of cucumber", but currently cucumber-js has no defined steps for any of the cucumber-tck features, and the feature file for the scenario_outlines is empty.

How should I remedy this situation?

@buritica
Copy link

Hey all, by running cucumber.js with no arguments on this branch I'm getting the following:

/Users/buritica/htdocs/cucumber-js/lib/cucumber/ast/assembler.js:88
      currentScenarioOrBackground.setExamples(examples);
                                  ^
TypeError: Object #<Object> has no method 'setExamples'

You can see the rest of the trace, including the feature file and the log of currentScenarioOrBackground object at https://gist.github.com/Buritica/9040233

I cloned @vantreeseba's fork and npm linked it to both my global and local installations of cucumber. Is there anything I am missing or do you need other information from the error?.

@vantreeseba
Copy link
Contributor Author

@buritica I'm looking into this now.

@vantreeseba
Copy link
Contributor Author

@buritica You must name the scenario a scenario outline instead. From what I can tell this is the way that regular cucumber works as well.

I will add a check in the assembler that gives you a better warning instead of an explosion. :)

@vantreeseba
Copy link
Contributor Author

@buritica As of the newest commit, this should give you a proper error message.

@buritica
Copy link

Thanks @vantreeseba, should have read better. I'm just getting started with Cucumber in general, so thank you for pointing this out.

After changing this to a Scenario Outline things work as expected, although the Scenario is run twice. Not sure if expected:

@vantreeseba
Copy link
Contributor Author

@buritica Can you repaste your new feature file for me so I can try and replicate this issue again?

I used the original one in your gist, and cannot replicate.

…elize outline variables when put into arguments list
@buritica
Copy link

You can get it from here, https://cloudup.com/cy8L2sCgu48. I also added a screenshot, it seems to run steps twice for every example. Let me know if I can help you more.

@vantreeseba
Copy link
Contributor Author

Yeah, I have this duplicated now, I"m looking into it. Thanks for the bug report :)

@vantreeseba
Copy link
Contributor Author

@buritica I found the duplicated steps issue and have corrected it.

@AdrienLemaire
Copy link

Wonderful, seems like I'll be able to use cucumber-js in my project real soon :D Thank you very much for your hard work @vantreeseba !

@alexoldenburg
Copy link

I could really use this great feature!
Could you give us an update on how long we have to wait for this feature to be merged?

Thanks in advance,

Ilinea

@jbpros jbpros closed this in c2a9916 Mar 5, 2014
@jbpros
Copy link
Member

jbpros commented Mar 5, 2014

Thank you @fedotov-danil and @vantreeseba for your hard work. This is awesome!

@lock
Copy link

lock bot commented Oct 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants