Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-01-09 16:28:10 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-01-09 16:28:10 +0300
commit7725a7071d9ff2a32b9dfa9c19ac827e2e56fd9b (patch)
tree67f5f19d269539e233ec4d6c28b866edb9cfecaf /qa/spec/page
parent65615776ebe67f0da57d27722dbcbf6f2649f81d (diff)
Reduce duplication in QA page elements-related code
Diffstat (limited to 'qa/spec/page')
-rw-r--r--qa/spec/page/element_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/qa/spec/page/element_spec.rb b/qa/spec/page/element_spec.rb
index c665267b90e..a48f1f54a32 100644
--- a/qa/spec/page/element_spec.rb
+++ b/qa/spec/page/element_spec.rb
@@ -1,4 +1,11 @@
describe QA::Page::Element do
+ describe '#selector' do
+ it 'transform element name into QA-specific selector' do
+ expect(described_class.new(:sign_in_button).selector)
+ .to eq 'qa-sign-in-button'
+ end
+ end
+
context 'when pattern is an expression' do
subject { described_class.new(:something, /button 'Sign in'/) }