Skip to content

Conversation

@italotlopes
Copy link

📋 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

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🎨 Code style update (formatting, renaming)
  • ♻️ Refactoring (no functional changes)
  • 🧪 Test update
  • 🔧 Configuration change
  • 🚀 Performance improvement

🧪 Testing

  • All existing tests pass
  • Added new tests for new functionality
  • Tested manually in browser(s):
  • Ran tests with different tags (@smoke, @regression, etc.)

📸 Screenshots (if applicable)

image

✅ Checklist

  • My code follows the project's naming conventions
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published
  • I have updated the README.md if needed
  • I have followed the Conventional Commits format for my commit messages

📝 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:

  1. You have reviewed the Branching Strategy
  2. You have followed the Pull Request Guidelines
  3. Your branch is up to date with the base branch

Copy link
Contributor

Copilot AI left a 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-snippets file 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",
" }",
"}",
],
Copy link

Copilot AI Dec 30, 2025

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.

Suggested change
],
]

Copilot uses AI. Check for mistakes.
@jedau
Copy link
Owner

jedau commented Dec 30, 2025

Good start, @italotlopes! I have a few high-level comments:

  • I couldn't help but notice that you didn't follow the proper commit message format 😅 I'll let it slip this time (because I'm not sure why it wasn't caught by Husky) but try to be careful about it next time.
  • It's a good initial effort, but I feel it's a bit thin. I'm not quite sure where it's lacking though. I'll comment on the specific lines for a more detailed

"prefix": "feature-file",
"body": [
"Feature: ${1:Feature description}",
"",
Copy link
Owner

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}",
Copy link
Owner

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": [
Copy link
Owner

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}",
Copy link
Owner

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 @@
{
Copy link
Owner

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

@italotlopes
Copy link
Author

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.

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

Labels

None yet

Projects

Status: REVIEWING

Development

Successfully merging this pull request may close these issues.

Add VS Code Snippets

2 participants