Skip to content

test(e2e): expand Playwright coverage for example code snippets - #84

Open
lokesh-bruno wants to merge 4 commits into
usebruno:release/v0.4.0from
lokesh-bruno:example_snippet_coverage
Open

lokesh-bruno wants to merge 4 commits into
usebruno:release/v0.4.0from
lokesh-bruno:example_snippet_coverage

Conversation

@lokesh-bruno

@lokesh-bruno lokesh-bruno commented Sep 17, 2026

Copy link
Copy Markdown

Ref BRU-4585

Description

Adds E2E coverage for Code Snippet on request examples so the modal, copy, and variable interpolation behave the same as the request-page snippet when used from an example card.

The coverage includes:

  • A Code Snippet button on each saved example, including after expanding a collapsed card.
  • Modal languages matching the request-page snippet tab list.
  • Snippet body taken from that example, not the base request.
  • Copy writing the currently displayed command for every language in the modal.
  • No Examples section or snippet trigger when the request has no saved examples.
  • Show vars off keeping {{var}} placeholders; Show vars on interpolating both the preview and the copied text.
  • Interpolate Variables following Show vars when the modal opens, interpolating without flipping the page toggle, and restoring placeholders when unchecked while Show vars stays on.

@changeset-bot

changeset-bot Bot commented Sep 17, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6adabe3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@usebruno/api-docs Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Comment thread packages/bruno-api-docs/e2e/components/request/code-snippet.component.ts Outdated
Comment thread packages/bruno-api-docs/e2e/components/request/code-snippet.component.ts Outdated
Comment thread packages/bruno-api-docs/e2e/tests/request/request-examples.spec.ts
Comment thread packages/bruno-api-docs/e2e/tests/request/request-examples.spec.ts Outdated
arpit-bruno
arpit-bruno previously approved these changes Sep 23, 2026
Expanded Playwright coverage for example code snippets in e2e tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants