Skip to content

Add /tests slash command

Jan Provaznik requested to merge jp-cmd-tests into master

What does this MR do and why?

Adds a new tool for writing tests. This tool also contains a slash command /tests (then this tool is used directly).

Related to #431578 (closed) (Task)

Related to #429915 (closed) (Parent Issue)

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

  1. Feature.enable(:slash_commands)
  2. Open chat UI in one tab and in another tab send a graphql query below:
mutation {
  aiAction(input: {chat: {content: "/tests", currentFile: {
    selectedText: "def hello_world\nputs 'Hello, World'\nend",
    fileName: "hello.rb"
  }}}) {
    clientMutationId
    errors
  }
}
  1. Check the response in chat UI

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Matt Nohr

Merge request reports