diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-04 00:12:13 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-04 00:12:13 +0300 |
commit | 71c3596b1dfda5dca5d25357fe92f442647a8f5b (patch) | |
tree | 1706b54eecd7263b0ebce87e6f0ee72fb7df6a95 /app/assets/javascripts | |
parent | 3413ab248287b19b1d2cd1f78d957096546e8c37 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts')
5 files changed, 10 insertions, 0 deletions
diff --git a/app/assets/javascripts/behaviors/copy_code.js b/app/assets/javascripts/behaviors/copy_code.js index 970864eef74..218a402772f 100644 --- a/app/assets/javascripts/behaviors/copy_code.js +++ b/app/assets/javascripts/behaviors/copy_code.js @@ -5,6 +5,8 @@ import { setAttributes } from '~/lib/utils/dom_utils'; class CopyCodeButton extends HTMLElement { connectedCallback() { + if (this.querySelector('.btn')) return; + this.for = uniqueId('code-'); const target = this.parentNode.querySelector('pre'); diff --git a/app/assets/javascripts/super_sidebar/components/create_menu.vue b/app/assets/javascripts/super_sidebar/components/create_menu.vue index e92a6cbf5f5..d3bb31a69fa 100644 --- a/app/assets/javascripts/super_sidebar/components/create_menu.vue +++ b/app/assets/javascripts/super_sidebar/components/create_menu.vue @@ -30,6 +30,7 @@ export default { text-sr-only :toggle-text="$options.i18n.createNew" :toggle-id="$options.toggleId" + data-qa-selector="new_menu_toggle" /> <gl-tooltip :target="`#${$options.toggleId}`" placement="bottom" container="#super-sidebar"> {{ $options.i18n.createNew }} diff --git a/app/assets/javascripts/super_sidebar/components/nav_item.vue b/app/assets/javascripts/super_sidebar/components/nav_item.vue index 173e62cefbd..46e281b5a21 100644 --- a/app/assets/javascripts/super_sidebar/components/nav_item.vue +++ b/app/assets/javascripts/super_sidebar/components/nav_item.vue @@ -75,6 +75,8 @@ export default { v-bind="linkProps" class="gl-rounded-base gl-relative gl-display-flex gl-py-3 gl-px-0 gl-line-height-normal gl-text-black-normal! gl-hover-bg-t-gray-a-08 gl-text-decoration-none!" :class="linkClasses" + data-qa-selector="sidebar_menu_link" + :data-qa-menu-item="item.title" @click="click" > <div diff --git a/app/assets/javascripts/super_sidebar/components/user_bar.vue b/app/assets/javascripts/super_sidebar/components/user_bar.vue index 32ce4abd646..15ba39a9edb 100644 --- a/app/assets/javascripts/super_sidebar/components/user_bar.vue +++ b/app/assets/javascripts/super_sidebar/components/user_bar.vue @@ -105,6 +105,7 @@ export default { :count="sidebarData.todos_pending_count" href="/dashboard/todos" :label="$options.i18n.todoList" + data-qa-selector="todos_shortcut_button" /> </div> </div> diff --git a/app/assets/javascripts/super_sidebar/components/user_menu.vue b/app/assets/javascripts/super_sidebar/components/user_menu.vue index 103501e86ef..883fa85f1d9 100644 --- a/app/assets/javascripts/super_sidebar/components/user_menu.vue +++ b/app/assets/javascripts/super_sidebar/components/user_menu.vue @@ -78,6 +78,9 @@ export default { return { text: this.$options.i18n.editProfile, href: this.data.settings.profile_path, + extraAttrs: { + 'data-qa-selector': 'edit_profile_link', + }, }; }, preferencesItem() { @@ -122,6 +125,7 @@ export default { href: this.data.sign_out_link, extraAttrs: { 'data-method': 'post', + 'data-qa-selector': 'sign_out_link', class: 'sign-out-link', }, }, |