summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-10-09 14:34:48 +0000
committerRémy Coutable <remy@rymai.me>2018-10-09 14:34:48 +0000
commitcf7aea84f37d33400ef6e5716e234dc5dc735146 (patch)
treeb24c1eba71e4e4b56c04fb9436ffb64803387a2f /qa
parent5dc20e505d259345aa2a3f4049a59abe75cbc301 (diff)
parent0275069cc0ecce232bd0c9e383ac5dcf086f2400 (diff)
downloadgitlab-ce-cf7aea84f37d33400ef6e5716e234dc5dc735146.tar.gz
Merge branch 'qa-304-auto-devops-open-live-environment' into 'master'
Assert prod environment is live after Auto Devops See merge request gitlab-org/gitlab-ce!22131
Diffstat (limited to 'qa')
-rw-r--r--qa/qa.rb5
-rw-r--r--qa/qa/page/menu/side.rb9
-rw-r--r--qa/qa/page/project/operations/environments/index.rb23
-rw-r--r--qa/qa/page/project/operations/environments/show.rb23
-rw-r--r--qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb10
5 files changed, 70 insertions, 0 deletions
diff --git a/qa/qa.rb b/qa/qa.rb
index 8bcaf000bb2..c85401c7f06 100644
--- a/qa/qa.rb
+++ b/qa/qa.rb
@@ -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..3c08f14d6da 100644
--- a/qa/qa/page/menu/side.rb
+++ b/qa/qa/page/menu/side.rb
@@ -9,6 +9,7 @@ module QA
element :link_pipelines
element :pipelines_settings_link, "title: _('CI / CD')"
element :operations_kubernetes_link, "title: _('Kubernetes')"
+ element :operations_environments_link
element :issues_link, /link_to.*shortcuts-issues/
element :issues_link_text, "Issues"
element :merge_requests_link, /link_to.*shortcuts-merge_requests/
@@ -40,6 +41,14 @@ module QA
end
end
+ def click_operations_environments
+ hover_operations do
+ within_submenu do
+ click_element(:operations_environments_link)
+ 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..63965a57edd
--- /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
+ end
+
+ def go_to_environment(environment_name)
+ wait(reload: false) do
+ find(element_selector_css(:environment_link), text: environment_name).click
+ 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..aa88c218c89
--- /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
+ end
+
+ def view_deployment(&block)
+ new_window = window_opened_by { click_element(:view_deployment) }
+
+ 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