From 1811028835ec292e6402a2b127f67abbd8d12181 Mon Sep 17 00:00:00 2001 From: Steffen van Bergerem Date: Sun, 19 Jun 2016 15:35:18 +0200 Subject: [PATCH] Fix flaky mentioning cukes closes #6876 --- features/support/publishing_cuke_helpers.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/features/support/publishing_cuke_helpers.rb b/features/support/publishing_cuke_helpers.rb index c76c46f68..d1ec4fd69 100644 --- a/features/support/publishing_cuke_helpers.rb +++ b/features/support/publishing_cuke_helpers.rb @@ -4,11 +4,13 @@ module PublishingCukeHelpers end def append_to_publisher(txt, input_selector='#status_message_fake_text') - elem = find(input_selector) - elem.native.send_keys(' ' + txt) + status_message_text = find("#status_message_text", visible: false).value + find(input_selector).native.send_key(" #{txt}") # make sure the other text field got the new contents - expect(find("#status_message_text", visible: false)).to have_value txt + if input_selector == "#status_message_fake_text" + expect(page).to have_selector("#status_message_text[value='#{status_message_text} #{txt}']", visible: false) + end end def upload_file_with_publisher(path)