Merge branch 'master' of github.com:diaspora/diaspora
This commit is contained in:
commit
9a7e23b665
7 changed files with 44 additions and 26 deletions
2
Gemfile
2
Gemfile
|
|
@ -60,7 +60,7 @@ group :test do
|
|||
gem 'rspec-rails', '>= 2.0.0'
|
||||
gem 'mocha'
|
||||
gem 'database_cleaner', '0.5.2'
|
||||
gem 'webmock'
|
||||
gem 'webmock', :require => false
|
||||
gem 'jasmine', :path => 'vendor/gems/jasmine', :require => false
|
||||
gem 'mongrel', :require => false if RUBY_VERSION.include? "1.8"
|
||||
end
|
||||
|
|
|
|||
14
features/manages_aspects.feature
Normal file
14
features/manages_aspects.feature
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
@aspects @javascript
|
||||
Feature: User manages aspects
|
||||
In order to share with a limited group
|
||||
As a User
|
||||
I want to create new aspects
|
||||
|
||||
Scenario: creating an aspect
|
||||
Given I am signed in
|
||||
When I follow "Manage" in the header
|
||||
And I follow "Add a new aspect"
|
||||
And I fill in "Name" with "Dorm Mates" in the modal window
|
||||
And I press "Create" in the modal window
|
||||
Then I should see "Dorm Mates" in the header
|
||||
And I should see "Your aspect 'Dorm Mates' is empty."
|
||||
|
|
@ -1,19 +1,40 @@
|
|||
@javascript
|
||||
Feature: new user registration
|
||||
|
||||
Scenario: new user sees profile wizard
|
||||
Background:
|
||||
When I go to the new user registration page
|
||||
And I fill in "Username" with "ohai"
|
||||
And I fill in "Email" with "ohai@example.com"
|
||||
And I fill in "Password" with "secret"
|
||||
And I fill in "user_password" with "secret"
|
||||
And I fill in "Password confirmation" with "secret"
|
||||
And I press "Sign up"
|
||||
Then I should be on the getting started page
|
||||
And I should see "Welcome to Diaspora!"
|
||||
|
||||
Scenario: new user goes through the setup wizard
|
||||
When I fill in "person_profile_first_name" with "O"
|
||||
And I fill in "person_profile_last_name" with "Hai"
|
||||
And I press "Save and continue"
|
||||
Then I should see "Profile updated"
|
||||
And I should see "Your aspects"
|
||||
|
||||
# Not working with selenium - it thinks the aspect name field is hidden
|
||||
# When I fill in "Aspect name" with "cheez friends"
|
||||
# And I press "Add"
|
||||
# And show me the page
|
||||
# Then I should see "cheez friends"
|
||||
When I follow "Save and continue"
|
||||
Then I should see "Your services"
|
||||
|
||||
When I follow "Save and continue"
|
||||
Then I should see "You're all set up, O!"
|
||||
|
||||
When I follow "Continue on to your everyone page, an overview of all of your aspects."
|
||||
Then I should be on the home page
|
||||
And I should see "We know you have friends, bring them to Diaspora!"
|
||||
|
||||
Scenario: new user skips the setup wizard
|
||||
When I follow "skip getting started"
|
||||
And I wait for the home page to load
|
||||
Then I should be on the home page
|
||||
And I should see "We know you have friends, bring them to Diaspora!"
|
||||
|
|
|
|||
|
|
@ -20,4 +20,8 @@ Then /^I should see "([^\"]*)" in the main content area$/ do |stuff|
|
|||
within("#stream") do
|
||||
Then "I should see #{stuff}"
|
||||
end
|
||||
end
|
||||
|
||||
When /^I wait for the home page to load$/ do
|
||||
wait_until { current_path == root_path }
|
||||
end
|
||||
|
|
@ -22,8 +22,6 @@ require 'cucumber/rails/capybara_javascript_emulation' # Lets you click links wi
|
|||
# steps to use the XPath syntax.
|
||||
Capybara.default_selector = :css
|
||||
|
||||
WebMock.disable_net_connect!(:allow_localhost => true)
|
||||
|
||||
# If you set this to false, any error raised from within your app will bubble
|
||||
# up to your step definition and out to cucumber unless you catch it somewhere
|
||||
# on the way. You can make Rails rescue errors and render error pages on a
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
module NavigationHelpers
|
||||
def path_to(page_name)
|
||||
case page_name
|
||||
when /^the home page$/
|
||||
root_path
|
||||
when /^its ([\w ]+) page$/
|
||||
send("#{$1.gsub(/\W+/, '_')}_path", @it)
|
||||
when /^the ([\w ]+) page$/
|
||||
|
|
|
|||
|
|
@ -1,21 +0,0 @@
|
|||
@aspects @javascript
|
||||
Feature: User creates an aspect
|
||||
In order to share with a limited group
|
||||
As a User
|
||||
I want to create a new aspect
|
||||
|
||||
Background:
|
||||
Given I am signed in
|
||||
And I follow "Manage" in the header
|
||||
And I follow "Add a new aspect"
|
||||
|
||||
Scenario: success
|
||||
Given I fill in "Name" with "Dorm Mates" in the modal window
|
||||
When I press "Create" in the modal window
|
||||
Then I should see "Dorm Mates" in the header
|
||||
And I should see "Your aspect 'Dorm Mates' is empty."
|
||||
|
||||
Scenario: I omit the name
|
||||
Given I fill in "Name" with "" in the modal window
|
||||
When I press "Create" in the modal window
|
||||
Then I should see "Aspect creation failed."
|
||||
Loading…
Reference in a new issue