From 86e5dcdb21f5e83009f877e9c62a9f5252de8d99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= <remy@rymai.me> Date: Mon, 3 Sep 2018 16:36:18 +0200 Subject: [PATCH] [QA] Add a new Test::Sanity::Failing scenario that always fails MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable <remy@rymai.me> --- qa/qa.rb | 1 + qa/qa/scenario/test/sanity/failing.rb | 18 ++++++++++++++++++ qa/qa/specs/features/sanity/failing_spec.rb | 13 +++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 qa/qa/scenario/test/sanity/failing.rb create mode 100644 qa/qa/specs/features/sanity/failing_spec.rb diff --git a/qa/qa.rb b/qa/qa.rb index 8e23b444f3b..c29d6ce5498 100644 --- a/qa/qa.rb +++ b/qa/qa.rb @@ -98,6 +98,7 @@ module QA end module Sanity + autoload :Failing, 'qa/scenario/test/sanity/failing' autoload :Selectors, 'qa/scenario/test/sanity/selectors' end end diff --git a/qa/qa/scenario/test/sanity/failing.rb b/qa/qa/scenario/test/sanity/failing.rb new file mode 100644 index 00000000000..03452f6693d --- /dev/null +++ b/qa/qa/scenario/test/sanity/failing.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +module QA + module Scenario + module Test + module Sanity + ## + # This scenario exits with a 1 exit code. + # + class Failing < Template + include Bootable + + tags :failing + end + end + end + end +end diff --git a/qa/qa/specs/features/sanity/failing_spec.rb b/qa/qa/specs/features/sanity/failing_spec.rb new file mode 100644 index 00000000000..7e0480e9067 --- /dev/null +++ b/qa/qa/specs/features/sanity/failing_spec.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module QA + context 'Sanity checks', :orchestrated, :failing do + describe 'Failing orchestrated example' do + it 'always fails' do + Runtime::Browser.visit(:gitlab, Page::Main::Login) + + expect(page).to have_text("These Aren't the Texts You're Looking For", wait: 1) + end + end + end +end -- 2.30.9