diff options
Diffstat (limited to 'qa/qa/scenario/test/sanity/selectors.rb')
-rw-r--r-- | qa/qa/scenario/test/sanity/selectors.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/qa/qa/scenario/test/sanity/selectors.rb b/qa/qa/scenario/test/sanity/selectors.rb index e05269e8d55..632a0f5f2a9 100644 --- a/qa/qa/scenario/test/sanity/selectors.rb +++ b/qa/qa/scenario/test/sanity/selectors.rb @@ -7,14 +7,16 @@ module QA class Selectors < Scenario::Template include Scenario::Bootable - PAGES = [QA::Page].freeze + def pages + @pages ||= [QA::Page] + end def perform(*) - validators = PAGES.map do |pages| - Page::Validator.new(pages) + validators = pages.map do |page| + Page::Validator.new(page) end - validators.map(&:errors).flatten.tap do |errors| + validators.flat_map(&:errors).tap do |errors| break if errors.none? warn <<~EOS |