diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-09-25 15:42:34 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-09-25 15:42:34 +0800 |
commit | 239332eed3fa870fd41be83864882c0f389840d8 (patch) | |
tree | a81aba7617f391f9cb4a67339faa9de67b4426d3 /spec/support | |
parent | 961b0849e5098dae74050f6c49ebf3011ce072b7 (diff) | |
parent | 7da72a0de296e430378c7eb85fc486a01f3163bd (diff) | |
download | gitlab-ce-239332eed3fa870fd41be83864882c0f389840d8.tar.gz |
Merge remote-tracking branch 'upstream/master' into no-ivar-in-modules
* upstream/master: (168 commits)
Update CHANGELOG.md for 10.0.1
Remove Grit settings from default settings
Fix duplicate key errors in PostDeployMigrateUserExternalMailData migration
Workaround for #38259
Workaround for n+1 in Projects::TreeController#show
Removed old icons from project page
Make branches page translatable
fix typo in icons section
Don't show it if there's no project.
Update CHANGELOG.md for 10.0.0
Inform user that current shared projects will remain shared
Allow the git circuit breaker to correctly handle missing repository storages
Reserve refs/replace cos `git-replace` is using it
Resolve "Better SVG Usage in the Frontend"
Replace the 'project/service.feature' spinach test with an rspec analog
Replace the 'project/shortcuts.feature' spinach test with an rspec analog
Removed two legacy config options
Fix rendering double note issue.
IssueNotes: Switch back to Write pane when note cancel or submit.
Upgrade Nokogiri because of CVE-2017-9050
...
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/matchers/navigation_matcher.rb | 6 | ||||
-rw-r--r-- | spec/support/stub_configuration.rb | 2 | ||||
-rw-r--r-- | spec/support/stub_gitlab_calls.rb | 4 |
3 files changed, 8 insertions, 4 deletions
diff --git a/spec/support/matchers/navigation_matcher.rb b/spec/support/matchers/navigation_matcher.rb index 5b6d9c1a4df..63f59b9654c 100644 --- a/spec/support/matchers/navigation_matcher.rb +++ b/spec/support/matchers/navigation_matcher.rb @@ -4,3 +4,9 @@ RSpec::Matchers.define :have_active_navigation do |expected| expect(page.find('.sidebar-top-level-items > li.active')).to have_content(expected) end end + +RSpec::Matchers.define :have_active_sub_navigation do |expected| + match do |page| + expect(page.find('.sidebar-sub-level-items > li.active:not(.fly-out-top-item)')).to have_content(expected) + end +end diff --git a/spec/support/stub_configuration.rb b/spec/support/stub_configuration.rb index 45c10e78789..2dfb4d4a07f 100644 --- a/spec/support/stub_configuration.rb +++ b/spec/support/stub_configuration.rb @@ -42,7 +42,7 @@ module StubConfiguration # Default storage is always required messages['default'] ||= Gitlab.config.repositories.storages.default messages.each do |storage_name, storage_settings| - storage_settings['path'] ||= TestEnv.repos_path + storage_settings['path'] = TestEnv.repos_path unless storage_settings.key?('path') storage_settings['failure_count_threshold'] ||= 10 storage_settings['failure_wait_time'] ||= 30 storage_settings['failure_reset_time'] ||= 1800 diff --git a/spec/support/stub_gitlab_calls.rb b/spec/support/stub_gitlab_calls.rb index 9695f35bd25..78a2ff73746 100644 --- a/spec/support/stub_gitlab_calls.rb +++ b/spec/support/stub_gitlab_calls.rb @@ -26,11 +26,9 @@ module StubGitlabCalls end def stub_container_registry_config(registry_settings) + allow(Gitlab.config.registry).to receive_messages(registry_settings) allow(Auth::ContainerRegistryAuthenticationService) .to receive(:full_access_token).and_return('token') - - allow(Gitlab.config.registry).to receive_messages(registry_settings) - load 'lib/gitlab/auth.rb' end def stub_container_registry_tags(repository: :any, tags:) |