From 915b554773244a883790308fd9608f5f301edde0 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Tue, 23 Jan 2018 13:09:12 +0100 Subject: Add specific views / selectors for QA runners page --- app/views/ci/runner/_how_to_setup_runner.html.haml | 2 +- qa/qa/page/project/settings/runners.rb | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/app/views/ci/runner/_how_to_setup_runner.html.haml b/app/views/ci/runner/_how_to_setup_runner.html.haml index b75dab0acc5..8db7727b80c 100644 --- a/app/views/ci/runner/_how_to_setup_runner.html.haml +++ b/app/views/ci/runner/_how_to_setup_runner.html.haml @@ -8,7 +8,7 @@ = (_("(checkout the %{link} for information on how to install it).") % { link: link }).html_safe %li = _("Specify the following URL during the Runner setup:") - %code= root_url(only_path: false) + %code#coordinator_address= root_url(only_path: false) %li = _("Use the following registration token during setup:") %code#registration_token= registration_token diff --git a/qa/qa/page/project/settings/runners.rb b/qa/qa/page/project/settings/runners.rb index ac93c3efddd..ff763402d98 100644 --- a/qa/qa/page/project/settings/runners.rb +++ b/qa/qa/page/project/settings/runners.rb @@ -3,14 +3,24 @@ module QA module Project module Settings class Runners < Page::Base + view 'app/views/ci/runner/_how_to_setup_runner.html.haml' do + element :registration_token, '%code#registration_token' + element :coordinator_address, '%code#coordinator_address' + end + + ## + # TODO, phase-out CSS classes from Ruby helpers. + # + view 'app/helpers/runners_helper.rb' do + element :runner_status, 'runner-status-#{status}' + end + def registration_token find('code#registration_token').text end def coordinator_address - # TODO, this needs a specific ID or QA class - # - all('code').first.text + find('code#coordinator_address').text end def has_online_runner? -- cgit v1.2.1