diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-01-10 10:49:11 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-01-10 10:49:11 +0100 |
commit | 9910968f0c3a630b9ac04b9691b4fba51619e2d3 (patch) | |
tree | a4a04819e26579161756e93d724cc3a73aff16e7 /qa/qa/page | |
parent | fc9ecdbb4f98e91d01ad73edcd3d659dfed7b9bf (diff) | |
download | gitlab-ce-9910968f0c3a630b9ac04b9691b4fba51619e2d3.tar.gz |
Fix QA selector class used to click on QA elements
Diffstat (limited to 'qa/qa/page')
-rw-r--r-- | qa/qa/page/base.rb | 2 | ||||
-rw-r--r-- | qa/qa/page/element.rb | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/qa/qa/page/base.rb b/qa/qa/page/base.rb index 3f409f1ba03..ea4c920c82c 100644 --- a/qa/qa/page/base.rb +++ b/qa/qa/page/base.rb @@ -41,7 +41,7 @@ module QA end def click_element(name) - find(Page::Element.new(name).selector).click + find(Page::Element.new(name).selector_css).click end def self.path diff --git a/qa/qa/page/element.rb b/qa/qa/page/element.rb index d8db40b1b5d..9944a39ce07 100644 --- a/qa/qa/page/element.rb +++ b/qa/qa/page/element.rb @@ -12,6 +12,10 @@ module QA "qa-#{@name.to_s.tr('_', '-')}" end + def selector_css + ".#{selector}" + end + def expression if @pattern.is_a?(String) @_regexp ||= Regexp.new(Regexp.escape(@pattern)) |