diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-30 12:06:01 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-30 12:06:01 +0000 |
commit | dea6ebd31af8e97e8b14160181bd4ea7578c94e8 (patch) | |
tree | 5e429fda4d43aa3450f7d6b015668c3474cd9e6c /spec | |
parent | 94611567bd03083e0ecef7a582a174aa34844482 (diff) | |
download | gitlab-ce-dea6ebd31af8e97e8b14160181bd4ea7578c94e8.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
63 files changed, 147 insertions, 65 deletions
diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index 2f481e237a7..e8c438e459b 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe ApplicationHelper do diff --git a/spec/helpers/auto_devops_helper_spec.rb b/spec/helpers/auto_devops_helper_spec.rb index e80388f9ea7..5d42a80aae3 100644 --- a/spec/helpers/auto_devops_helper_spec.rb +++ b/spec/helpers/auto_devops_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe AutoDevopsHelper do diff --git a/spec/helpers/avatars_helper_spec.rb b/spec/helpers/avatars_helper_spec.rb index 9330e75af11..77182a59c1c 100644 --- a/spec/helpers/avatars_helper_spec.rb +++ b/spec/helpers/avatars_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe AvatarsHelper do diff --git a/spec/helpers/award_emoji_helper_spec.rb b/spec/helpers/award_emoji_helper_spec.rb index 035960ed96e..2ee27bc5427 100644 --- a/spec/helpers/award_emoji_helper_spec.rb +++ b/spec/helpers/award_emoji_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe AwardEmojiHelper do diff --git a/spec/helpers/blame_helper_spec.rb b/spec/helpers/blame_helper_spec.rb index 722d21c566f..8b5de040508 100644 --- a/spec/helpers/blame_helper_spec.rb +++ b/spec/helpers/blame_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe BlameHelper do diff --git a/spec/helpers/blob_helper_spec.rb b/spec/helpers/blob_helper_spec.rb index 1f236429347..e5e16e69833 100644 --- a/spec/helpers/blob_helper_spec.rb +++ b/spec/helpers/blob_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe BlobHelper do diff --git a/spec/helpers/boards_helper_spec.rb b/spec/helpers/boards_helper_spec.rb index ad088398ce9..8a4446b7f59 100644 --- a/spec/helpers/boards_helper_spec.rb +++ b/spec/helpers/boards_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe BoardsHelper do diff --git a/spec/helpers/broadcast_messages_helper_spec.rb b/spec/helpers/broadcast_messages_helper_spec.rb index 9bec0f9f432..d0f0e6f1dd5 100644 --- a/spec/helpers/broadcast_messages_helper_spec.rb +++ b/spec/helpers/broadcast_messages_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe BroadcastMessagesHelper do diff --git a/spec/helpers/button_helper_spec.rb b/spec/helpers/button_helper_spec.rb index eebae1d7290..303b84b23e6 100644 --- a/spec/helpers/button_helper_spec.rb +++ b/spec/helpers/button_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe ButtonHelper do diff --git a/spec/helpers/calendar_helper_spec.rb b/spec/helpers/calendar_helper_spec.rb index 828a9d9fea0..8dba6815e8d 100644 --- a/spec/helpers/calendar_helper_spec.rb +++ b/spec/helpers/calendar_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe CalendarHelper do diff --git a/spec/helpers/ci_status_helper_spec.rb b/spec/helpers/ci_status_helper_spec.rb index 4f665dc0514..80be119b069 100644 --- a/spec/helpers/ci_status_helper_spec.rb +++ b/spec/helpers/ci_status_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe CiStatusHelper do diff --git a/spec/helpers/commits_helper_spec.rb b/spec/helpers/commits_helper_spec.rb index 9e53bc05a48..cbc5566979b 100644 --- a/spec/helpers/commits_helper_spec.rb +++ b/spec/helpers/commits_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe CommitsHelper do diff --git a/spec/helpers/components_helper_spec.rb b/spec/helpers/components_helper_spec.rb index 94a59193be8..703bee0ca92 100644 --- a/spec/helpers/components_helper_spec.rb +++ b/spec/helpers/components_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe ComponentsHelper do diff --git a/spec/helpers/dashboard_helper_spec.rb b/spec/helpers/dashboard_helper_spec.rb index 059ae128d93..c899c2d9853 100644 --- a/spec/helpers/dashboard_helper_spec.rb +++ b/spec/helpers/dashboard_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe DashboardHelper do diff --git a/spec/helpers/defer_script_tag_helper_spec.rb b/spec/helpers/defer_script_tag_helper_spec.rb index 9ada3ae75ba..440904188ca 100644 --- a/spec/helpers/defer_script_tag_helper_spec.rb +++ b/spec/helpers/defer_script_tag_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe DeferScriptTagHelper do diff --git a/spec/helpers/emails_helper_spec.rb b/spec/helpers/emails_helper_spec.rb index a14ae2cde4b..931b7008173 100644 --- a/spec/helpers/emails_helper_spec.rb +++ b/spec/helpers/emails_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe EmailsHelper do diff --git a/spec/helpers/events_helper_spec.rb b/spec/helpers/events_helper_spec.rb index e062c841717..7853617c3ed 100644 --- a/spec/helpers/events_helper_spec.rb +++ b/spec/helpers/events_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe EventsHelper do diff --git a/spec/helpers/explore_helper_spec.rb b/spec/helpers/explore_helper_spec.rb index 12651d80e36..5208d3bd656 100644 --- a/spec/helpers/explore_helper_spec.rb +++ b/spec/helpers/explore_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe ExploreHelper do diff --git a/spec/helpers/form_helper_spec.rb b/spec/helpers/form_helper_spec.rb index a70d8333f30..68aa0137cd5 100644 --- a/spec/helpers/form_helper_spec.rb +++ b/spec/helpers/form_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe FormHelper do diff --git a/spec/helpers/git_helper_spec.rb b/spec/helpers/git_helper_spec.rb index 9b1ef1e05a2..505d6ed15ac 100644 --- a/spec/helpers/git_helper_spec.rb +++ b/spec/helpers/git_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe GitHelper do diff --git a/spec/helpers/gitlab_routing_helper_spec.rb b/spec/helpers/gitlab_routing_helper_spec.rb index 027480143bd..bf043f3f013 100644 --- a/spec/helpers/gitlab_routing_helper_spec.rb +++ b/spec/helpers/gitlab_routing_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe GitlabRoutingHelper do diff --git a/spec/helpers/graph_helper_spec.rb b/spec/helpers/graph_helper_spec.rb index 1f8a38dc697..dc389c09e60 100644 --- a/spec/helpers/graph_helper_spec.rb +++ b/spec/helpers/graph_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe GraphHelper do diff --git a/spec/helpers/hooks_helper_spec.rb b/spec/helpers/hooks_helper_spec.rb index 2e21f1134b1..4352089c1c0 100644 --- a/spec/helpers/hooks_helper_spec.rb +++ b/spec/helpers/hooks_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe HooksHelper do diff --git a/spec/helpers/icons_helper_spec.rb b/spec/helpers/icons_helper_spec.rb index 950f951e22e..f1b1d411e05 100644 --- a/spec/helpers/icons_helper_spec.rb +++ b/spec/helpers/icons_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe IconsHelper do diff --git a/spec/helpers/import_helper_spec.rb b/spec/helpers/import_helper_spec.rb index 8a1b1e859b1..a6b283e49dc 100644 --- a/spec/helpers/import_helper_spec.rb +++ b/spec/helpers/import_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe ImportHelper do diff --git a/spec/helpers/instance_configuration_helper_spec.rb b/spec/helpers/instance_configuration_helper_spec.rb index 5d716b9191d..31a6c7bc839 100644 --- a/spec/helpers/instance_configuration_helper_spec.rb +++ b/spec/helpers/instance_configuration_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe InstanceConfigurationHelper do diff --git a/spec/helpers/issues_helper_spec.rb b/spec/helpers/issues_helper_spec.rb index d15b5a4ab58..a394812f8f0 100644 --- a/spec/helpers/issues_helper_spec.rb +++ b/spec/helpers/issues_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "spec_helper" describe IssuesHelper do diff --git a/spec/helpers/labels_helper_spec.rb b/spec/helpers/labels_helper_spec.rb index 1d57aaa0da5..a715390ecae 100644 --- a/spec/helpers/labels_helper_spec.rb +++ b/spec/helpers/labels_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe LabelsHelper do diff --git a/spec/helpers/markup_helper_spec.rb b/spec/helpers/markup_helper_spec.rb index f6e1720e113..364f215420a 100644 --- a/spec/helpers/markup_helper_spec.rb +++ b/spec/helpers/markup_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe MarkupHelper do @@ -408,12 +410,12 @@ describe MarkupHelper do it 'preserves a link href when link text is truncated' do text = 'The quick brown fox jumped over the lazy dog' # 44 chars - input = "#{text}#{text}#{text} " # 133 chars link_url = 'http://example.com/foo/bar/baz' # 30 chars - input << link_url - object = create_object(input) + input = "#{text}#{text}#{text} #{link_url}" # 163 chars expected_link_text = 'http://example...</a>' + object = create_object(input) + expect(first_line_in_markdown(object, attribute, 150, project: project)).to match(link_url) expect(first_line_in_markdown(object, attribute, 150, project: project)).to match(expected_link_text) end diff --git a/spec/helpers/members_helper_spec.rb b/spec/helpers/members_helper_spec.rb index 908e8960f37..e52d2166a69 100644 --- a/spec/helpers/members_helper_spec.rb +++ b/spec/helpers/members_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe MembersHelper do diff --git a/spec/helpers/milestones_helper_spec.rb b/spec/helpers/milestones_helper_spec.rb index f5185cb2857..3574066e03e 100644 --- a/spec/helpers/milestones_helper_spec.rb +++ b/spec/helpers/milestones_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe MilestonesHelper do diff --git a/spec/helpers/milestones_routing_helper_spec.rb b/spec/helpers/milestones_routing_helper_spec.rb index dc13a43c2ab..4da589a5007 100644 --- a/spec/helpers/milestones_routing_helper_spec.rb +++ b/spec/helpers/milestones_routing_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe MilestonesRoutingHelper do diff --git a/spec/helpers/namespaces_helper_spec.rb b/spec/helpers/namespaces_helper_spec.rb index e38513f6d94..36465069311 100644 --- a/spec/helpers/namespaces_helper_spec.rb +++ b/spec/helpers/namespaces_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe NamespacesHelper do diff --git a/spec/helpers/nav_helper_spec.rb b/spec/helpers/nav_helper_spec.rb index ff2be795d87..882a125a0da 100644 --- a/spec/helpers/nav_helper_spec.rb +++ b/spec/helpers/nav_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe NavHelper, :do_not_mock_admin_mode do diff --git a/spec/helpers/notes_helper_spec.rb b/spec/helpers/notes_helper_spec.rb index 0715f34dafe..2da7717ebfc 100644 --- a/spec/helpers/notes_helper_spec.rb +++ b/spec/helpers/notes_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "spec_helper" describe NotesHelper do diff --git a/spec/helpers/notifications_helper_spec.rb b/spec/helpers/notifications_helper_spec.rb index 5717b15d656..2384c87b377 100644 --- a/spec/helpers/notifications_helper_spec.rb +++ b/spec/helpers/notifications_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe NotificationsHelper do diff --git a/spec/helpers/page_layout_helper_spec.rb b/spec/helpers/page_layout_helper_spec.rb index 3b08fc511a3..7e851a1af01 100644 --- a/spec/helpers/page_layout_helper_spec.rb +++ b/spec/helpers/page_layout_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe PageLayoutHelper do diff --git a/spec/helpers/pagination_helper_spec.rb b/spec/helpers/pagination_helper_spec.rb index e235475fb47..9fb51249edc 100644 --- a/spec/helpers/pagination_helper_spec.rb +++ b/spec/helpers/pagination_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe PaginationHelper do diff --git a/spec/helpers/preferences_helper_spec.rb b/spec/helpers/preferences_helper_spec.rb index 554c08add2d..c4ed99e56a0 100644 --- a/spec/helpers/preferences_helper_spec.rb +++ b/spec/helpers/preferences_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe PreferencesHelper do diff --git a/spec/helpers/profiles_helper_spec.rb b/spec/helpers/profiles_helper_spec.rb index da2dc229c35..fc282eee26d 100644 --- a/spec/helpers/profiles_helper_spec.rb +++ b/spec/helpers/profiles_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe ProfilesHelper do diff --git a/spec/helpers/rss_helper_spec.rb b/spec/helpers/rss_helper_spec.rb index a7f9bdf07e4..657f5fb42bc 100644 --- a/spec/helpers/rss_helper_spec.rb +++ b/spec/helpers/rss_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe RssHelper do diff --git a/spec/helpers/runners_helper_spec.rb b/spec/helpers/runners_helper_spec.rb index bf00841fcb6..042714d002e 100644 --- a/spec/helpers/runners_helper_spec.rb +++ b/spec/helpers/runners_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe RunnersHelper do diff --git a/spec/helpers/search_helper_spec.rb b/spec/helpers/search_helper_spec.rb index cc058d5b983..bc2a0bb7f38 100644 --- a/spec/helpers/search_helper_spec.rb +++ b/spec/helpers/search_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe SearchHelper do diff --git a/spec/helpers/sidekiq_helper_spec.rb b/spec/helpers/sidekiq_helper_spec.rb index 117abc9c556..86e52419f9c 100644 --- a/spec/helpers/sidekiq_helper_spec.rb +++ b/spec/helpers/sidekiq_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe SidekiqHelper do diff --git a/spec/helpers/snippets_helper_spec.rb b/spec/helpers/snippets_helper_spec.rb index ce5e037f88d..66c8d576a4c 100644 --- a/spec/helpers/snippets_helper_spec.rb +++ b/spec/helpers/snippets_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe SnippetsHelper do diff --git a/spec/helpers/storage_helper_spec.rb b/spec/helpers/storage_helper_spec.rb index 4bd0fbb76ca..577e6e5caf0 100644 --- a/spec/helpers/storage_helper_spec.rb +++ b/spec/helpers/storage_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "spec_helper" describe StorageHelper do diff --git a/spec/helpers/submodule_helper_spec.rb b/spec/helpers/submodule_helper_spec.rb index 465c76e5e6b..fcfce0eaf31 100644 --- a/spec/helpers/submodule_helper_spec.rb +++ b/spec/helpers/submodule_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe SubmoduleHelper do diff --git a/spec/helpers/tab_helper_spec.rb b/spec/helpers/tab_helper_spec.rb index 9abf63d4bd4..3a3935a2130 100644 --- a/spec/helpers/tab_helper_spec.rb +++ b/spec/helpers/tab_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe TabHelper do diff --git a/spec/helpers/time_helper_spec.rb b/spec/helpers/time_helper_spec.rb index 8bf378549fe..858d6d341f4 100644 --- a/spec/helpers/time_helper_spec.rb +++ b/spec/helpers/time_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe TimeHelper do diff --git a/spec/helpers/todos_helper_spec.rb b/spec/helpers/todos_helper_spec.rb index 63806ef91f3..7c73b990338 100644 --- a/spec/helpers/todos_helper_spec.rb +++ b/spec/helpers/todos_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "spec_helper" describe TodosHelper do diff --git a/spec/helpers/tree_helper_spec.rb b/spec/helpers/tree_helper_spec.rb index 4a62e696cd9..c7cdb4ae45c 100644 --- a/spec/helpers/tree_helper_spec.rb +++ b/spec/helpers/tree_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe TreeHelper do diff --git a/spec/helpers/user_callouts_helper_spec.rb b/spec/helpers/user_callouts_helper_spec.rb index 8fa479a4474..547bf693e94 100644 --- a/spec/helpers/user_callouts_helper_spec.rb +++ b/spec/helpers/user_callouts_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "spec_helper" describe UserCalloutsHelper do diff --git a/spec/helpers/users_helper_spec.rb b/spec/helpers/users_helper_spec.rb index 9165e91ddcd..59abe8c09e1 100644 --- a/spec/helpers/users_helper_spec.rb +++ b/spec/helpers/users_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe UsersHelper do diff --git a/spec/helpers/version_check_helper_spec.rb b/spec/helpers/version_check_helper_spec.rb index edc0d64d031..421ff21bfdb 100644 --- a/spec/helpers/version_check_helper_spec.rb +++ b/spec/helpers/version_check_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe VersionCheckHelper do diff --git a/spec/helpers/visibility_level_helper_spec.rb b/spec/helpers/visibility_level_helper_spec.rb index 2d276696208..1a176cfe965 100644 --- a/spec/helpers/visibility_level_helper_spec.rb +++ b/spec/helpers/visibility_level_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe VisibilityLevelHelper do diff --git a/spec/helpers/wiki_helper_spec.rb b/spec/helpers/wiki_helper_spec.rb index ee977e37ec1..bcc2bd71da1 100644 --- a/spec/helpers/wiki_helper_spec.rb +++ b/spec/helpers/wiki_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe WikiHelper do diff --git a/spec/javascripts/ide/stores/modules/commit/actions_spec.js b/spec/javascripts/ide/stores/modules/commit/actions_spec.js index 091b454c0d2..ffb97c85326 100644 --- a/spec/javascripts/ide/stores/modules/commit/actions_spec.js +++ b/spec/javascripts/ide/stores/modules/commit/actions_spec.js @@ -473,18 +473,16 @@ describe('IDE commit module actions', () => { }); it('resets changed files before redirecting', done => { + visitUrl = visitUrl.and.callFake(() => { + expect(store.state.stagedFiles.length).toBe(0); + done(); + }); + spyOn(eventHub, '$on'); store.state.commit.commitAction = '3'; - store - .dispatch('commit/commitChanges') - .then(() => { - expect(store.state.stagedFiles.length).toBe(0); - - done(); - }) - .catch(done.fail); + store.dispatch('commit/commitChanges').catch(done.fail); }); }); }); diff --git a/spec/javascripts/monitoring/charts/time_series_spec.js b/spec/javascripts/monitoring/charts/time_series_spec.js index 091ab06523e..5c718135b90 100644 --- a/spec/javascripts/monitoring/charts/time_series_spec.js +++ b/spec/javascripts/monitoring/charts/time_series_spec.js @@ -60,6 +60,18 @@ describe('Time series component', () => { expect(timeSeriesChart.find('.js-graph-widgets').text()).toBe(mockWidgets); }); + it('allows user to override max value label text using prop', () => { + timeSeriesChart.setProps({ legendMaxText: 'legendMaxText' }); + + expect(timeSeriesChart.props().legendMaxText).toBe('legendMaxText'); + }); + + it('allows user to override average value label text using prop', () => { + timeSeriesChart.setProps({ legendAverageText: 'averageText' }); + + expect(timeSeriesChart.props().legendAverageText).toBe('averageText'); + }); + describe('methods', () => { describe('formatTooltipText', () => { const mockDate = deploymentData[0].created_at; diff --git a/spec/lib/gitlab/import_export/all_models.yml b/spec/lib/gitlab/import_export/all_models.yml index eef9bd006b6..16d5da59f1b 100644 --- a/spec/lib/gitlab/import_export/all_models.yml +++ b/spec/lib/gitlab/import_export/all_models.yml @@ -250,7 +250,6 @@ project: - cluster - clusters - cluster_project -- cluster_ingresses - creator - cycle_analytics_stages - group diff --git a/spec/services/issues/zoom_link_service_spec.rb b/spec/services/issues/zoom_link_service_spec.rb index baa6d774864..595d06d5331 100644 --- a/spec/services/issues/zoom_link_service_spec.rb +++ b/spec/services/issues/zoom_link_service_spec.rb @@ -38,12 +38,6 @@ describe Issues::ZoomLinkService do end end - shared_context 'feature flag disabled' do - before do - stub_feature_flags(issue_zoom_integration: false) - end - end - shared_context 'insufficient permissions' do before do project.add_guest(user) @@ -78,11 +72,6 @@ describe Issues::ZoomLinkService do include_examples 'cannot add link' end - context 'when feature flag is disabled' do - include_context 'feature flag disabled' - include_examples 'cannot add link' - end - context 'with insufficient permissions' do include_context 'insufficient permissions' include_examples 'cannot add link' @@ -113,12 +102,6 @@ describe Issues::ZoomLinkService do it { is_expected.to eq(true) } - context 'when feature flag is disabled' do - include_context 'feature flag disabled' - - it { is_expected.to eq(false) } - end - context 'with insufficient permissions' do include_context 'insufficient permissions' @@ -152,11 +135,6 @@ describe Issues::ZoomLinkService do .to eq(issue.description.delete_suffix("\n\n#{zoom_link}")) end - context 'when feature flag is disabled' do - include_context 'feature flag disabled' - include_examples 'cannot remove link' - end - context 'with insufficient permissions' do include_context 'insufficient permissions' include_examples 'cannot remove link' @@ -187,12 +165,6 @@ describe Issues::ZoomLinkService do it { is_expected.to eq(true) } - context 'when feature flag is disabled' do - include_context 'feature flag disabled' - - it { is_expected.to eq(false) } - end - context 'with insufficient permissions' do include_context 'insufficient permissions' diff --git a/spec/services/projects/fork_service_spec.rb b/spec/services/projects/fork_service_spec.rb index b759830d603..7e7e80ca240 100644 --- a/spec/services/projects/fork_service_spec.rb +++ b/spec/services/projects/fork_service_spec.rb @@ -50,6 +50,7 @@ describe Projects::ForkService do it { expect(to_project.star_count).to be_zero } it { expect(to_project.description).to eq(@from_project.description) } it { expect(to_project.avatar.file).to be_exists } + it { expect(to_project.ci_config_path).to eq(@from_project.ci_config_path) } # This test is here because we had a bug where the from-project lost its # avatar after being forked. @@ -215,7 +216,8 @@ describe Projects::ForkService do @project = create(:project, :repository, creator_id: @group_owner.id, star_count: 777, - description: 'Wow, such a cool project!') + description: 'Wow, such a cool project!', + ci_config_path: 'debian/salsa-ci.yml') @group = create(:group) @group.add_user(@group_owner, GroupMember::OWNER) @group.add_user(@developer, GroupMember::DEVELOPER) @@ -228,14 +230,15 @@ describe Projects::ForkService do it 'group owner successfully forks project into the group' do to_project = fork_project(@project, @group_owner, @opts) - expect(to_project).to be_persisted - expect(to_project.errors).to be_empty - expect(to_project.owner).to eq(@group) - expect(to_project.namespace).to eq(@group) - expect(to_project.name).to eq(@project.name) - expect(to_project.path).to eq(@project.path) - expect(to_project.description).to eq(@project.description) - expect(to_project.star_count).to be_zero + expect(to_project).to be_persisted + expect(to_project.errors).to be_empty + expect(to_project.owner).to eq(@group) + expect(to_project.namespace).to eq(@group) + expect(to_project.name).to eq(@project.name) + expect(to_project.path).to eq(@project.path) + expect(to_project.description).to eq(@project.description) + expect(to_project.ci_config_path).to eq(@project.ci_config_path) + expect(to_project.star_count).to be_zero end end diff --git a/spec/support/helpers/gpg_helpers.rb b/spec/support/helpers/gpg_helpers.rb index 03ffadc8f7f..f4df1cf601c 100644 --- a/spec/support/helpers/gpg_helpers.rb +++ b/spec/support/helpers/gpg_helpers.rb @@ -373,6 +373,8 @@ module GpgHelpers KEY end + # passphrase for secret key is: + # 4a45718624c9939a043471d83d1eda7c def secret_key <<~SECRET -----BEGIN PGP PRIVATE KEY BLOCK----- diff --git a/spec/support/shared_examples/quick_actions/issue/zoom_quick_actions_shared_examples.rb b/spec/support/shared_examples/quick_actions/issue/zoom_quick_actions_shared_examples.rb index cb5460bde23..b4a8e3fca4d 100644 --- a/spec/support/shared_examples/quick_actions/issue/zoom_quick_actions_shared_examples.rb +++ b/spec/support/shared_examples/quick_actions/issue/zoom_quick_actions_shared_examples.rb @@ -45,14 +45,6 @@ shared_examples 'zoom quick actions' do expect(page).to have_content('Failed to add a Zoom meeting') expect(page).not_to have_content(zoom_link) end - - context 'when feature flag disabled' do - before do - stub_feature_flags(issue_zoom_integration: false) - end - - include_examples 'skip silently' - end end context 'with Zoom link not at the end of the issue description' do @@ -92,14 +84,6 @@ shared_examples 'zoom quick actions' do expect(page).to have_content('Zoom meeting removed') expect(issue.reload.description).to eq("Text with #{zoom_link}") end - - context 'when feature flag disabled' do - before do - stub_feature_flags(issue_zoom_integration: false) - end - - include_examples 'skip silently' - end end context 'with a Zoom link not at the end of the description' do |