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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-04-21 02:50:22 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-04-21 02:50:22 +0300
commit9dc93a4519d9d5d7be48ff274127136236a3adb3 (patch)
tree70467ae3692a0e35e5ea56bcb803eb512a10bedb /spec/features/dashboard
parent4b0f34b6d759d6299322b3a54453e930c6121ff0 (diff)
Add latest changes from gitlab-org/gitlab@13-11-stable-eev13.11.0-rc43
Diffstat (limited to 'spec/features/dashboard')
-rw-r--r--spec/features/dashboard/active_tab_spec.rb2
-rw-r--r--spec/features/dashboard/datetime_on_tooltips_spec.rb2
-rw-r--r--spec/features/dashboard/group_dashboard_with_external_authorization_service_spec.rb2
-rw-r--r--spec/features/dashboard/issuables_counter_spec.rb4
-rw-r--r--spec/features/dashboard/milestones_spec.rb2
-rw-r--r--spec/features/dashboard/project_member_activity_index_spec.rb2
-rw-r--r--spec/features/dashboard/projects_spec.rb23
-rw-r--r--spec/features/dashboard/shortcuts_spec.rb6
8 files changed, 22 insertions, 21 deletions
diff --git a/spec/features/dashboard/active_tab_spec.rb b/spec/features/dashboard/active_tab_spec.rb
index ee85c136190..3a532cb4161 100644
--- a/spec/features/dashboard/active_tab_spec.rb
+++ b/spec/features/dashboard/active_tab_spec.rb
@@ -4,6 +4,8 @@ require 'spec_helper'
RSpec.describe 'Dashboard Active Tab', :js do
before do
+ stub_feature_flags(combined_menu: false)
+
sign_in(create(:user))
end
diff --git a/spec/features/dashboard/datetime_on_tooltips_spec.rb b/spec/features/dashboard/datetime_on_tooltips_spec.rb
index c14a6001a3e..442b8904974 100644
--- a/spec/features/dashboard/datetime_on_tooltips_spec.rb
+++ b/spec/features/dashboard/datetime_on_tooltips_spec.rb
@@ -13,7 +13,7 @@ RSpec.describe 'Tooltips on .timeago dates', :js do
context 'on the activity tab' do
before do
- Event.create( project: project, author_id: user.id, action: :joined,
+ Event.create!( project: project, author_id: user.id, action: :joined,
updated_at: created_date, created_at: created_date)
sign_in user
diff --git a/spec/features/dashboard/group_dashboard_with_external_authorization_service_spec.rb b/spec/features/dashboard/group_dashboard_with_external_authorization_service_spec.rb
index c2a3b90b6f4..179d9d09905 100644
--- a/spec/features/dashboard/group_dashboard_with_external_authorization_service_spec.rb
+++ b/spec/features/dashboard/group_dashboard_with_external_authorization_service_spec.rb
@@ -8,6 +8,8 @@ RSpec.describe 'The group dashboard' do
let(:user) { create(:user) }
before do
+ stub_feature_flags(combined_menu: false)
+
sign_in user
end
diff --git a/spec/features/dashboard/issuables_counter_spec.rb b/spec/features/dashboard/issuables_counter_spec.rb
index 3cb7140d253..d4c6b6faa79 100644
--- a/spec/features/dashboard/issuables_counter_spec.rb
+++ b/spec/features/dashboard/issuables_counter_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe 'Navigation bar counter', :use_clean_rails_memory_store_caching d
before do
issue.assignees = [user]
- merge_request.update(assignees: [user])
+ merge_request.update!(assignees: [user])
sign_in(user)
end
@@ -35,7 +35,7 @@ RSpec.describe 'Navigation bar counter', :use_clean_rails_memory_store_caching d
expect_counters('merge_requests', '1')
- merge_request.update(assignees: [])
+ merge_request.update!(assignees: [])
user.invalidate_cache_counts
diff --git a/spec/features/dashboard/milestones_spec.rb b/spec/features/dashboard/milestones_spec.rb
index 308432b7a1b..992ed2f2ce6 100644
--- a/spec/features/dashboard/milestones_spec.rb
+++ b/spec/features/dashboard/milestones_spec.rb
@@ -30,7 +30,7 @@ RSpec.describe 'Dashboard > Milestones' do
expect(current_path).to eq dashboard_milestones_path
expect(page).to have_content(milestone.title)
expect(page).to have_content(group.name)
- expect(first('.milestone')).to have_content('Merge Requests')
+ expect(first('.milestone')).to have_content('Merge requests')
end
describe 'new milestones dropdown', :js do
diff --git a/spec/features/dashboard/project_member_activity_index_spec.rb b/spec/features/dashboard/project_member_activity_index_spec.rb
index 6e6e466294f..c26a1a0b486 100644
--- a/spec/features/dashboard/project_member_activity_index_spec.rb
+++ b/spec/features/dashboard/project_member_activity_index_spec.rb
@@ -11,7 +11,7 @@ RSpec.describe 'Project member activity', :js do
end
def visit_activities_and_wait_with_event(event_type)
- Event.create(project: project, author_id: user.id, action: event_type)
+ Event.create!(project: project, author_id: user.id, action: event_type)
visit activity_project_path(project)
wait_for_requests
end
diff --git a/spec/features/dashboard/projects_spec.rb b/spec/features/dashboard/projects_spec.rb
index d7330b5267b..20c753b1cdb 100644
--- a/spec/features/dashboard/projects_spec.rb
+++ b/spec/features/dashboard/projects_spec.rb
@@ -3,9 +3,9 @@
require 'spec_helper'
RSpec.describe 'Dashboard Projects' do
- let(:user) { create(:user) }
- let(:project) { create(:project, :repository, name: 'awesome stuff') }
- let(:project2) { create(:project, :public, name: 'Community project') }
+ let_it_be(:user) { create(:user) }
+ let_it_be(:project, reload: true) { create(:project, :repository) }
+ let_it_be(:project2) { create(:project, :public) }
before do
project.add_developer(user)
@@ -18,17 +18,10 @@ RSpec.describe 'Dashboard Projects' do
end
end
- it 'shows the project the user in a member of in the list' do
- visit dashboard_projects_path
- expect(page).to have_content('awesome stuff')
- end
-
- it 'shows "New project" button' do
+ it 'shows the customize banner', :js do
visit dashboard_projects_path
- page.within '#content-body' do
- expect(page).to have_link('New project')
- end
+ expect(page).to have_content('Do you want to customize this page?')
end
context 'when user has access to the project' do
@@ -48,7 +41,7 @@ RSpec.describe 'Dashboard Projects' do
expect(page).to have_content('Developer')
end
- project.members.last.update(access_level: 40)
+ project.members.last.update!(access_level: 40)
visit dashboard_projects_path
@@ -153,7 +146,7 @@ RSpec.describe 'Dashboard Projects' do
end
describe 'with a pipeline', :clean_gitlab_redis_shared_state do
- let(:pipeline) { create(:ci_pipeline, project: project, sha: project.commit.sha, ref: project.default_branch) }
+ let_it_be(:pipeline) { create(:ci_pipeline, project: project, sha: project.commit.sha, ref: project.default_branch) }
before do
# Since the cache isn't updated when a new pipeline is created
@@ -190,7 +183,7 @@ RSpec.describe 'Dashboard Projects' do
let(:guest_user) { create(:user) }
before do
- project.update(public_builds: false)
+ project.update!(public_builds: false)
project.add_guest(guest_user)
sign_in(guest_user)
end
diff --git a/spec/features/dashboard/shortcuts_spec.rb b/spec/features/dashboard/shortcuts_spec.rb
index b2fda28f0ec..e96a60b2ab2 100644
--- a/spec/features/dashboard/shortcuts_spec.rb
+++ b/spec/features/dashboard/shortcuts_spec.rb
@@ -3,6 +3,10 @@
require 'spec_helper'
RSpec.describe 'Dashboard shortcuts', :js do
+ before do
+ stub_feature_flags(combined_menu: false)
+ end
+
context 'logged in' do
let(:user) { create(:user) }
let(:project) { create(:project) }
@@ -20,7 +24,7 @@ RSpec.describe 'Dashboard shortcuts', :js do
find('body').send_keys([:shift, 'M'])
- check_page_title('Merge Requests')
+ check_page_title('Merge requests')
find('body').send_keys([:shift, 'T'])