File obs-server-2.9-0038-ci-Make-feature-test-more-flexible.patch of Package obs-server
From 130b82faa25c279e1097fba83042866545adcddd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Geuken?= <bgeuken@suse.de>
Date: Mon, 25 Jun 2018 13:29:06 +0200
Subject: [PATCH] [ci] Make feature test more flexible
This test started to fail constantly because of having multiple whitespaces
instead of one in the view.
The corresponding view includes a newline within the presented string
which caused the text to fail.
---
src/api/spec/features/webui/packages_spec.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/api/spec/features/webui/packages_spec.rb b/src/api/spec/features/webui/packages_spec.rb
index c0ad995190..94a3b20409 100644
--- a/src/api/spec/features/webui/packages_spec.rb
+++ b/src/api/spec/features/webui/packages_spec.rb
@@ -135,7 +135,7 @@ RSpec.feature 'Packages', type: :feature, js: true do
request = BsRequest.where(description: 'Hey, why not?', creator: user.login, state: 'review')
expect(request).to exist
expect(page.current_path).to match("/request/show/#{request.first.number}")
- expect(page).to have_text("Created by #{user.login}")
+ expect(page).to have_text(/Created by\s+#{user.login}/)
expect(page).to have_text('In state review')
expect(page).to have_text("Set the devel project to package #{third_project.name} / develpackage for package #{user.home_project} / develpackage")
end
--
2.20.1