From b8bb7ae85796acea35658678e7f9058b87a9486b Mon Sep 17 00:00:00 2001 From: flaburgan Date: Mon, 6 Jan 2014 23:46:59 +0100 Subject: [PATCH] Fix tests --- app/assets/stylesheets/mobile.css.scss | 2 +- app/views/layouts/application.mobile.haml | 4 ++-- features/mobile/activity_stream.feature | 6 ++++-- features/mobile/multiphoto.feature | 2 +- features/step_definitions/mobile_steps.rb | 4 ++++ 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/app/assets/stylesheets/mobile.css.scss b/app/assets/stylesheets/mobile.css.scss index c34d95846..25e49d629 100644 --- a/app/assets/stylesheets/mobile.css.scss +++ b/app/assets/stylesheets/mobile.css.scss @@ -125,7 +125,7 @@ h3 { border-bottom: solid rgb(53, 53, 53) 2px; } - #aspects_list { + .no_border { padding: 0px; border-bottom: 0px; diff --git a/app/views/layouts/application.mobile.haml b/app/views/layouts/application.mobile.haml index 49301b526..4b4ac86f5 100644 --- a/app/views/layouts/application.mobile.haml +++ b/app/views/layouts/application.mobile.haml @@ -67,7 +67,7 @@ - if yield(:header_action).present? = yield(:header_action) - else - = link_to(image_tag('icons/compose_mobile.png'), new_status_message_path, class: "badge") + = link_to(image_tag('icons/compose_mobile.png'), new_status_message_path, class: "badge", id: "compose_badge") -# Menu = link_to(image_tag('icons/menu.png'), "#", id: "menu_badge", class: "badge") @@ -99,7 +99,7 @@ = link_to t("streams.mentions.title"), mentioned_stream_path %li = t('streams.aspects.title') - %li#aspects_list + %li.no_border %ul - for aspect in current_user.aspects %li diff --git a/features/mobile/activity_stream.feature b/features/mobile/activity_stream.feature index 2881e5bfc..f8771d906 100644 --- a/features/mobile/activity_stream.feature +++ b/features/mobile/activity_stream.feature @@ -11,12 +11,14 @@ Feature: Viewing my activity on the steam mobile page And I toggle the mobile view Scenario: Show my activity empty - When I click on selector "img.my_activity" + When I open the drawer + And I follow "My Activity" Then I should see "My Activity" And I should not see "Hello! i am #newhere" Scenario: Show post on my activity When I click on selector "a.image_link.like_action.inactive" - And I click on selector "img.my_activity" + And I open the drawer + And I follow "My Activity" Then I should see "My Activity" And I should see "Hello! i am #newhere" within ".ltr" diff --git a/features/mobile/multiphoto.feature b/features/mobile/multiphoto.feature index a5a6f9229..324f88737 100644 --- a/features/mobile/multiphoto.feature +++ b/features/mobile/multiphoto.feature @@ -9,7 +9,7 @@ Feature: viewing photos on the mobile main page When I sign in as "bob@bob.bob" And I toggle the mobile view - And I click on selector "img.compose_icon" + And I click on selector "#compose_badge" Scenario: view full size image Given I attach the file "spec/fixtures/button.png" to hidden "file" within "#file-upload-publisher" diff --git a/features/step_definitions/mobile_steps.rb b/features/step_definitions/mobile_steps.rb index 6a84785e1..e6ba3938c 100644 --- a/features/step_definitions/mobile_steps.rb +++ b/features/step_definitions/mobile_steps.rb @@ -25,3 +25,7 @@ end When /^I visit the mobile search page$/ do visit('/people.mobile') end + +When /^I open the drawer$/ do + find('#menu_badge').click +end