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

Add scenario outlines' examples insertions inside the DocString's content. #146

Merged
merged 5 commits into from
Mar 11, 2024

Conversation

farost
Copy link
Contributor

@farost farost commented Mar 7, 2024

This pull request fixes this issue by updating DocStrings' contents while running Scenario Outline tests based on the Examples table.

Following this similar issue's solution, both a unit test and a behaviour test are added.

Copy link
Owner

@ttutisani ttutisani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To preserve this work, I decided to merge it and leave the other changes I mentioned for future releases.
Please address the comments first.

Copy link
Contributor Author

@farost farost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed naming based on the comments, lgtm.

@farost
Copy link
Contributor Author

farost commented Mar 8, 2024

@ttutisani The comments have been addressed!

ttutisani
ttutisani previously approved these changes Mar 8, 2024
Copy link
Owner

@ttutisani ttutisani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ttutisani
Copy link
Owner

ttutisani commented Mar 8, 2024

Can't merge, your tests fail due to line endings. I'm assuming you are on Linux/Unix, and I'm on windows.

image

You need to use Environment.NewLine in your tests instead of "Enter" to separate lines.
Like this:

image

This is from Placeholders.cs. All errors come from there. You have a string in the assertions that has new-lines.

This approach is generally a good practice to write cross-platform tests.

@farost
Copy link
Contributor Author

farost commented Mar 8, 2024

Thanks! My bad, I'm too used to writing and running all the tests (even production ones) on Unix-based servers. I'll fix it tomorrow.

@farost
Copy link
Contributor Author

farost commented Mar 9, 2024

Fixed + tested on Windows. Gonna run it on Mac tomorrow just in case.

@farost
Copy link
Contributor Author

farost commented Mar 10, 2024

Tests pass on Mac as well!

@ttutisani ttutisani merged commit 5d3afaf into ttutisani:master Mar 11, 2024
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

Successfully merging this pull request may close these issues.

Scenario outlines don't push values into DocString objects
2 participants