From 44c4a8ee1e7b995aa2045fd31d637981eb3baccb Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 22 Jun 2022 09:09:36 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- .../add_context_commits_modal_trigger.vue | 4 +-- .../groups/components/group_item.vue | 13 +++++----- app/assets/javascripts/user_popovers.js | 2 +- app/views/groups/show.html.haml | 2 +- doc/administration/auth/oidc.md | 6 ++--- qa/qa/page/alert/free_trial.rb | 3 +-- spec/frontend/user_popovers_spec.js | 26 ++++++++++++++----- 7 files changed, 34 insertions(+), 22 deletions(-) diff --git a/app/assets/javascripts/add_context_commits_modal/components/add_context_commits_modal_trigger.vue b/app/assets/javascripts/add_context_commits_modal/components/add_context_commits_modal_trigger.vue index 78a575ffe96..2287872e8c1 100644 --- a/app/assets/javascripts/add_context_commits_modal/components/add_context_commits_modal_trigger.vue +++ b/app/assets/javascripts/add_context_commits_modal/components/add_context_commits_modal_trigger.vue @@ -37,8 +37,8 @@ export default { - import( - 'ee_component/vue_shared/components/compliance_framework_label/compliance_framework_label.vue' - ), itemCaret, itemTypeIcon, itemActions, @@ -184,12 +182,13 @@ export default { {{ group.permission }} -
diff --git a/app/assets/javascripts/user_popovers.js b/app/assets/javascripts/user_popovers.js index a3615eab26f..3356cada58a 100644 --- a/app/assets/javascripts/user_popovers.js +++ b/app/assets/javascripts/user_popovers.js @@ -117,7 +117,7 @@ function launchPopover(el, mountPopover) { mountPopover(popoverInstance); } -const userLinkSelector = 'a.js-user-link, a.gfm-project_member'; +const userLinkSelector = 'a.js-user-link[data-user], a.js-user-link[data-user-id]'; const getUserLinkNode = (node) => node.closest(userLinkSelector); diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml index 3614d854036..7d7fc9d081e 100644 --- a/app/views/groups/show.html.haml +++ b/app/views/groups/show.html.haml @@ -25,7 +25,7 @@ = render partial: 'flash_messages' -= render_if_exists 'trials/banner', namespace: @group += render_if_exists 'trials/alert', namespace: @group = render 'groups/home_panel' diff --git a/doc/administration/auth/oidc.md b/doc/administration/auth/oidc.md index deb47160d98..89bc2762388 100644 --- a/doc/administration/auth/oidc.md +++ b/doc/administration/auth/oidc.md @@ -339,7 +339,7 @@ The trailing forward slash is required. This configuration corresponds with the `Supported account types` setting used when creating the `IdentityExperienceFramework` app. -#### Keycloak +### Keycloak GitLab works with OpenID providers that use HTTPS. Although a Keycloak server can be set up using HTTP, GitLab can only communicate @@ -380,7 +380,7 @@ gitlab_rails['omniauth_providers'] = [ ] ``` -##### Configure Keycloak with a symmetric key algorithm +#### Configure Keycloak with a symmetric key algorithm > Introduced in GitLab 14.2. @@ -461,7 +461,7 @@ To use symmetric key encryption: If after reconfiguring, you see the error `JSON::JWS::VerificationFailed` error message, this means the incorrect secret was specified. -#### Casdoor +### Casdoor GitLab works with OpenID providers that use HTTPS. To connect to GitLab using OpenID with Casdoor, use HTTPS instead of HTTP. diff --git a/qa/qa/page/alert/free_trial.rb b/qa/qa/page/alert/free_trial.rb index 4a48d4ca277..ec8d8e8abde 100644 --- a/qa/qa/page/alert/free_trial.rb +++ b/qa/qa/page/alert/free_trial.rb @@ -4,8 +4,7 @@ module QA module Page module Alert class FreeTrial < Chemlab::Page - # TODO: Supplant with data-qa-selectors - h4 :trial_activated_message, class: 'gl-banner-title' + element :trial_activated_message end end end diff --git a/spec/frontend/user_popovers_spec.js b/spec/frontend/user_popovers_spec.js index 1544fed5240..b171c8fc9ed 100644 --- a/spec/frontend/user_popovers_spec.js +++ b/spec/frontend/user_popovers_spec.js @@ -12,12 +12,8 @@ jest.mock('~/api/user_api', () => ({ describe('User Popovers', () => { const fixtureTemplate = 'merge_requests/merge_request_with_mentions.html'; - const selector = '.js-user-link, .gfm-project_member'; - const findFixtureLinks = () => { - return Array.from(document.querySelectorAll(selector)).filter( - ({ dataset }) => dataset.user || dataset.userId, - ); - }; + const selector = '.js-user-link[data-user], .js-user-link[data-user-id]'; + const findFixtureLinks = () => Array.from(document.querySelectorAll(selector)); const createUserLink = () => { const link = document.createElement('a'); @@ -95,6 +91,24 @@ describe('User Popovers', () => { }); }); + it('does not initialize the popovers for group references', async () => { + const [groupLink] = Array.from(document.querySelectorAll('.js-user-link[data-group]')); + + triggerEvent('mouseover', groupLink); + jest.runOnlyPendingTimers(); + + expect(findPopovers().length).toBe(0); + }); + + it('does not initialize the popovers for @all references', async () => { + const [projectLink] = Array.from(document.querySelectorAll('.js-user-link[data-project]')); + + triggerEvent('mouseover', projectLink); + jest.runOnlyPendingTimers(); + + expect(findPopovers().length).toBe(0); + }); + it('does not initialize the user popovers twice for the same element', async () => { const [firstUserLink] = findFixtureLinks(); triggerEvent('mouseover', firstUserLink);