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
path: root/qa/spec
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-19 00:06:19 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-19 00:06:19 +0300
commitaaf124b0f7698f5def277b02ab97f3992fe1569d (patch)
treee5ed2e5430b4eb67ea4a0e0348979d7967ce050d /qa/spec
parent143f196f8b3c40ceb7e9335a8dcc712b079519b9 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa/spec')
-rw-r--r--qa/spec/page/element_spec.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/qa/spec/page/element_spec.rb b/qa/spec/page/element_spec.rb
index ff5e118cefa..3f64743ffac 100644
--- a/qa/spec/page/element_spec.rb
+++ b/qa/spec/page/element_spec.rb
@@ -117,5 +117,23 @@ describe QA::Page::Element do
it 'properly translates to a data-qa-selector' do
expect(subject.selector_css).to include(%q([data-qa-selector="my_element"]))
end
+
+ context 'additional selectors' do
+ let(:element) { described_class.new(:my_element, index: 3, another_match: 'something') }
+ let(:required_element) { described_class.new(:my_element, required: true, index: 3) }
+
+ it 'matches on additional data-qa properties' do
+ expect(element.selector_css).to include(%q([data-qa-selector="my_element"][data-qa-index="3"]))
+ end
+
+ it 'doesnt conflict with element requirement' do
+ expect(required_element).to be_required
+ expect(required_element.selector_css).not_to include(%q(data-qa-required))
+ end
+
+ it 'translates snake_case to kebab-case' do
+ expect(element.selector_css).to include(%q(data-qa-another-match))
+ end
+ end
end
end