mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-28 15:14:06 +00:00
fix(ui): correct “modified” indicator state across collection, folder, request, and presets/auth tabs (#3386) (#8027)
* fix: 3296 Folder-level No Auth inheritance is ignored; requests still use Collection Auth
This commit is contained in:
13
tests/utils/constants/auth.ts
Normal file
13
tests/utils/constants/auth.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
export const AUTH_MODE_LABELS = {
|
||||
AWSV4: 'AWS Sig v4',
|
||||
BASIC: 'Basic Auth',
|
||||
BEARER: 'Bearer Token',
|
||||
DIGEST: 'Digest Auth',
|
||||
NTLM: 'NTLM Auth',
|
||||
OAUTH1: 'OAuth 1.0',
|
||||
OAUTH2: 'OAuth 2.0',
|
||||
WSSE: 'WSSE Auth',
|
||||
APIKEY: 'API Key',
|
||||
INHERIT: 'Inherit',
|
||||
NONE: 'No Auth'
|
||||
} as const;
|
||||
1
tests/utils/constants/index.ts
Normal file
1
tests/utils/constants/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from './auth';
|
||||
@@ -97,7 +97,17 @@ export const buildCommonLocators = (page: Page) => ({
|
||||
},
|
||||
oauth2: {
|
||||
grantTypeDropdown: () => page.getByTestId('grant-type-dropdown')
|
||||
}
|
||||
},
|
||||
modeSelector: () => page.getByTestId('auth-mode-selector'),
|
||||
modeLabel: () => page.getByTestId('auth-mode-label'),
|
||||
inheritedMode: () => page.getByTestId('inherited-auth-mode'),
|
||||
dropdownItem: (id: string) => page.getByTestId(`auth-mode-dropdown-${id}`)
|
||||
},
|
||||
presets: {
|
||||
requestType: (type: 'http' | 'graphql' | 'grpc' | 'ws') =>
|
||||
page.getByTestId(`presets-request-type-${type}`),
|
||||
requestUrl: () => page.getByTestId('presets-request-url'),
|
||||
save: () => page.getByTestId('presets-save-btn')
|
||||
},
|
||||
tags: {
|
||||
input: () => page.getByTestId('tag-input').getByRole('textbox'),
|
||||
@@ -119,6 +129,12 @@ export const buildCommonLocators = (page: Page) => ({
|
||||
codeLine: () => page.locator('.response-pane .editor-container .CodeMirror-line'),
|
||||
jsonTreeLine: () => page.locator('.response-pane .object-content')
|
||||
},
|
||||
timeline: {
|
||||
items: () => page.locator('.timeline-item'),
|
||||
lastItem: () => page.locator('.timeline-item').last(),
|
||||
itemHeader: (item: Locator) => item.locator('.oauth-request-item-header'),
|
||||
clearButton: () => page.getByRole('button', { name: 'Clear Timeline' })
|
||||
},
|
||||
plusMenu: {
|
||||
button: () => page.getByTestId('collections-header-add-menu'),
|
||||
createCollection: () => page.locator('.tippy-box .dropdown-item').filter({ hasText: 'Create collection' }),
|
||||
|
||||
Reference in New Issue
Block a user