From 8f021cbfce7a2e99b3fb5a16c1dad67ae10cb8c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Fri, 8 Nov 2019 17:47:48 +0100 Subject: [PATCH] Fix random title with trailing spaces When the generated title for a dashboard action ended with a space, the action `click_link(feature.title)` failed because the link shown in the HTML ignores the trailing spaces. Using `strip` solves the problem. Not the most elegant solution, though; ideally we'd generate a better title. --- spec/factories/proposals.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/factories/proposals.rb b/spec/factories/proposals.rb index ac357aa6f..1229419d2 100644 --- a/spec/factories/proposals.rb +++ b/spec/factories/proposals.rb @@ -132,7 +132,7 @@ FactoryBot.define do end factory :dashboard_action, class: "Dashboard::Action" do - title { Faker::Lorem.sentence[0..79] } + title { Faker::Lorem.sentence[0..79].strip } description { Faker::Lorem.sentence } link { nil } request_to_administrators { true }