-
Notifications
You must be signed in to change notification settings - Fork 14
Add VS Code Snippets #96
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds documentation for VS Code snippets to help developers quickly generate common code patterns in the PICKL test automation framework. The snippets include templates for page objects, step definitions, feature files, and Gherkin scenarios.
Key Changes:
- Added VS Code snippets documentation to CONTRIBUTING.md explaining available snippets and usage
- Created
.vscode/pickl.code-snippetsfile with four snippet templates for common development patterns - Added subproject commit reference
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| docs/CONTRIBUTING.md | Added comprehensive documentation section explaining available VS Code snippets, usage instructions, and contribution guidelines |
| .vscode/pickl.code-snippets | Created new snippets file containing four code templates for page objects, step definitions, feature files, and Gherkin scenarios |
| PICKL | Added subproject commit reference |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| " // implement action", | ||
| " }", | ||
| "}", | ||
| ], |
Copilot
AI
Dec 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The array on line 18 has a trailing comma. While JSON technically doesn't allow trailing commas, VS Code snippet files use JSON5 format which permits them. However, for consistency with the rest of the file where other arrays (lines 41, 54, 66) don't have trailing commas, this trailing comma should be removed.
| ], | |
| ] |
|
Good start, @italotlopes! I have a few high-level comments:
|
| "prefix": "feature-file", | ||
| "body": [ | ||
| "Feature: ${1:Feature description}", | ||
| "", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could add the Background clause here. It's usually a precondition common for all of the scenarios in the feature file. It's not mandatory, but I think it would be a good addition here.
| "PICKL Feature File": { | ||
| "prefix": "feature-file", | ||
| "body": [ | ||
| "Feature: ${1:Feature description}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing User Story below i.e. As a ... I want to ... So that ...
| "PICKL Gherkin Scenario": { | ||
| "scope": "gherkin", | ||
| "prefix": "gherkin-scenario", | ||
| "body": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the tag in the body, i.e. "@${1:tag}" right above Scenario
| "prefix": "gherkin-scenario", | ||
| "body": [ | ||
| " Scenario: ${1:Scenario description}", | ||
| " Given ${2:some precondition}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like instead of static Given, When, Then, the steps could be ${3|Given,When,Then,And,But|} ${4:step description} because it could be any of those at any level of the scenario, right? Just to be more flexible. Three of these steps would be a good number
| @@ -0,0 +1,69 @@ | |||
| { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A Given Step, When Step and Then Step template might be good additions as well
|
Hi @jedau, how are you? Thanks for you return. I will be studying and understanding the points you raised, in order to apply a better PR strategy in the future. |
📋 Description
This PR adds documentation to the CONTRIBUTING guide explaining the available VS Code snippets and how to use and extend them.
🔗 Related Issue
Fixes #39
🎯 Type of Change
🧪 Testing
📸 Screenshots (if applicable)
✅ Checklist
📝 Additional Notes
This documentation was added to complete the acceptance criteria for the VS Code snippets feature.
🔍 Reviewer Notes
Please review the clarity and placement of the new VS Code snippets documentation.
Before submitting this PR, please ensure: