summaryrefslogtreecommitdiff
path: root/qa/qa/page/admin/settings/repo_storage.rb
blob: dc648c77abd24faece4ca635d695d10fb3ab9291 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
module QA
  module Page
    module Admin
      module Settings
        class RepoStorage < Page::Base
          view 'app/views/admin/application_settings/_repo_storage.html.haml' do
            element :submit, "submit 'Save changes'"
            element :hashed_storage,
              'Create new projects using hashed storage paths'
          end

          def enable_hashed_storage
            within_repo_storage do
              check 'Create new projects using hashed storage paths'
            end
          end

          def save_settings
            within_repo_storage do
              click_button 'Save changes'
            end
          end

          def within_repo_storage
            page.within('.as-repo-storage') do
              yield
            end
          end
        end
      end
    end
  end
end