* chore: 🤖 Add initial page layout for code editor + sidebar (#3180) * chore: 🤖 Add initial page layout for code editor + sidebar * test: 💍 add missing a11y ignores for exisitng color issue ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-18460 * Replace `Rose::CodeEditor` with `Hds::CodeEditor` (#2679) * chore: 🤖 replace Rose::CodeEditor with Hds::CodeEditor - Remove CodeEditor 5 dependency * chore: 🤖 Replace CodeMirror5 dep remove CodeMirror5 and replace existing editors with HDS::CodeEditor * chore: 🤖 deleting old codeeditor styles * feat: 🎸 changing code editor changing code editor ✅ Closes: 0 * removed unused export * pr cleanup * updating tests for new code editor * responding to PR feedback * added whitespace * fixing linting violations * chore: 🤖 self-review PR self-review PR in the course of switching to new HDS code editor * fix: 🐛 fix linting bug * fix: 🐛 unneeded dependency remove jslint dependency as this is handled in the new code editor from HDS * fix: 🐛 Fixing import bug Fix import bug caused by importing scss modules that no longer exist * Fix and refactor code editor acceptance test * Fix and refactor code editor acceptance test * chore: 🤖 remove codemirror dependency * refactor: 💡 fix merge conflict issues * test: 💍 update e2e test selectors * test: 💍 fix target spec click event * refactor: 💡 clean up test selectors for code editor * refactor: 💡 clean up storage bucket test selectors * chore: 🤖 remove code mirror modifiers --------- Co-authored-by: calcaide <ccorvo@hashicorp.com> Co-authored-by: cameronperera <cameron.perera@hashicorp.com> * feat: 🎸 Create string formats component (#3191) * feat: 🎸 Create string formats component * Add missing copyright headers * fix: 🐛 change to readonly ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-18458 * feat: 🎸 add grant schema to mirage (#3196) * feat: 🎸 add grant schema to mirage * refactor: 💡 update grant schema mirage data * refactor: 💡 fix route name in mirage * feat: 🎸 add export options flyout (#3198) * feat: 🎸 add export options flyout * fix: 🐛 update id to be ids * test: 💍 add a11y ignores * test: 💍 fix tests for grant string format ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-18524 * feat: 🎸 Add autocompletion to code editor (#3207) * feat: 🎸 create grant actions component * feat: 🎸 add description to actions * feat: 🎸 update default logic to not show all actions * feat: 🎸 show invalid id and type message * test: 💍 create const for test selectors * feat: 🎸 trigger action suggestion when cursor moves * refactor: 💡 add createGrantLineHelpers func * refactor: 💡 small refactors * feat: 🎸 Add CSP nonce to code editors (#3230) Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com> * refactor: 💡 small refactor * test: 💍 add more tests * refactor: 💡 fix merge conflicts issues * refactor: 💡 updates from PR feedback * refactor: 💡 updates for completions and linting * test: 💍 fix test issue with translations * test: 💍 fix test issue that was already fixed once * refactor: 💡 address PR feedback --------- Co-authored-by: Lisbet Alvarez <107949262+lisbet-alvarez@users.noreply.github.com> Co-authored-by: Zack Moore <zack.moore@hashicorp.com> Co-authored-by: calcaide <ccorvo@hashicorp.com> Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com> Co-authored-by: Bharath Gajjala <120367134+bgajjala8@users.noreply.github.com>
70 lines
3.1 KiB
JavaScript
70 lines
3.1 KiB
JavaScript
/**
|
|
* Copyright IBM Corp. 2021, 2026
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
export const NEW_ROLE_BTN = '[data-test-new-role-button]';
|
|
|
|
export const MANAGE_DROPDOWN_ROLES = '[data-test-manage-roles-dropdown] button';
|
|
export const MANAGE_DROPDOWN_ROLES_PRINCIPALS =
|
|
'[data-test-manage-dropdown-principals]';
|
|
export const MANAGE_DROPDOWN_ROLES_SCOPES =
|
|
'[data-test-manage-dropdown-scopes]';
|
|
export const MANAGE_DROPDOWN_ROLES_REMOVE =
|
|
'[data-test-manage-roles-dropdown] div:last-child button';
|
|
export const MANAGE_DROPDOWN_ADD_PRINCIPALS =
|
|
'[data-test-manage-role-principals]';
|
|
export const MANAGE_DROPDOWN_ADD_GRANT_TEMPLATES =
|
|
'[data-test-manage-role-grant-templates]';
|
|
export const MANAGE_DROPDOWN_EDIT_GRANTS = '[data-test-manage-dropdown-grants]';
|
|
|
|
export const ROLE_BADGE = (id) =>
|
|
`tbody [data-test-role-row="${id}"] td:nth-child(2) .hds-badge__text`;
|
|
export const ROLE_TOOLTIP_BTN = (id) =>
|
|
`tbody [data-test-role-row="${id}"] td:nth-child(2) .hds-tooltip-button`;
|
|
export const ROLE_TOOLTIP_CONTENT = (id) =>
|
|
`tbody [data-test-role-row="${id}"] td:nth-child(2) [data-tippy-root]`;
|
|
export const GRANT_SCOPE_ROW = (id) =>
|
|
`tbody [data-test-grant-scope-row="${id}"]`;
|
|
export const GRANT_SCOPE_PARENT_SCOPE =
|
|
'tbody tr:nth-child(2) td:nth-child(3) a';
|
|
export const TABLE_ALL_CHECKBOX = 'thead input[type="checkbox"]';
|
|
|
|
export const NO_RESULTS_MSG = '[data-test-no-role-results]';
|
|
export const NO_RESULTS_GRANT_SCOPE_MSG = '[data-test-no-grant-scope-results]';
|
|
|
|
export const NO_SCOPES_MSG = '.role-grant-scopes div';
|
|
export const NO_SCOPES_MSG_LINK = '.role-grant-scopes div div:nth-child(3) a';
|
|
|
|
export const NO_GRANT_TEMPLATES_MSG = '[data-test-no-grant-template-results]';
|
|
|
|
// Manage scopes selectors
|
|
export const SCOPE_TOGGLE = (name) => `.hds-form-toggle input[name="${name}"]`;
|
|
export const SCOPE_CHECKBOX = (type, id) =>
|
|
`tbody [data-test-${type}-scopes-table-row="${id}"] input`;
|
|
export const MANAGE_CUSTOM_SCOPES_BUTTON_ICON =
|
|
'[data-test-manage-custom-scopes-button] [data-test-icon="check-circle"]';
|
|
export const MANAGE_CUSTOM_SCOPES_BUTTON =
|
|
'[data-test-manage-custom-scopes-button]';
|
|
export const REMOVE_ORG_MODAL = (name) =>
|
|
`[data-test-manage-scopes-remove-${name}-modal]`;
|
|
export const REMOVE_ORG_ONLY_BTN = (name) =>
|
|
`[data-test-manage-scopes-remove-${name}-modal] div:nth-child(3) button:last-of-type`;
|
|
export const REMOVE_ORG_PROJECTS_BTN = (name) =>
|
|
`[data-test-manage-scopes-remove-${name}-modal] div:nth-child(3) button`;
|
|
|
|
// Grant actions
|
|
export const GRANT_ACTIONS_TABLE = '[data-test-grant-actions-table]';
|
|
export const GRANT_ACTIONS_NO_TYPE_DETECTED =
|
|
'[data-test-grant-actions-no-type-detected]';
|
|
|
|
// Role grants
|
|
export const GRANT_CODE_BLOCK = '.grant-codeblock .hds-code-block__code';
|
|
export const EXPORT_OPTIONS_FLYOUT = '[data-test-export-options-flyout]';
|
|
export const EXPORT_FORMAT_SELECT =
|
|
'[data-test-export-options-flyout] [name="export-format"]';
|
|
export const FORMATTED_EXPORT_CODE_BLOCK =
|
|
'[data-test-export-options-flyout] .hds-code-block code';
|
|
export const EXPORT_GRANTS_BTN = '[data-test-export-grants-btn]';
|
|
export const GRANTS_BTNS = '[data-test-grants-btns]';
|