-
Notifications
You must be signed in to change notification settings - Fork 9
feat(docs): execution context sections on folder and collection pages #88
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
Merged
arpit-bruno
merged 6 commits into
usebruno:release/v0.4.0
from
sundram-bruno:fix/execution-context-and-env-switcher
Sep 24, 2026
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c68735d
feat(docs): execution context sections, post-response vars and env sw…
sundram-bruno f404498
chore: code cleanup
sundram-bruno 10fa39c
comments addressed
sundram-bruno 9361fc8
comments addressed
sundram-bruno 0782154
handled merge conflicts
sundram-bruno fd9c07c
Enhance folder and collection pages with new features
arpit-bruno File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| --- | ||
| "@usebruno/api-docs": patch | ||
| --- | ||
|
|
||
| Bugfixes: | ||
| 19. The folder and collection pages now have an Execution Context section, separate from the configuration section. Headers and auth stay under Folder Configuration and Collection Configuration; vars, script and tests move into Execution Context, which collapses and expands like the one on request pages. The environment switcher is hidden from the docs header when the collection has no environments. | ||
|
|
||
| 25. A long environment name is cut short with an ellipsis in the switcher and in its dropdown, and the full name shows in a tooltip when it is cut. | ||
|
|
||
| 32. Empty Post-Response variables now read "None." on the folder and collection pages, the same as on request pages, instead of the section disappearing. | ||
|
|
||
| 33. The playground folder settings Vars tab now has a Post Response table, like the Bruno app. Edits are saved with the folder. | ||
|
|
||
| Also, when a collection has no environments, the playground switcher no longer opens a dropdown whose only entry repeats "No environments". It shows the text with no arrow. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 18 additions & 15 deletions
33
packages/bruno-api-docs/e2e/components/overview/collection-configuration.component.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
packages/bruno-api-docs/e2e/tests/environments/env-switcher-empty.spec.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| import { test, expect } from '../../playwright'; | ||
|
|
||
| const NO_ENVIRONMENTS = '/?fixture=descriptions'; | ||
|
|
||
| test.describe('Environment switcher with no environments', () => { | ||
| test('is hidden in the docs header', async ({ page, envSwitcher }) => { | ||
| await page.goto(NO_ENVIRONMENTS); | ||
| await expect(envSwitcher.showVarsToggle).toBeVisible(); | ||
| await expect(envSwitcher.root).toHaveCount(0); | ||
| }); | ||
|
|
||
| test('still shows its empty state in the playground sidebar', async ({ page, playground }) => { | ||
| await page.goto(`${NO_ENVIRONMENTS}#/?pg=1&dock=bottom`); | ||
| await playground.ensureSidebarOpen(); | ||
| await expect(playground.envSwitcher.trigger).toBeVisible(); | ||
| await expect(playground.envSwitcher.trigger).toContainText('No environments'); | ||
| }); | ||
|
|
||
| test('shows plain text in the playground, with no caret and nothing to open', async ({ page, playground }) => { | ||
| await page.goto(`${NO_ENVIRONMENTS}#/?pg=1&dock=bottom`); | ||
| await playground.ensureSidebarOpen(); | ||
| const { trigger } = playground.envSwitcher; | ||
|
|
||
| await expect(trigger).toContainText('No environments'); | ||
| await expect(playground.envSwitcher.root.getByRole('button')).toHaveCount(0); | ||
| await expect(trigger.locator('.env-switcher-chevron')).toHaveCount(0); | ||
|
|
||
| await trigger.click(); | ||
| await expect(playground.envSwitcher.menu).toHaveCount(0); | ||
| }); | ||
| }); |
52 changes: 52 additions & 0 deletions
52
packages/bruno-api-docs/e2e/tests/environments/env-switcher-truncation.spec.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| import { test, expect } from '../../playwright'; | ||
|
|
||
| const LONG_ENV = 'staging-regression-automation-eu-west-1'; | ||
| const FIXTURE = '/?fixture=folders'; | ||
|
|
||
| const isClipped = (el: HTMLElement): boolean => el.scrollWidth > el.clientWidth + 1; | ||
|
|
||
| test.describe('Environment switcher name truncation', () => { | ||
| test('clips a long name in the trigger and reveals it in a tooltip on hover', async ({ | ||
| page, | ||
| envSwitcher, | ||
| tooltip | ||
| }) => { | ||
| await page.goto(FIXTURE); | ||
| await envSwitcher.selectEnvironment(LONG_ENV); | ||
|
|
||
| const name = envSwitcher.trigger.getByTestId('truncated-text'); | ||
| await expect(name).toHaveText(LONG_ENV); | ||
| expect(await name.evaluate(isClipped)).toBe(true); | ||
|
|
||
| await name.hover(); | ||
| await expect(tooltip.popup).toBeVisible(); | ||
| await expect(tooltip.popup).toHaveText(LONG_ENV); | ||
| }); | ||
|
|
||
| test('clips the same long name inside the open dropdown, revealing it via the native title', async ({ | ||
| page, | ||
| envSwitcher | ||
| }) => { | ||
| await page.goto(FIXTURE); | ||
| await envSwitcher.open(); | ||
|
|
||
| const option = envSwitcher.option(LONG_ENV); | ||
| await expect(option).toHaveAttribute('title', LONG_ENV); | ||
| const name = option.locator('.environment-label-name--clamped'); | ||
| await expect(name).toHaveText(LONG_ENV); | ||
| expect(await name.evaluate(isClipped)).toBe(true); | ||
| }); | ||
|
|
||
| test('shows no tooltip for a short name, which is not clipped', async ({ page, envSwitcher, tooltip }) => { | ||
| await page.goto(FIXTURE); | ||
| await envSwitcher.selectEnvironment('Dev'); | ||
|
|
||
| const name = envSwitcher.trigger.getByTestId('truncated-text'); | ||
| await expect(name).toHaveText('Dev'); | ||
| expect(await name.evaluate(isClipped)).toBe(false); | ||
|
|
||
| await name.hover(); | ||
| await page.waitForTimeout(400); | ||
| await expect(tooltip.popup).toHaveCount(0); | ||
| }); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.