From 5ff085affff8f1528e5b6e88df98a281a7fa0344 Mon Sep 17 00:00:00 2001
From: Flaburgan <flaburgan@geexxx.fr>
Date: Tue, 8 Mar 2016 17:18:01 +0100
Subject: [PATCH] Fix tests

---
 app/assets/stylesheets/single-post-view.scss | 8 ++++++--
 features/desktop/donations.feature           | 2 ++
 features/desktop/invitations.feature         | 2 ++
 features/step_definitions/stream_steps.rb    | 6 ++++++
 4 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/app/assets/stylesheets/single-post-view.scss b/app/assets/stylesheets/single-post-view.scss
index 03767b997e..e0cb2894e2 100644
--- a/app/assets/stylesheets/single-post-view.scss
+++ b/app/assets/stylesheets/single-post-view.scss
@@ -4,9 +4,8 @@
 
 #single-post-content {
   .head {
-    padding-bottom: 10px;
-    padding-top: 5px;
     border-bottom: 1px solid $border-grey;
+    padding: 10px 0;
     #post-info {
       .author{ color: $grey; }
       .info {
@@ -108,6 +107,11 @@
 }
 
 #single-post-interactions {
+
+  > .framed-content {
+    padding-top: 10px;
+  }
+
   .no-comments { text-align: center; }
 
   a {
diff --git a/features/desktop/donations.feature b/features/desktop/donations.feature
index 9bf0b28180..0985ff132c 100644
--- a/features/desktop/donations.feature
+++ b/features/desktop/donations.feature
@@ -13,4 +13,6 @@ Feature: donations
   Scenario: Bitcoin donations
     Given I have configured a Bitcoin address
     And I go to the home page
+    Then I should see "Donate" within ".info-bar"
+    And I click on "Donate" navbar title
     Then I should see the Bitcoin address
diff --git a/features/desktop/invitations.feature b/features/desktop/invitations.feature
index 74ce102fc2..76ce989028 100644
--- a/features/desktop/invitations.feature
+++ b/features/desktop/invitations.feature
@@ -37,11 +37,13 @@ Feature: Invitations
     And I close the publisher
     And I log out
     And I sign in as "alice@alice.alice"
+    And I click on "Invite your friends" navbar title
     And I click on selector "#invitations-button"
     Then I should see one less invite
 
   Scenario: sends an invitation
     When I sign in as "alice@alice.alice"
+    And I click on "Invite your friends" navbar title
     And I click on selector "#invitations-button"
     And I fill in the following:
       | email_inviter_emails         | alex@example.com    |
diff --git a/features/step_definitions/stream_steps.rb b/features/step_definitions/stream_steps.rb
index 830d9de827..22c285439c 100644
--- a/features/step_definitions/stream_steps.rb
+++ b/features/step_definitions/stream_steps.rb
@@ -21,3 +21,9 @@ end
 Then /^I should have (\d+) nsfw posts$/ do |num_posts|
   page.should have_css(".nsfw-shield", count: num_posts.to_i)
 end
+
+When /^(?:|I )click on "([^"]*)" navbar title$/ do |title|
+  with_scope(".info-bar") do
+    find("h5", text: title).click
+  end
+end
-- 
GitLab