From c7a0b053fa0382649672564ca25b65ac3f8d2404 Mon Sep 17 00:00:00 2001
From: Justin Ramos <justin@southernmade.co>
Date: Thu, 17 Nov 2016 13:19:11 +0000
Subject: [PATCH] fixing invitations modal visibility issue

closes #7191
---
 Changelog.md                         |  1 +
 app/views/shared/_invitations.haml   |  9 +++++----
 features/desktop/invitations.feature | 11 ++++++++++-
 3 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/Changelog.md b/Changelog.md
index f4f8d6e42a..b7fd345347 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -9,6 +9,7 @@
 * Fix fetching comments after fetching likes [#7167](https://github.com/diaspora/diaspora/pull/7167)
 * Hide 'reshare' button on already reshared posts [#7169](https://github.com/diaspora/diaspora/pull/7169)
 * Only reload profile header when changing aspect memberships [#7183](https://github.com/diaspora/diaspora/pull/7183)
+* Fix visiblity on invitation modal when opening it from the stream [#7191](https://github.com/diaspora/diaspora/pull/7191)
 
 ## Features
 * Show spinner when loading comments in the stream [#7170](https://github.com/diaspora/diaspora/pull/7170)
diff --git a/app/views/shared/_invitations.haml b/app/views/shared/_invitations.haml
index 4c45deee73..2ddd9e6d94 100644
--- a/app/views/shared/_invitations.haml
+++ b/app/views/shared/_invitations.haml
@@ -3,7 +3,8 @@
 .invitations-link.btn.btn-link#invitations-button{"data-toggle" => "modal"}
   = t(".by_email")
 
-= render "shared/modal",
-    path: new_user_invitation_path,
-    id: "invitationsModal",
-    title: t("invitations.new.invite_someone_to_join")
+- content_for :after_content do
+  = render "shared/modal",
+      path: new_user_invitation_path,
+      id: "invitationsModal",
+      title: t("invitations.new.invite_someone_to_join")
diff --git a/features/desktop/invitations.feature b/features/desktop/invitations.feature
index 5aafd11dff..0e9e09a610 100644
--- a/features/desktop/invitations.feature
+++ b/features/desktop/invitations.feature
@@ -39,7 +39,7 @@ Feature: Invitations
     And I click on selector "#invitations-button"
     Then I should see one less invite
 
-  Scenario: sends an invitation
+  Scenario: sends an invitation from the sidebar
     When I sign in as "alice@alice.alice"
     And I click on "Invite your friends" navbar title
     And I click on selector "#invitations-button"
@@ -49,6 +49,15 @@ Feature: Invitations
     Then I should have 1 Devise email delivery
     And I should not see "change your notification settings" in the last sent email
 
+  Scenario: sends an invitation from the stream
+    When I sign in as "alice@alice.alice"
+    And I press the first "a.invitations-link" within "#no_contacts"
+    And I fill in the following:
+      | email_inviter_emails         | alex@example.com    |
+    And I press "Send an invitation"
+    Then I should have 1 Devise email delivery
+    And I should not see "change your notification settings" in the last sent email
+
   Scenario: sends an invitation from the people search page
     When I sign in as "alice@alice.alice"
     And I search for "test"
-- 
GitLab