Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-06-02 09:09:48 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-06-02 09:09:48 +0300
commitb3e13e0dfd7e26ed569aa9b46f4ec55b41a62411 (patch)
treecb7020c0b6a9917df0be74fe8925d314d048bf50 /spec
parentd786065288786404ab802b15eadf3aa87183c2ff (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
-rw-r--r--spec/features/projects/members/invite_group_spec.rb8
-rw-r--r--spec/models/container_repository_spec.rb8
-rw-r--r--spec/support/helpers/cycle_analytics_helpers.rb5
3 files changed, 21 insertions, 0 deletions
diff --git a/spec/features/projects/members/invite_group_spec.rb b/spec/features/projects/members/invite_group_spec.rb
index 4caf3e947c7..6ce6834b5d5 100644
--- a/spec/features/projects/members/invite_group_spec.rb
+++ b/spec/features/projects/members/invite_group_spec.rb
@@ -32,6 +32,14 @@ RSpec.describe 'Project > Members > Invite group', :js do
expect(page).to have_selector(expected_invite_group_selector)
end
+
+ it 'does not display either the form or the button when visiting the page not signed in' do
+ project = create(:project, namespace: create(:group))
+
+ visit project_project_members_path(project)
+
+ expect(page).not_to have_selector(expected_invite_group_selector)
+ end
end
describe 'Share with group lock' do
diff --git a/spec/models/container_repository_spec.rb b/spec/models/container_repository_spec.rb
index e1f5cd2568d..fa19d512b8d 100644
--- a/spec/models/container_repository_spec.rb
+++ b/spec/models/container_repository_spec.rb
@@ -434,6 +434,14 @@ RSpec.describe ContainerRepository do
it { is_expected.to eq([repository]) }
end
+
+ context 'with repository cleanup started at after policy next run at' do
+ before do
+ repository.update!(expiration_policy_started_at: policy.next_run_at + 5.minutes)
+ end
+
+ it { is_expected.to eq([]) }
+ end
end
describe '.with_unfinished_cleanup' do
diff --git a/spec/support/helpers/cycle_analytics_helpers.rb b/spec/support/helpers/cycle_analytics_helpers.rb
index 5510284b30d..4515b96c79e 100644
--- a/spec/support/helpers/cycle_analytics_helpers.rb
+++ b/spec/support/helpers/cycle_analytics_helpers.rb
@@ -7,6 +7,11 @@ module CycleAnalyticsHelpers
page.find('[data-testid="dropdown-value-streams"]').click
end
+ def path_nav_stage_names_without_median
+ # Returns the path names with the median value stripped out
+ page.all('.gl-path-button').collect(&:text).map {|name_with_median| name_with_median.split("\n")[0] }
+ end
+
def add_custom_stage_to_form
page.find_button(s_('CreateValueStreamForm|Add another stage')).click