summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2018-04-17 20:55:47 +0800
committerLin Jen-Shin <godfat@godfat.org>2018-04-17 20:55:47 +0800
commit8d4ad0c7dbd5081a73af06d71d5dde9a7f3d3400 (patch)
treeb2fb9d0cd88e0a2d46e05c37e00fd5069efe273c /qa
parent61b4c157444ea0b9e60f44959630db42e21067ad (diff)
parentbcd89dcd1f49c50a5c1c659bed5cbb6899574464 (diff)
downloadgitlab-ce-8d4ad0c7dbd5081a73af06d71d5dde9a7f3d3400.tar.gz
Merge remote-tracking branch 'upstream/master' into qa-add-more-key-tests
* upstream/master: (536 commits) Fix flash errors in performance bar for cached responses Force content to align right Method to track recoverable exceptions in sentry Move PipelineFailed vue component fixed targetmode being included in project FE Docs: Fix header hierarchy in Vuex section of Vue.md Adds helpers to remove withespace and linebreaks `package-qa` was renamed to `package-and-qa` Fix container scanning in vendored GitLab CI configuration for Auto Devops Fixed web IDE not working for sub-groups Remove web ide beta flag from docs and update Make the message break into a new line instead of truncating it Backport Web IDE docs to gitlab-ce link to product handbook piece on permissions Update faraday_middlewar to 0.12.2 Double-check next value for internal ids. Resolve "skeleton placeholder on diff has white background" Replace the `project/commits/comments.feature` spinach test with an rspec analog Set ENV['IN_MEMORY_APPLICATION_SETTINGS'] to 'true in spec/db/production/settings_spec.rb Update docs on `.gitlab-ci.yml` and variables policy ...
Diffstat (limited to 'qa')
-rw-r--r--qa/qa.rb9
-rw-r--r--qa/qa/factory/settings/hashed_storage.rb8
-rw-r--r--qa/qa/page/admin/settings.rb26
-rw-r--r--qa/qa/page/admin/settings/main.rb21
-rw-r--r--qa/qa/page/admin/settings/repository_storage.rb23
-rw-r--r--qa/qa/page/merge_request/show.rb2
-rw-r--r--qa/qa/page/project/settings/common.rb20
-rw-r--r--qa/qa/page/settings/common.rb25
-rw-r--r--qa/spec/page/validator_spec.rb2
9 files changed, 86 insertions, 50 deletions
diff --git a/qa/qa.rb b/qa/qa.rb
index 5fb9364a6ab..48dfc93dd62 100644
--- a/qa/qa.rb
+++ b/qa/qa.rb
@@ -96,6 +96,10 @@ module QA
autoload :OAuth, 'qa/page/main/oauth'
end
+ module Settings
+ autoload :Common, 'qa/page/settings/common'
+ end
+
module Menu
autoload :Main, 'qa/page/menu/main'
autoload :Side, 'qa/page/menu/side'
@@ -156,7 +160,10 @@ module QA
end
module Admin
- autoload :Settings, 'qa/page/admin/settings'
+ module Settings
+ autoload :RepositoryStorage, 'qa/page/admin/settings/repository_storage'
+ autoload :Main, 'qa/page/admin/settings/main'
+ end
end
module Mattermost
diff --git a/qa/qa/factory/settings/hashed_storage.rb b/qa/qa/factory/settings/hashed_storage.rb
index 13ce2435fe4..c69ebed3c6b 100644
--- a/qa/qa/factory/settings/hashed_storage.rb
+++ b/qa/qa/factory/settings/hashed_storage.rb
@@ -9,9 +9,11 @@ module QA
Page::Menu::Main.act { go_to_admin_area }
Page::Menu::Admin.act { go_to_settings }
- Page::Admin::Settings.act do
- enable_hashed_storage
- save_settings
+ Page::Admin::Settings::Main.perform do |setting|
+ setting.expand_repository_storage do |page|
+ page.enable_hashed_storage
+ page.save_settings
+ end
end
QA::Page::Menu::Main.act { sign_out }
diff --git a/qa/qa/page/admin/settings.rb b/qa/qa/page/admin/settings.rb
deleted file mode 100644
index 1f646103e7f..00000000000
--- a/qa/qa/page/admin/settings.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-module QA
- module Page
- module Admin
- class Settings < Page::Base
- view 'app/views/admin/application_settings/_form.html.haml' do
- element :form_actions, '.form-actions'
- element :submit, "submit 'Save'"
- element :repository_storage, '%legend Repository Storage'
- element :hashed_storage,
- 'Create new projects using hashed storage paths'
- end
-
- def enable_hashed_storage
- scroll_to 'legend', text: 'Repository Storage'
- check 'Create new projects using hashed storage paths'
- end
-
- def save_settings
- scroll_to '.form-actions' do
- click_button 'Save'
- end
- end
- end
- end
- end
-end
diff --git a/qa/qa/page/admin/settings/main.rb b/qa/qa/page/admin/settings/main.rb
new file mode 100644
index 00000000000..e7c1220c967
--- /dev/null
+++ b/qa/qa/page/admin/settings/main.rb
@@ -0,0 +1,21 @@
+module QA
+ module Page
+ module Admin
+ module Settings
+ class Main < Page::Base
+ include QA::Page::Settings::Common
+
+ view 'app/views/admin/application_settings/show.html.haml' do
+ element :advanced_settings_section, 'Repository storage'
+ end
+
+ def expand_repository_storage(&block)
+ expand_section('Repository storage') do
+ RepositoryStorage.perform(&block)
+ end
+ end
+ end
+ end
+ end
+ end
+end
diff --git a/qa/qa/page/admin/settings/repository_storage.rb b/qa/qa/page/admin/settings/repository_storage.rb
new file mode 100644
index 00000000000..b4a1344216e
--- /dev/null
+++ b/qa/qa/page/admin/settings/repository_storage.rb
@@ -0,0 +1,23 @@
+module QA
+ module Page
+ module Admin
+ module Settings
+ class RepositoryStorage < Page::Base
+ view 'app/views/admin/application_settings/_repository_storage.html.haml' do
+ element :submit, "submit 'Save changes'"
+ element :hashed_storage,
+ 'Create new projects using hashed storage paths'
+ end
+
+ def enable_hashed_storage
+ check 'Create new projects using hashed storage paths'
+ end
+
+ def save_settings
+ click_button 'Save changes'
+ end
+ end
+ end
+ end
+ end
+end
diff --git a/qa/qa/page/merge_request/show.rb b/qa/qa/page/merge_request/show.rb
index 2f2506f08fb..166861e6c4a 100644
--- a/qa/qa/page/merge_request/show.rb
+++ b/qa/qa/page/merge_request/show.rb
@@ -2,7 +2,7 @@ module QA
module Page
module MergeRequest
class Show < Page::Base
- view 'app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_ready_to_merge.js' do
+ view 'app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue' do
element :merge_button
element :fast_forward_message, 'Fast-forward merge without a merge commit'
end
diff --git a/qa/qa/page/project/settings/common.rb b/qa/qa/page/project/settings/common.rb
index 319cb1045b6..874fb381554 100644
--- a/qa/qa/page/project/settings/common.rb
+++ b/qa/qa/page/project/settings/common.rb
@@ -3,6 +3,8 @@ module QA
module Project
module Settings
module Common
+ include QA::Page::Settings::Common
+
def self.included(base)
base.class_eval do
view 'app/views/projects/edit.html.haml' do
@@ -10,24 +12,6 @@ module QA
end
end
end
-
- # Click the Expand button present in the specified section
- #
- # @param [String] name present in the container in the DOM
- def expand_section(name)
- page.within('#content-body') do
- page.within('section', text: name) do
- # Because it is possible to click the button before the JS toggle code is bound
- wait(reload: false) do
- click_button 'Expand' unless first('button', text: 'Collapse')
-
- page.has_content?('Collapse')
- end
-
- yield if block_given?
- end
- end
- end
end
end
end
diff --git a/qa/qa/page/settings/common.rb b/qa/qa/page/settings/common.rb
new file mode 100644
index 00000000000..a683a6829d5
--- /dev/null
+++ b/qa/qa/page/settings/common.rb
@@ -0,0 +1,25 @@
+module QA
+ module Page
+ module Settings
+ module Common
+ # Click the Expand button present in the specified section
+ #
+ # @param [String] name present in the container in the DOM
+ def expand_section(name)
+ page.within('#content-body') do
+ page.within('section', text: name) do
+ # Because it is possible to click the button before the JS toggle code is bound
+ wait(reload: false) do
+ click_button 'Expand' unless first('button', text: 'Collapse')
+
+ page.has_content?('Collapse')
+ end
+
+ yield if block_given?
+ end
+ end
+ end
+ end
+ end
+ end
+end
diff --git a/qa/spec/page/validator_spec.rb b/qa/spec/page/validator_spec.rb
index 02822d7d18f..55957649904 100644
--- a/qa/spec/page/validator_spec.rb
+++ b/qa/spec/page/validator_spec.rb
@@ -30,7 +30,7 @@ describe QA::Page::Validator do
let(:view) { spy('view') }
before do
- allow(QA::Page::Admin::Settings)
+ allow(QA::Page::Admin::Settings::Main)
.to receive(:views).and_return([view])
end