Commit bde028c4 authored by Thong Kuah's avatar Thong Kuah

Assert prod environment is live after Auto Devops

Goes to Operations > Environments and clicks on the
"View deployment" link for production.
parent f71c497f
......@@ -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'
......
......@@ -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
......
# 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
# 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
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment