From 0a8573e00b03694cc56d3ab0c0d6812f50e6b2ad Mon Sep 17 00:00:00 2001 From: Steffen van Bergerem Date: Wed, 10 Aug 2016 17:21:10 +0200 Subject: [PATCH] Add cuke for #6953 --- features/desktop/mentions.feature | 25 ++++++++++++++++++++++ features/step_definitions/mention_steps.rb | 4 ++++ 2 files changed, 29 insertions(+) diff --git a/features/desktop/mentions.feature b/features/desktop/mentions.feature index d16a5ee77..9c613bcf6 100644 --- a/features/desktop/mentions.feature +++ b/features/desktop/mentions.feature @@ -29,3 +29,28 @@ Feature: Mentions Then I should see "Bob Jones" within ".stream_element" When I follow "Bob Jones" Then I should see "Bob Jones" + + Scenario: A user tries to mention another user multiple times + Given following users exist: + | username | email | + | Bob Jones | bob@bob.bob | + | Alice Smith | alice@alice.alice | + And a user with email "bob@bob.bob" is connected with "alice@alice.alice" + When I sign in as "alice@alice.alice" + And I expand the publisher + And I append "@Bob" to the publisher + Then I should see "Bob Jones" within ".tt-suggestion" + When I click on the first user in the mentions dropdown list + When I press the "A" key in the publisher + And I append "@Bob" to the publisher + Then I should not see the mentions dropdown list + When I press "Share" + Then I should see "Bob Jones" within ".stream_element" + + When I expand the publisher + And I append "@Bob" to the publisher + And I click on the first user in the mentions dropdown list + And I press "Share" + Then I should see "Bob Jones" within ".stream_element" + When I follow "Bob Jones" + Then I should see "Bob Jones" diff --git a/features/step_definitions/mention_steps.rb b/features/step_definitions/mention_steps.rb index e382baba6..7f2ce1256 100644 --- a/features/step_definitions/mention_steps.rb +++ b/features/step_definitions/mention_steps.rb @@ -22,3 +22,7 @@ end And /^I click on the first user in the mentions dropdown list$/ do find(".tt-menu .tt-suggestion", match: :first).click end + +Then /^I should not see the mentions dropdown list$/ do + expect(page).to have_no_css ".tt-menu" +end