Add expand the publisher test

This commit is contained in:
flaburgan 2013-11-23 16:54:29 -08:00
parent 923a4f2ab4
commit 6aced29bb6
4 changed files with 15 additions and 2 deletions

View file

@ -27,7 +27,7 @@
#publisher-images
%span.markdownIndications
!= t('.formatWithMarkdown', link: link_to('markdown', 'https://diasporafoundation.org/formatting'))
!= t('.formatWithMarkdown', markdown_link: link_to(t('help.markdown'), 'https://diasporafoundation.org/formatting', target: :blank))
#locator.btn{:title => t('.get_location')}
= image_tag 'icons/marker.png', :alt => t('.get_location').titleize, :class => 'publisher_image'
#file-upload.btn{:title => t('.upload_photos')}

View file

@ -992,7 +992,7 @@ en:
one: "In %{count} aspect"
other: "In %{count} aspects"
publisher:
formatWithMarkdown: "You can use %{link} to format your post"
formatWithMarkdown: "You can use %{markdown_link} to format your post"
posting: "Posting..."
share: "Share"
preview: "Preview"

View file

@ -17,6 +17,14 @@ Feature: posting from the main page
And I have user with username "alice" in an aspect called "PostingTo"
And I have user with username "alice" in an aspect called "NotPostingThingsHere"
And I am on the home page
Scenario: expanding the publisher
Given ".markdownIndications" is hidden
And ".options_and_submit" is hidden
When I expand the publisher
Then I should see "You can use Markdown to format your post" within "#publisher-images"
Then I should see "All Aspects" within ".options_and_submit"
Then I should see "Preview" within ".options_and_submit"
Scenario: post a text-only message to all aspects
Given I expand the publisher

View file

@ -267,3 +267,8 @@ end
Then /^I should see the Bitcoin address$/ do
find("#bitcoin_address")['value'].should == "AAAAAA"
end
Given /^"([^"]*)" is hidden$/ do |selector|
page.should have_selector(selector, visible: false)
page.should_not have_selector(selector)
end