Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
52cde49c28
commit
ff16b71bc7
|
|
@ -336,7 +336,7 @@ module SearchHelper
|
|||
link_to search_path(search_params) do
|
||||
concat label
|
||||
concat ' '
|
||||
concat content_tag(:span, count, class: ['badge badge-pill gl-badge badge-muted sm', badge_class], data: badge_data)
|
||||
concat gl_badge_tag(count, { size: :sm }, { class: badge_class, data: badge_data })
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -364,7 +364,7 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated
|
|||
if clusters.empty?
|
||||
AnchorData.new(false,
|
||||
statistic_icon + _('Add Kubernetes cluster'),
|
||||
new_project_cluster_path(project))
|
||||
project_clusters_path(project))
|
||||
else
|
||||
cluster_link = clusters.count == 1 ? project_cluster_path(project, clusters.first) : project_clusters_path(project)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
---
|
||||
stage: Manage
|
||||
group: Workspace
|
||||
info: "To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments"
|
||||
type: reference
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
# Organize work with projects **(FREE)**
|
||||
|
|
@ -43,9 +42,9 @@ Projects include the following [features](https://about.gitlab.com/features/):
|
|||
- [Issue tracker](issues/index.md): Discuss implementations with your team.
|
||||
- [Issue boards](issue_board.md): Organize and prioritize your workflow.
|
||||
- [Multiple issue boards](issue_board.md#multiple-issue-boards): Create team-specific workflows (issue boards) for a project.
|
||||
- [Merge Requests](merge_requests/index.md): Apply a branching
|
||||
- [Merge requests](merge_requests/index.md): Apply a branching
|
||||
strategy and get reviewed by your team.
|
||||
- [Merge Request Approvals](merge_requests/approvals/index.md): Ask for approval before
|
||||
- [Merge request approvals](merge_requests/approvals/index.md): Ask for approval before
|
||||
implementing a change.
|
||||
- [Fix merge conflicts from the UI](merge_requests/conflicts.md): View Git diffs from the GitLab UI.
|
||||
- [Review Apps](../../ci/review_apps/index.md): By branch, preview the results
|
||||
|
|
@ -144,7 +143,7 @@ There are numerous [APIs](../../api/index.md) to use with your projects:
|
|||
- [Issue board](../../api/boards.md)
|
||||
- [Labels](../../api/labels.md)
|
||||
- [Markdown](../../api/markdown.md)
|
||||
- [Merge Requests](../../api/merge_requests.md)
|
||||
- [Merge requests](../../api/merge_requests.md)
|
||||
- [Milestones](../../api/milestones.md)
|
||||
- [Services](../../api/integrations.md)
|
||||
- [Snippets](../../api/project_snippets.md)
|
||||
|
|
|
|||
|
|
@ -47,40 +47,43 @@ module QA
|
|||
fill_element :members_token_select_input, username
|
||||
Support::WaitForRequests.wait_for_requests
|
||||
click_button username
|
||||
|
||||
# Guest option is selected by default, skipping these steps if desired option is 'Guest'
|
||||
unless access_level == 'Guest'
|
||||
click_element :access_level_dropdown
|
||||
click_button access_level
|
||||
end
|
||||
|
||||
click_element :invite_button
|
||||
set_access_level(access_level)
|
||||
end
|
||||
|
||||
Support::WaitForRequests.wait_for_requests
|
||||
|
||||
page.refresh
|
||||
send_invite
|
||||
end
|
||||
|
||||
def invite_group(group_name, group_access = Resource::Members::AccessLevel::GUEST)
|
||||
def invite_group(group_name, access_level = 'Guest')
|
||||
open_invite_group_modal
|
||||
|
||||
fill_element :access_level_dropdown, with: group_access
|
||||
within_element(:invite_members_modal_content) do
|
||||
click_button 'Select a group'
|
||||
|
||||
click_button 'Select a group'
|
||||
# Helps stabilize race condition with concurrent group API calls while searching
|
||||
# TODO: Replace with `fill_element :group_select_dropdown_search_field, group_name` when this bug is resolved: https://gitlab.com/gitlab-org/gitlab/-/issues/349379
|
||||
send_keys_to_element(:group_select_dropdown_search_field, group_name)
|
||||
|
||||
# Helps stabilize race condition with concurrent group API calls while searching
|
||||
# TODO: Replace with `fill_element :group_select_dropdown_search_field, group_name` when this bug is resolved: https://gitlab.com/gitlab-org/gitlab/-/issues/349379
|
||||
send_keys_to_element(:group_select_dropdown_search_field, group_name)
|
||||
Support::WaitForRequests.wait_for_requests
|
||||
click_button group_name
|
||||
set_access_level(access_level)
|
||||
end
|
||||
|
||||
Support::WaitForRequests.wait_for_requests
|
||||
send_invite
|
||||
end
|
||||
|
||||
click_button group_name
|
||||
private
|
||||
|
||||
def set_access_level(access_level)
|
||||
# Guest option is selected by default, skipping these steps if desired option is 'Guest'
|
||||
unless access_level == 'Guest'
|
||||
click_element :access_level_dropdown
|
||||
click_button access_level
|
||||
end
|
||||
end
|
||||
|
||||
def send_invite
|
||||
click_element :invite_button
|
||||
|
||||
Support::WaitForRequests.wait_for_requests
|
||||
|
||||
page.refresh
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@ module QA
|
|||
RSpec.describe 'Manage', :requires_admin, :transient, issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/349379' do
|
||||
describe 'Invite group' do
|
||||
shared_examples 'invites group to project' do
|
||||
it 'verifies group is added and members can access project' do
|
||||
it 'verifies group is added and members can access project with correct access level' do
|
||||
Page::Project::Menu.perform(&:click_members)
|
||||
Page::Project::Members.perform do |project_members|
|
||||
project_members.invite_group(group.path)
|
||||
project_members.invite_group(group.path, 'Developer')
|
||||
|
||||
expect(project_members).to have_group(group.path)
|
||||
end
|
||||
|
|
@ -16,7 +16,7 @@ module QA
|
|||
Flow::Login.sign_in(as: @user)
|
||||
|
||||
Page::Dashboard::Projects.perform do |projects|
|
||||
expect(projects).to have_project_with_access_role(project.name, 'Guest')
|
||||
expect(projects).to have_project_with_access_role(project.name, 'Developer')
|
||||
end
|
||||
|
||||
project.visit!
|
||||
|
|
@ -28,13 +28,13 @@ module QA
|
|||
end
|
||||
|
||||
before(:context) do
|
||||
Runtime::Feature.enable(:invite_members_group_modal)
|
||||
@user = Resource::User.fabricate_or_use(Runtime::Env.gitlab_qa_username_1, Runtime::Env.gitlab_qa_password_1)
|
||||
end
|
||||
|
||||
before do
|
||||
Runtime::Feature.enable(:invite_members_group_modal)
|
||||
Flow::Login.sign_in
|
||||
group.add_member(@user, Resource::Members::AccessLevel::GUEST)
|
||||
group.add_member(@user, Resource::Members::AccessLevel::MAINTAINER)
|
||||
project.visit!
|
||||
end
|
||||
|
||||
|
|
@ -78,6 +78,9 @@ module QA
|
|||
after do
|
||||
project&.remove_via_api!
|
||||
group&.remove_via_api!
|
||||
end
|
||||
|
||||
after(:context) do
|
||||
Runtime::Feature.disable(:invite_members_group_modal)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -11,6 +11,14 @@ module QA
|
|||
end
|
||||
end
|
||||
|
||||
let!(:runner) do
|
||||
Resource::Runner.fabricate_via_api! do |runner|
|
||||
runner.project = project
|
||||
runner.name = random_test_string
|
||||
runner.tags = [random_test_string]
|
||||
end
|
||||
end
|
||||
|
||||
let!(:commit) do
|
||||
Resource::Repository::Commit.fabricate_via_api! do |commit|
|
||||
commit.project = project
|
||||
|
|
@ -21,6 +29,7 @@ module QA
|
|||
file_path: '.gitlab-ci.yml',
|
||||
content: <<~YAML
|
||||
test_job:
|
||||
tags: ['#{random_test_string}']
|
||||
script:
|
||||
- echo "Simple test!"
|
||||
YAML
|
||||
|
|
@ -33,11 +42,12 @@ module QA
|
|||
before do
|
||||
Flow::Login.sign_in
|
||||
project.visit!
|
||||
Support::Waiter.wait_until { project.pipelines.first[:status] == 'success' }
|
||||
Page::Project::Menu.perform(&:go_to_pipeline_editor)
|
||||
end
|
||||
|
||||
after do
|
||||
project.remove_via_api!
|
||||
[runner, project].each(&:remove_via_api!)
|
||||
end
|
||||
|
||||
it 'creates new pipeline and target branch', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/349005' do
|
||||
|
|
@ -50,7 +60,7 @@ module QA
|
|||
expect(show.target_branch_name).to eq(random_test_string)
|
||||
expect(show.current_branch).to eq(random_test_string)
|
||||
expect(show.editing_content).to have_content(random_test_string)
|
||||
expect(show.pipeline_id).to eq(project.pipelines.first[:id])
|
||||
expect { show.pipeline_id }.to eventually_eq(project.pipelines.pluck(:id).max).within(max_duration: 60, sleep_interval: 3)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -316,7 +316,7 @@ RSpec.describe 'Projects > Show > User sees setup shortcut buttons' do
|
|||
visit project_path(project)
|
||||
|
||||
page.within('.project-buttons') do
|
||||
expect(page).to have_link('Add Kubernetes cluster', href: new_project_cluster_path(project))
|
||||
expect(page).to have_link('Add Kubernetes cluster', href: project_clusters_path(project))
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ require 'spec_helper'
|
|||
|
||||
RSpec.describe SearchHelper do
|
||||
include MarkupHelper
|
||||
include BadgesHelper
|
||||
|
||||
# Override simple_sanitize for our testing purposes
|
||||
def simple_sanitize(str)
|
||||
|
|
|
|||
|
|
@ -554,7 +554,7 @@ RSpec.describe ProjectPresenter do
|
|||
expect(presenter.kubernetes_cluster_anchor_data).to have_attributes(
|
||||
is_link: false,
|
||||
label: a_string_including('Add Kubernetes cluster'),
|
||||
link: presenter.new_project_cluster_path(project)
|
||||
link: presenter.project_clusters_path(project)
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue