diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-21 09:08:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-21 09:08:58 +0300 |
commit | 18b8435318887d3fc6e9f9d305967a953cdd7d3f (patch) | |
tree | 28cb71f255eb364c224ff24dd085f8cd836951b1 /spec | |
parent | 4359b9650ecf0960f04f0fd38fc25bec7b478a11 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/group_variables_spec.rb | 2 | ||||
-rw-r--r-- | spec/features/project_group_variables_spec.rb | 1 | ||||
-rw-r--r-- | spec/features/project_variables_spec.rb | 2 | ||||
-rw-r--r-- | spec/features/projects/settings/registry_settings_spec.rb | 1 | ||||
-rw-r--r-- | spec/frontend/fixtures/groups.rb | 1 | ||||
-rw-r--r-- | spec/frontend/fixtures/projects.rb | 1 | ||||
-rw-r--r-- | spec/frontend/repository/components/preview/index_spec.js | 19 |
7 files changed, 25 insertions, 2 deletions
diff --git a/spec/features/group_variables_spec.rb b/spec/features/group_variables_spec.rb index 2b8d37bd629..524ae837b5e 100644 --- a/spec/features/group_variables_spec.rb +++ b/spec/features/group_variables_spec.rb @@ -11,7 +11,7 @@ describe 'Group variables', :js do before do group.add_owner(user) gitlab_sign_in(user) - + stub_feature_flags(new_variables_ui: false) visit page_path end diff --git a/spec/features/project_group_variables_spec.rb b/spec/features/project_group_variables_spec.rb index c1f1c442937..242fc993718 100644 --- a/spec/features/project_group_variables_spec.rb +++ b/spec/features/project_group_variables_spec.rb @@ -24,6 +24,7 @@ describe 'Project group variables', :js do sign_in(user) project.add_maintainer(user) group.add_owner(user) + stub_feature_flags(new_variables_ui: false) end it 'project in group shows inherited vars from ancestor group' do diff --git a/spec/features/project_variables_spec.rb b/spec/features/project_variables_spec.rb index 9e3f8a843a1..1452317c22b 100644 --- a/spec/features/project_variables_spec.rb +++ b/spec/features/project_variables_spec.rb @@ -12,7 +12,7 @@ describe 'Project variables', :js do sign_in(user) project.add_maintainer(user) project.variables << variable - + stub_feature_flags(new_variables_ui: false) visit page_path end diff --git a/spec/features/projects/settings/registry_settings_spec.rb b/spec/features/projects/settings/registry_settings_spec.rb index fc1a85c3efe..0613148172f 100644 --- a/spec/features/projects/settings/registry_settings_spec.rb +++ b/spec/features/projects/settings/registry_settings_spec.rb @@ -10,6 +10,7 @@ describe 'Project > Settings > CI/CD > Container registry tag expiration policy' before do sign_in(user) stub_container_registry_config(enabled: true) + stub_feature_flags(new_variables_ui: false) end context 'as owner' do diff --git a/spec/frontend/fixtures/groups.rb b/spec/frontend/fixtures/groups.rb index 237fc711594..2421b67a130 100644 --- a/spec/frontend/fixtures/groups.rb +++ b/spec/frontend/fixtures/groups.rb @@ -15,6 +15,7 @@ describe 'Groups (JavaScript fixtures)', type: :controller do end before do + stub_feature_flags(new_variables_ui: false) group.add_maintainer(admin) sign_in(admin) end diff --git a/spec/frontend/fixtures/projects.rb b/spec/frontend/fixtures/projects.rb index af5b70fbbeb..ff21dbaebe8 100644 --- a/spec/frontend/fixtures/projects.rb +++ b/spec/frontend/fixtures/projects.rb @@ -20,6 +20,7 @@ describe 'Projects (JavaScript fixtures)', type: :controller do end before do + stub_feature_flags(new_variables_ui: false) project.add_maintainer(admin) sign_in(admin) allow(SecureRandom).to receive(:hex).and_return('securerandomhex:thereisnospoon') diff --git a/spec/frontend/repository/components/preview/index_spec.js b/spec/frontend/repository/components/preview/index_spec.js index 7587ca4186c..6ae323f5c3f 100644 --- a/spec/frontend/repository/components/preview/index_spec.js +++ b/spec/frontend/repository/components/preview/index_spec.js @@ -1,7 +1,10 @@ import { shallowMount } from '@vue/test-utils'; import { GlLoadingIcon } from '@gitlab/ui'; +import { handleLocationHash } from '~/lib/utils/common_utils'; import Preview from '~/repository/components/preview/index.vue'; +jest.mock('~/lib/utils/common_utils'); + let vm; let $apollo; @@ -38,6 +41,22 @@ describe('Repository file preview component', () => { }); }); + it('handles hash after render', () => { + factory({ + webUrl: 'http://test.com', + name: 'README.md', + }); + + vm.setData({ readme: { html: '<div class="blob">test</div>' } }); + + return vm.vm + .$nextTick() + .then(vm.vm.$nextTick()) + .then(() => { + expect(handleLocationHash).toHaveBeenCalled(); + }); + }); + it('renders loading icon', () => { factory({ webUrl: 'http://test.com', |