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

Code folding of XML closing tags #55

Closed
picimako opened this issue Aug 29, 2024 · 1 comment
Closed

Code folding of XML closing tags #55

picimako opened this issue Aug 29, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request Spring XML DSL Related to the Citrus Spring XML test DSL XML DSL Related to the Citrus YAML test DSL
Milestone

Comments

@picimako
Copy link
Owner

picimako commented Aug 29, 2024

Summary

Due to the verbose nature of the XML language, XML files can be quite noisy with the tag names repeated in the closing tag. This could be improved by code folding their closing tags only.

Tasks

  • Implement a code folding for folding the closing tags of Citrus XML tags.
  • Make sure to have a specific plugin settings option to toggle this feature.
  • The folding would look like (example taken from Citrus):
//From
<repeat-onerror-until-true condition="@assertThat(greaterThan(9))@" auto-sleep="1000">
  <k8s:list-pods client="k8sClient" label="${podLabel}">
    <k8s:validate>
      <k8s:element path="$.result.items.size()" value="1"/>
      <k8s:element path="$..status.phase" value="@assertThat(anyOf(is(Running),is('')))@"/>
    </k8s:validate>
  </k8s:list-pods>
</repeat-onerror-until-true>

//To
<repeat-onerror-until-true condition="@assertThat(greaterThan(9))@" auto-sleep="1000">
  <k8s:list-pods client="k8sClient" label="${podLabel}">
    <k8s:validate>
      <k8s:element path="$.result.items.size()" value="1"/>
      <k8s:element path="$..status.phase" value="@assertThat(anyOf(is(Running),is('')))@"/>
    />
  />
/>
  • The following tags/tag types should be excluded:
    • Tags in non-Citrus namespaces. (needs consideration)
    • The <test> and <actions> tags in the non-Spring XML DSL.
    • The <testcase> and <actions> tags in the Spring XML DSL.

Questions

  • How will this affect and work together with the already present Citrus specific XML tag foldings?
    • Apparently it won't, it works well with them.
@picimako picimako added enhancement New feature or request XML DSL Related to the Citrus YAML test DSL Spring XML DSL Related to the Citrus Spring XML test DSL labels Aug 29, 2024
@picimako picimako added this to the v1.0.16 milestone Aug 29, 2024
@picimako picimako self-assigned this Aug 29, 2024
@picimako
Copy link
Owner Author

picimako commented Sep 2, 2024

Completed in v1.0.16.

@picimako picimako closed this as completed Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Spring XML DSL Related to the Citrus Spring XML test DSL XML DSL Related to the Citrus YAML test DSL
Projects
None yet
Development

No branches or pull requests

1 participant