Improve handling of multiple example blocks within a Scenario Outline #1

Closed
SimonDexter opened this Issue Sep 7, 2012 · 7 comments

Comments

Projects
None yet
2 participants
@SimonDexter

Implement better handling of multiple example tables within a single Scenario Outline by retaining comments where possible and filtering out repeat parameter rows in example tables (see below example):-

Scenario Outline: Password validation
Given ...
When ...
Then ...

Examples: Too short
Passwords are invalid if less than 4 characters

| Password | Valid or invalid |
| abc | invalid |
| ab1 | invalid |

Examples: Letters and Numbers
Passwords need both letters and numbers to be valid

| Password | Valid or invalid |
| abc1 | valid |
| abcd | invalid |
| abcd1 | valid |

Currently Pickles output under v0.7 is something like:-

Password validation

Examples

| Password | Valid or invalid |
| abc | invalid |
| ab1 | invalid |
| Password | Valid or invalid |
| abc1 | valid |
| abcd | invalid |
| abcd1 | valid |

x97mdr added a commit that referenced this issue Sep 25, 2012

@ghost ghost assigned x97mdr Sep 25, 2012

@x97mdr

This comment has been minimized.

Show comment
Hide comment
@x97mdr

x97mdr Sep 25, 2012

Member

I haven't had a chance to test this out on a project locally. Simon, if you get this can you grab the latest build from teamcity (or compile this) and let me know if it worked correctly? If not, I'll try it tomorrow.

Member

x97mdr commented Sep 25, 2012

I haven't had a chance to test this out on a project locally. Simon, if you get this can you grab the latest build from teamcity (or compile this) and let me know if it worked correctly? If not, I'll try it tomorrow.

@SimonDexter

This comment has been minimized.

Show comment
Hide comment
@SimonDexter

SimonDexter Sep 27, 2012

Hi Jeff, pulled the latest build from Team City and tried it out today. Huge improvement I have to see, excellent work. A point that we spotted is that the descriptive label applied immediately after the "Example:" is not being shown. So from below:-

Examples: Too short
Passwords are invalid if less than 4 characters

| Password | Valid or invalid |
| abc | invalid |
| ab1 | invalid |

What we are seeing in the latest version of Pickles is the following (note the missing "Too short" label after Examples:):-

Examples:
Passwords are invalid if less than 4 characters

| Password | Valid or invalid |
| abc | invalid |
| ab1 | invalid |

Great work. Look forward to the next version :)

Hi Jeff, pulled the latest build from Team City and tried it out today. Huge improvement I have to see, excellent work. A point that we spotted is that the descriptive label applied immediately after the "Example:" is not being shown. So from below:-

Examples: Too short
Passwords are invalid if less than 4 characters

| Password | Valid or invalid |
| abc | invalid |
| ab1 | invalid |

What we are seeing in the latest version of Pickles is the following (note the missing "Too short" label after Examples:):-

Examples:
Passwords are invalid if less than 4 characters

| Password | Valid or invalid |
| abc | invalid |
| ab1 | invalid |

Great work. Look forward to the next version :)

@x97mdr

This comment has been minimized.

Show comment
Hide comment
@x97mdr

x97mdr Sep 27, 2012

Member

Interesting ... I'll look into it! Thanks Simon.

You may have sent me an example already, but could you attach one to the
issue here (if possible?) I"ll make sure it looks perfect before sending
up another commit.

On Thu, Sep 27, 2012 at 5:06 AM, Simon Dexter notifications@github.comwrote:

Hi Jeff, pulled the latest build from Team City and tried it out today.
Huge improvement I have to see, excellent work. A point that we spotted is
that the descriptive label applied immediately after the "Example:" is not
being shown. So from below:-

Examples: Too short
Passwords are invalid if less than 4 characters

| Password | Valid or invalid |
| abc | invalid |
| ab1 | invalid |

What we are seeing in the latest version of Pickles is the following (note
the missing "Too short" label after Examples:):-

Examples:
Passwords are invalid if less than 4 characters

| Password | Valid or invalid |
| abc | invalid |
| ab1 | invalid |

Great work. Look forward to the next version :)


Reply to this email directly or view it on GitHubhttps://github.com/picklesdoc/pickles/issues/1#issuecomment-8930210.

Member

x97mdr commented Sep 27, 2012

Interesting ... I'll look into it! Thanks Simon.

You may have sent me an example already, but could you attach one to the
issue here (if possible?) I"ll make sure it looks perfect before sending
up another commit.

On Thu, Sep 27, 2012 at 5:06 AM, Simon Dexter notifications@github.comwrote:

Hi Jeff, pulled the latest build from Team City and tried it out today.
Huge improvement I have to see, excellent work. A point that we spotted is
that the descriptive label applied immediately after the "Example:" is not
being shown. So from below:-

Examples: Too short
Passwords are invalid if less than 4 characters

| Password | Valid or invalid |
| abc | invalid |
| ab1 | invalid |

What we are seeing in the latest version of Pickles is the following (note
the missing "Too short" label after Examples:):-

Examples:
Passwords are invalid if less than 4 characters

| Password | Valid or invalid |
| abc | invalid |
| ab1 | invalid |

Great work. Look forward to the next version :)


Reply to this email directly or view it on GitHubhttps://github.com/picklesdoc/pickles/issues/1#issuecomment-8930210.

@SimonDexter

This comment has been minimized.

Show comment
Hide comment
@SimonDexter

SimonDexter Sep 27, 2012

Yes sure, here is a specflow source for a multi-example scenario outline with both example labels and description of each example underneath. I believe both are optional according to Cucumber:
http://screencast.com/t/RnCBv3x0A

This is the output I am getting from Pickles v0.8.55.0:
http://screencast.com/t/bM22D7JPl

Upon closer inspection there is also another problem I have just spotted and that is, if you have two scenario outlines with example tables in the same feature, the last example from the previous scenario outline appears as the first example in the next scenario outline.

This is the first scenario outline occurrence:
http://screencast.com/t/3JhBxVJ7m

This is the second scenario outline occurrence with the repeated example table from the first scenario:
http://screencast.com/t/CLBaMIlZqOPo

Hope this helps
:)

Yes sure, here is a specflow source for a multi-example scenario outline with both example labels and description of each example underneath. I believe both are optional according to Cucumber:
http://screencast.com/t/RnCBv3x0A

This is the output I am getting from Pickles v0.8.55.0:
http://screencast.com/t/bM22D7JPl

Upon closer inspection there is also another problem I have just spotted and that is, if you have two scenario outlines with example tables in the same feature, the last example from the previous scenario outline appears as the first example in the next scenario outline.

This is the first scenario outline occurrence:
http://screencast.com/t/3JhBxVJ7m

This is the second scenario outline occurrence with the repeated example table from the first scenario:
http://screencast.com/t/CLBaMIlZqOPo

Hope this helps
:)

@x97mdr

This comment has been minimized.

Show comment
Hide comment
@x97mdr

x97mdr Sep 27, 2012

Member

That should be more than enough! thank you.

I should have a bit of time to work on this tomorrow.

On Thu, Sep 27, 2012 at 7:17 AM, Simon Dexter notifications@github.comwrote:

Yes sure, here is a specflow source for a multi-example scenario outline
with both example labels and description of each example underneath. I
believe both are optional according to Cucumber:
http://screencast.com/t/RnCBv3x0A

This is the output I am getting from Pickles v0.8.55.0:
http://screencast.com/t/bM22D7JPl

Upon closer inspection there is also another problem I have just spotted
and that is, if you have two scenario outlines with example tables in the
same feature, the last example from the previous scenario outline appears
as the first example in the next scenario outline.

This is the first scenario outline occurrence:
http://screencast.com/t/3JhBxVJ7m

This is the second scenario outline occurrence with the repeated example
table from the first scenario:
http://screencast.com/t/CLBaMIlZqOPo

Hope this helps
:)


Reply to this email directly or view it on GitHubhttps://github.com/picklesdoc/pickles/issues/1#issuecomment-8933012.

Member

x97mdr commented Sep 27, 2012

That should be more than enough! thank you.

I should have a bit of time to work on this tomorrow.

On Thu, Sep 27, 2012 at 7:17 AM, Simon Dexter notifications@github.comwrote:

Yes sure, here is a specflow source for a multi-example scenario outline
with both example labels and description of each example underneath. I
believe both are optional according to Cucumber:
http://screencast.com/t/RnCBv3x0A

This is the output I am getting from Pickles v0.8.55.0:
http://screencast.com/t/bM22D7JPl

Upon closer inspection there is also another problem I have just spotted
and that is, if you have two scenario outlines with example tables in the
same feature, the last example from the previous scenario outline appears
as the first example in the next scenario outline.

This is the first scenario outline occurrence:
http://screencast.com/t/3JhBxVJ7m

This is the second scenario outline occurrence with the repeated example
table from the first scenario:
http://screencast.com/t/CLBaMIlZqOPo

Hope this helps
:)


Reply to this email directly or view it on GitHubhttps://github.com/picklesdoc/pickles/issues/1#issuecomment-8933012.

x97mdr added a commit that referenced this issue Oct 20, 2012

picklesdoc/pickles#1 Fixed bug
The example name should now be produced in the output
@x97mdr

This comment has been minimized.

Show comment
Hide comment
@x97mdr

x97mdr Oct 20, 2012

Member

Sorry, I haven't had much time to work on issues lately. I think its all fixed up now though

Member

x97mdr commented Oct 20, 2012

Sorry, I haven't had much time to work on issues lately. I think its all fixed up now though

x97mdr added a commit that referenced this issue Oct 20, 2012

picklesdoc/pickles#1 Fixed second part of bug
If multiple scenario outlines are present in a file then the examples
are rendered appropriately

@x97mdr x97mdr closed this Oct 20, 2012

@SimonDexter

This comment has been minimized.

Show comment
Hide comment
@SimonDexter

SimonDexter Nov 7, 2012

Thanks Jeff - I have gotten around to looking at multiple example blocks and they are looking much better!

Thanks Jeff - I have gotten around to looking at multiple example blocks and they are looking much better!

dirkrombauts pushed a commit that referenced this issue Nov 12, 2013

Merge pull request #1 from aaronjrich/html-collapsable-features
Extended knockout style collapsable features

dirkrombauts pushed a commit that referenced this issue Jun 3, 2014

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