Commit 9674e494 authored by Michael Kozono's avatar Michael Kozono Committed by Douglas Barbosa Alexandre

Fix Geo QA for 11.11.0 RC1

parent 36cd24ae
......@@ -2,12 +2,12 @@
.form-row.form-group
.form-group.col-sm-6
= form.label :name, _('Name'), class: 'font-weight-bold'
= form.text_field :name, class: 'form-control'
= form.text_field :name, class: 'form-control qa-node-name-field'
.form-text.text-muted= _('The unique identifier for the Geo node. Must match `geo_node_name` if it is set in gitlab.rb, otherwise it must match `external_url`')
.form-group.col-sm-6
= form.label :url, s_('Geo|URL'), class: 'font-weight-bold'
= form.text_field :url, class: 'form-control'
= form.text_field :url, class: 'form-control qa-node-url-field'
.form-text.text-muted= _('The user-facing URL of the Geo node.')
.form-group.col-sm-6.js-internal-url{ class: ('hidden' unless geo_node.primary?) }
......
......@@ -6,7 +6,7 @@
%h2.page-title.clearfix
%span.title-text.float-left= _("Geo Nodes")
= link_to s_("GeoNodes|New node"), new_admin_geo_node_path, class: 'btn btn-success float-right'
= link_to s_("GeoNodes|New node"), new_admin_geo_node_path, class: 'btn btn-success float-right qa-new-node-link'
%hr.page-title-separator
%p.page-subtitle.light
......
......@@ -10,5 +10,5 @@
= form_for [:admin, @node], as: :geo_node, url: admin_geo_nodes_path, html: { class: 'js-geo-node-form' } do |f|
= render partial: 'form', locals: { form: f, geo_node: @node }
.form-actions
= f.submit 'Add Node', class: 'btn btn-success'
= f.submit 'Add Node', class: 'btn btn-success qa-add-node-button'
= link_to 'Cancel', admin_geo_nodes_path, class: 'btn btn-cancel'
......@@ -8,20 +8,24 @@ module QA
module Nodes
class New < QA::Page::Base
view 'ee/app/views/admin/geo/nodes/_form.html.haml' do
element :node_url_field, 'text_field :url' # rubocop:disable QA/ElementWithPattern
element :node_url_placeholder, "label :url" # rubocop:disable QA/ElementWithPattern
element :node_name_field
element :node_url_field
end
view 'ee/app/views/admin/geo/nodes/new.html.haml' do
element :add_node_button, "submit 'Add Node'" # rubocop:disable QA/ElementWithPattern
element :add_node_button
end
def set_node_name(name)
fill_element :node_name_field, name
end
def set_node_address(address)
fill_in 'URL', with: address
fill_element :node_url_field, address
end
def add_node!
click_button 'Add Node'
click_element :add_node_button
end
end
end
......
......@@ -8,11 +8,11 @@ module QA
module Nodes
class Show < QA::Page::Base
view 'ee/app/views/admin/geo/nodes/index.html.haml' do
element :new_node_link, /link_to .*New node/ # rubocop:disable QA/ElementWithPattern
element :new_node_link
end
def new_node!
click_link 'New node'
click_element :new_node_link
end
end
end
......
......@@ -5,6 +5,7 @@ module QA
module Resource
module Geo
class Node < QA::Resource::Base
attr_accessor :name
attr_accessor :address
def fabricate!
......@@ -14,8 +15,9 @@ module QA
EE::Page::Admin::Geo::Nodes::Show.perform(&:new_node!)
EE::Page::Admin::Geo::Nodes::New.perform do |page|
raise ArgumentError if @address.nil?
raise ArgumentError if @name.nil? || @address.nil?
page.set_node_name(@name)
page.set_node_address(@address)
page.add_node!
end
......
......@@ -49,8 +49,8 @@ module QA
include QA::Scenario::Actable
def initialize
@address = QA::Runtime::Scenario.geo_primary_address
@name = QA::Runtime::Scenario.geo_primary_name
@address = QA::Runtime::Scenario.geo_primary_address
end
def add_license
......@@ -74,6 +74,7 @@ module QA
QA::Runtime::Browser.visit(:geo_primary, QA::Page::Main::Login) do
Resource::Geo::Node.fabricate! do |node|
node.name = QA::Runtime::Scenario.geo_secondary_name
node.address = QA::Runtime::Scenario.geo_secondary_address
end
end
......
# frozen_string_literal: true
module QA
# Failure issue: https://gitlab.com/gitlab-org/quality/nightly/issues/99
context 'Geo', :orchestrated, :geo, :quarantine do
context 'Geo', :orchestrated, :geo do
describe 'Geo Nodes API' do
before(:all) do
get_personal_access_token
......
# frozen_string_literal: true
module QA
# Failure issue: https://gitlab.com/gitlab-org/quality/nightly/issues/99
context 'Geo', :orchestrated, :geo, :quarantine do
context 'Geo', :orchestrated, :geo do
describe 'GitLab Geo attachment replication' do
let(:file_to_attach) { File.absolute_path(File.join('spec', 'fixtures', 'banana_sample.gif')) }
......
# frozen_string_literal: true
module QA
# Failure issue: https://gitlab.com/gitlab-org/quality/nightly/issues/99
context 'Geo', :orchestrated, :geo, :quarantine do
context 'Geo', :orchestrated, :geo do
describe 'GitLab HTTP push' do
let(:file_name) { 'README.md' }
......
# frozen_string_literal: true
module QA
# Failure issue: https://gitlab.com/gitlab-org/quality/nightly/issues/99
context 'Geo', :orchestrated, :geo, :quarantine do
context 'Geo', :orchestrated, :geo do
describe 'GitLab Geo HTTP push secondary' do
let(:file_content_primary) { 'This is a Geo project! Commit from primary.' }
let(:file_content_secondary) { 'This is a Geo project! Commit from secondary.' }
......
# frozen_string_literal: true
module QA
# Failure issue: https://gitlab.com/gitlab-org/quality/nightly/issues/99
context 'Geo', :orchestrated, :geo, :quarantine do
context 'Geo', :orchestrated, :geo do
describe 'GitLab Geo project rename replication' do
it 'user renames project' do
# create the project and push code
......
# frozen_string_literal: true
module QA
# Failure issue: https://gitlab.com/gitlab-org/quality/nightly/issues/99
context 'Geo', :orchestrated, :geo, :quarantine do
context 'Geo', :orchestrated, :geo do
describe 'GitLab SSH push' do
let(:file_name) { 'README.md' }
......
# frozen_string_literal: true
module QA
# Failure issue: https://gitlab.com/gitlab-org/quality/nightly/issues/99
context 'Geo', :orchestrated, :geo, :quarantine do
context 'Geo', :orchestrated, :geo do
describe 'GitLab SSH push to secondary' do
let(:file_content_primary) { 'This is a Geo project! Commit from primary.' }
let(:file_content_secondary) { 'This is a Geo project! Commit from secondary.' }
......
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