diff --git a/plugins/chat/spec/system/hashtag_autocomplete_spec.rb b/plugins/chat/spec/system/hashtag_autocomplete_spec.rb
index a69c783b48..ad61344943 100644
--- a/plugins/chat/spec/system/hashtag_autocomplete_spec.rb
+++ b/plugins/chat/spec/system/hashtag_autocomplete_spec.rb
@@ -60,18 +60,16 @@ describe "Using #hashtag autocompletion to search for and lookup channels",
end
expect(chat_channel_page).to have_message(id: message.id)
- within chat_channel_page.message_by_id(message.id) do
- cooked_hashtags = page.all(".hashtag-cooked", count: 3)
+ cooked_hashtags = page.all(".hashtag-cooked", count: 3)
- expect(cooked_hashtags[0]["outerHTML"]).to eq(<<~HTML.chomp)
- Random
- HTML
- expect(cooked_hashtags[1]["outerHTML"]).to eq(<<~HTML.chomp)
- Raspberry
- HTML
- expect(cooked_hashtags[2]["outerHTML"]).to eq(<<~HTML.chomp)
- razed
- HTML
- end
+ expect(cooked_hashtags[0]["outerHTML"]).to eq(<<~HTML.chomp)
+ Random
+ HTML
+ expect(cooked_hashtags[1]["outerHTML"]).to eq(<<~HTML.chomp)
+ Raspberry
+ HTML
+ expect(cooked_hashtags[2]["outerHTML"]).to eq(<<~HTML.chomp)
+ razed
+ HTML
end
end
diff --git a/spec/system/hashtag_autocomplete_spec.rb b/spec/system/hashtag_autocomplete_spec.rb
index 4366a15648..131c19d32f 100644
--- a/spec/system/hashtag_autocomplete_spec.rb
+++ b/spec/system/hashtag_autocomplete_spec.rb
@@ -81,16 +81,13 @@ describe "Using #hashtag autocompletion to search for and lookup categories and
topic_page.type_in_composer("this is a #cool-cat category and a #cooltag tag")
topic_page.send_reply
expect(topic_page).to have_post_number(2)
+ cooked_hashtags = page.all(".hashtag-cooked", count: 2)
- within topic_page.post_by_number(2) do
- cooked_hashtags = page.all(".hashtag-cooked", count: 2)
-
- expect(cooked_hashtags[0]["outerHTML"]).to eq(<<~HTML.chomp)
- Cool Category
- HTML
- expect(cooked_hashtags[1]["outerHTML"]).to eq(<<~HTML.chomp)
- cooltag
- HTML
- end
+ expect(cooked_hashtags[0]["outerHTML"]).to eq(<<~HTML.chomp)
+ Cool Category
+ HTML
+ expect(cooked_hashtags[1]["outerHTML"]).to eq(<<~HTML.chomp)
+ cooltag
+ HTML
end
end
diff --git a/spec/system/page_objects/pages/topic.rb b/spec/system/page_objects/pages/topic.rb
index 5815fb760c..20a9675aad 100644
--- a/spec/system/page_objects/pages/topic.rb
+++ b/spec/system/page_objects/pages/topic.rb
@@ -89,7 +89,7 @@ module PageObjects
end
def send_reply
- within("#reply-control") { find(".save-or-cancel .create").click }
+ find("#reply-control .save-or-cancel .create").click
end
private