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

Samples: Add "Empty" Sample #103

Merged
merged 11 commits into from
Sep 23, 2024
Merged

Samples: Add "Empty" Sample #103

merged 11 commits into from
Sep 23, 2024

Conversation

luke-hill
Copy link
Contributor

@luke-hill luke-hill commented Jul 5, 2024

🤔 What's changed?

Adds a new item to the CCK Spec (For discussion), the Empty Sample. Fixes #92

⚡️ What's your motivation?

We've discussed this for years and never got anywhere. I figure at least we can agree on what the spec should be (I think having a background and a non-background empty scenario is best as it covers both use cases).

🏷️ What kind of change is this?

  • ⚡ New feature (non-breaking change which adds new behaviour)

♻️ Anything particular you want feedback on?

Steps to agree

  • The feature itself is complete & Signed off by TLC
  • Do we agree on the desired output. i.e. what should be returned as a "CCK conformant cucumber flavour"
  • Fake cucumber and the NDJSON output return said CCK conformance

📋 Checklist:

  • I agree to respect and uphold the Cucumber Community Code of Conduct
  • I've changed the behaviour of the code
    • I have added/updated tests to cover my changes.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • Users should know about my change
    • I have added an entry to the "Unreleased" section of the CHANGELOG, linking to this pull request.

This text was originally generated from a template, then edited by hand. You can modify the template here.

Copy link
Contributor

@mpkorstanje mpkorstanje left a comment

Choose a reason for hiding this comment

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

I think we have a problem with fake-cucumber. We don't need to fix it now I think. A simpler test case without any backgrounds in the feature file should be sufficient.

devkit/samples/empty/empty.feature Outdated Show resolved Hide resolved
{"testCaseStarted":{"attempt":0,"id":"14","testCaseId":"12","timestamp":{"nanos":5000000,"seconds":0}}}
{"testStepStarted":{"testCaseStartedId":"14","testStepId":"11","timestamp":{"nanos":6000000,"seconds":0}}}
{"testStepFinished":{"testCaseStartedId":"14","testStepId":"11","testStepResult":{"duration":{"nanos":0,"seconds":0},"status":"UNDEFINED"},"timestamp":{"nanos":7000000,"seconds":0}}}
{"testCaseFinished":{"testCaseStartedId":"14","timestamp":{"nanos":8000000,"seconds":0},"willBeRetried":false}}
Copy link
Contributor

Choose a reason for hiding this comment

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

This does not look right to me. It looks like fake-cucumber is pulling in the Background from the previous rule. Otherwise this scenario would not have any steps. I would definitely start with a much simpler test case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll resolve this generation later on once we've got the other item merged and released and we know next steps.

@luke-hill
Copy link
Contributor Author

ping @brasmusson / @davidjgoss / @mattwynne - Do we think the scenario AS IS now is the best representation. I think Step 1 of the 3 is essentially complete now.

@luke-hill luke-hill force-pushed the feature/add-empty-sample branch from 4f1e26e to 25eb20e Compare July 9, 2024 09:11
Copy link
Contributor

@davidjgoss davidjgoss left a comment

Choose a reason for hiding this comment

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

@luke-hill I've updated after fixing fake-cucumber and am happy with this as the standard expected behaviour.

@mpkorstanje @brasmusson @mattwynne what do you think?

@luke-hill
Copy link
Contributor Author

@davidjgoss - I think this is good now. Let's discuss in the next meeting we all remember to come to. As we've not added new behaviours to the CCK for a while. Let's also agree how we should go forward with other new CCK examples e.t.c.

@luke-hill luke-hill merged commit b3bce28 into main Sep 23, 2024
6 checks passed
@luke-hill luke-hill deleted the feature/add-empty-sample branch September 23, 2024 08:34
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.

CCK: Create "empty" feature
3 participants