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

Add tests for Console's context menu and its actions #136057

Closed
4 tasks
cjcenizal opened this issue Jul 8, 2022 · 1 comment · Fixed by #141202
Closed
4 tasks

Add tests for Console's context menu and its actions #136057

cjcenizal opened this issue Jul 8, 2022 · 1 comment · Fixed by #141202
Labels
Feature:Console Dev Tools Console Feature Feature:Dev Tools Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more test-coverage issues & PRs for improving code test coverage

Comments

@cjcenizal
Copy link
Contributor

cjcenizal commented Jul 8, 2022

Summary

Console offers a context menu per request, which enables the user to perform a number of actions with the relevant request. Let's add functional tests to document and verify this behavior:

  • Request-specific context menu
  • Copy the request as cURL
  • Open a documentation link for the relevant API
  • Auto-indent

Content menu and its actions

Request-specific context menu

You can use this context menu to copy the request as cURL, open a documentation link for the relevant API, and auto-indent the request body.

image

Auto-indent

Auto-indent will format the request body so that it has indentation at each nesting level, and empty objects will be collapsed so that the opening and closing brackets are on the same line.

image

When auto-indented, the above becomes nicely formatted like this:

image

Auto-indenting again will condense the JSON so that it only occupies a single line and has no whitespace:

image

Subsequent auto-indents alternate between the condensed form and the nicely indented form.

Note that auto-indenting a triple-quoted string like this:

POST test/1
{
  "test": """a
  b"""
}

Will replace newlines with a newline character:

POST test/1
{"test":"a\n  b"}

Auto-indenting again will return to the original triple-quoted string form.

@cjcenizal cjcenizal added Feature:Console Dev Tools Console Feature Feature:Dev Tools Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more test-coverage issues & PRs for improving code test coverage labels Jul 8, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/platform-deployment-management (Team:Deployment Management)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Console Dev Tools Console Feature Feature:Dev Tools Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more test-coverage issues & PRs for improving code test coverage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants