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.
This commit is contained in:
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user