Fix cucumber features
This commit is contained in:
parent
7c59a5b4bd
commit
636242283b
3 changed files with 18 additions and 6 deletions
|
|
@ -23,8 +23,8 @@ class Profile < ActiveRecord::Base
|
|||
|
||||
validates_length_of :first_name, :maximum => 32
|
||||
validates_length_of :last_name, :maximum => 32
|
||||
validates_format_of :first_name, :with => /\A[^;]+\z/
|
||||
validates_format_of :last_name, :with => /\A[^;]+\z/
|
||||
validates_format_of :first_name, :with => /\A[^;]+\z/, :allow_nil => true
|
||||
validates_format_of :last_name, :with => /\A[^;]+\z/, :allow_nil => true
|
||||
|
||||
attr_accessible :first_name, :last_name, :image_url, :image_url_medium,
|
||||
:image_url_small, :birthday, :gender, :bio, :searchable, :date
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ Feature: posting
|
|||
I want to tell the world I am eating a yogurt
|
||||
|
||||
Scenario: post to all aspects
|
||||
Given that I am a rock star
|
||||
And I have no open aspects saved
|
||||
Given I am signed in
|
||||
And I have an aspect called "Family"
|
||||
And I am on the home page
|
||||
|
|
@ -12,33 +14,39 @@ Feature: posting
|
|||
When I fill in "status_message_fake_message" with "I am eating a yogurt"
|
||||
And I press "Share"
|
||||
|
||||
And I am on the home page
|
||||
And I follow "Home"
|
||||
Then I should see "I am eating a yogurt" within ".stream_element"
|
||||
|
||||
Scenario: delete a post
|
||||
Given that I am a rock star
|
||||
And I have no open aspects saved
|
||||
Given I am signed in
|
||||
And I have an aspect called "Family"
|
||||
And I am on the home page
|
||||
And I expand the publisher
|
||||
When I fill in "status_message_fake_message" with "I am eating a yogurt"
|
||||
And I press "Share"
|
||||
And I am on the home page
|
||||
And I follow "Home"
|
||||
And I hover over the post
|
||||
And I preemptively confirm the alert
|
||||
And I press the first ".delete" within ".stream_element"
|
||||
And I am on the home page
|
||||
And I follow "Home"
|
||||
Then I should not see "I am eating a yogurt"
|
||||
|
||||
|
||||
Scenario Outline: post to one aspect
|
||||
Given I have no open aspects saved
|
||||
Given that I am a rock star
|
||||
And I have no open aspects saved
|
||||
Given I am signed in
|
||||
And I have an aspect called "PostTo"
|
||||
And I have an aspect called "DidntPostTo"
|
||||
And I am on the home page
|
||||
When I follow "PostTo"
|
||||
And I wait for the ajax to finish
|
||||
And I expand the publisher
|
||||
And I fill in "status_message_fake_message" with "I am eating a yogurt"
|
||||
And I press "Share"
|
||||
And I follow "Home"
|
||||
And I follow "<aspect>"
|
||||
Then I should <see> "I am eating a yogurt"
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@ Given /^a user with username "([^\"]*)" and password "([^\"]*)"$/ do |username,
|
|||
@me.aspects.create(:name => "Besties")
|
||||
end
|
||||
|
||||
Given /^that I am a rock star$/ do
|
||||
Given('a user with username "awesome" and password "totallyawesome"')
|
||||
end
|
||||
|
||||
Given /^a user with email "([^\"]*)"$/ do |email|
|
||||
user = Factory(:user, :email => email, :password => 'password',
|
||||
:password_confirmation => 'password', :getting_started => false)
|
||||
|
|
|
|||
Loading…
Reference in a new issue