diff options
author | Thong Kuah <tkuah@gitlab.com> | 2018-10-05 16:36:32 +1300 |
---|---|---|
committer | Thong Kuah <tkuah@gitlab.com> | 2018-10-08 09:06:00 +1300 |
commit | bde028c4af83574b44bdcb6bde0ec18a09d15845 (patch) | |
tree | 2dd333bf3de6f92d9cde983ab6aef4f6bab02075 /qa | |
parent | f71c497f5da791a35876206255e342a9bb5e49c5 (diff) | |
download | gitlab-ce-bde028c4af83574b44bdcb6bde0ec18a09d15845.tar.gz |
Assert prod environment is live after Auto Devops
Goes to Operations > Environments and clicks on the
"View deployment" link for production.
Diffstat (limited to 'qa')
-rw-r--r-- | qa/qa.rb | 5 | ||||
-rw-r--r-- | qa/qa/page/menu/side.rb | 8 | ||||
-rw-r--r-- | qa/qa/page/project/operations/environments/index.rb | 23 | ||||
-rw-r--r-- | qa/qa/page/project/operations/environments/show.rb | 23 | ||||
-rw-r--r-- | qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb | 10 |
5 files changed, 69 insertions, 0 deletions
@@ -201,6 +201,11 @@ module QA end module Operations + module Environments + autoload :Index, 'qa/page/project/operations/environments/index' + autoload :Show, 'qa/page/project/operations/environments/show' + end + module Kubernetes autoload :Index, 'qa/page/project/operations/kubernetes/index' autoload :Add, 'qa/page/project/operations/kubernetes/add' diff --git a/qa/qa/page/menu/side.rb b/qa/qa/page/menu/side.rb index a1eedfea42e..d0b9bbec844 100644 --- a/qa/qa/page/menu/side.rb +++ b/qa/qa/page/menu/side.rb @@ -40,6 +40,14 @@ module QA end end + def click_operations_environments + hover_operations do + within_submenu do + click_link('Environments') + end + end + end + def click_operations_kubernetes hover_operations do within_submenu do diff --git a/qa/qa/page/project/operations/environments/index.rb b/qa/qa/page/project/operations/environments/index.rb new file mode 100644 index 00000000000..62b154e5721 --- /dev/null +++ b/qa/qa/page/project/operations/environments/index.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module QA + module Page + module Project + module Operations + module Environments + class Index < Page::Base + view 'app/assets/javascripts/environments/components/environment_item.vue' do + element :environment_link, 'class="environment-name table-mobile-content"' + end + + def go_to_environment(environment_name) + wait(reload: false) do + click_link(environment_name) + end + end + end + end + end + end + end +end diff --git a/qa/qa/page/project/operations/environments/show.rb b/qa/qa/page/project/operations/environments/show.rb new file mode 100644 index 00000000000..6736e027c5d --- /dev/null +++ b/qa/qa/page/project/operations/environments/show.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module QA + module Page + module Project + module Operations + module Environments + class Show < Page::Base + view 'app/views/projects/environments/_external_url.html.haml' do + element :view_deployment, %q{title: s_('Environments|Open live environment')} + end + + def view_deployment(&block) + new_window = window_opened_by { click_on('Open live environment') } + + within_window(new_window, &block) if block + end + end + end + end + end + end +end diff --git a/qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb b/qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb index 4604936916b..6286e516180 100644 --- a/qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb +++ b/qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb @@ -65,6 +65,16 @@ module QA expect(pipeline).to have_build('test', status: :success, wait: 600) expect(pipeline).to have_build('production', status: :success, wait: 1200) end + + Page::Menu::Side.act { click_operations_environments } + Page::Project::Operations::Environments::Index.perform do |index| + index.go_to_environment('production') + end + Page::Project::Operations::Environments::Show.perform do |show| + show.view_deployment do + expect(page).to have_content('Hello World!') + end + end end end end |