Add suggestions/snippets to the model
- Dominant language
- No language data
- Stars
- 3.4k
- Forks
- 679
- PR merge metrics
- No merged PRs in 30d
Description
### 🤔 What's the problem you're trying to solve?
Snippets are not currently part of the messages schema. As we move to messages-based formatters, they won't be able to include snippets unless we add them to the schema. This is already the case with the xml, pretty and html formatters.
### ✨ What's your proposed solution?
Add snippets to the messages schema.
There's more than one good way we could do this, but my first draft would be:
- New `Snippet` message emitted once for each unique snippet containing
- `id`
- `text` the unmatched step text
- `code` the suggested code
- `language` the language of the suggested code (useful for e.g. syntax highlighting in formatters)
- New optional field `snippetId` on the existing `TestStepResult` message, to be included for undefined steps where there is a snippet
Contributor guide
Assessment
This issue has not been assessed yet.