Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanielgrippi <danielgrippi@gmail.com>2011-12-08 06:40:39 +0400
committerdanielgrippi <danielgrippi@gmail.com>2011-12-08 06:40:39 +0400
commitf4c9b548f91af5f37973c2827f22275e3b9d56d2 (patch)
tree94594a45b4b801ca02abd701ec8bcc331bd7b019
parentf40ed9bb254628690fc158aeb97fec94e040d6b5 (diff)
update cucumber and capybara. one failing cuke.
-rw-r--r--Gemfile4
-rw-r--r--Gemfile.lock19
-rw-r--r--features/conversations.feature4
-rw-r--r--features/edits_profile.feature2
-rw-r--r--features/step_definitions/posts_steps.rb4
-rw-r--r--features/support/env.rb46
-rwxr-xr-xscript/cucumber10
7 files changed, 49 insertions, 40 deletions
diff --git a/Gemfile b/Gemfile
index cff264651..83e5b96e5 100644
--- a/Gemfile
+++ b/Gemfile
@@ -120,8 +120,8 @@ group :test, :development do
end
group :test do
- gem 'capybara', '~> 0.3.9'
- gem 'cucumber-rails', '0.3.2'
+ gem 'capybara', '~> 1.1.2'
+ gem 'cucumber-rails', '1.2.1'
gem 'cucumber-api-steps', '0.6', :require => false
gem 'database_cleaner', '0.7.0'
gem 'diaspora-client', :git => 'git://github.com/diaspora/diaspora-client.git'
diff --git a/Gemfile.lock b/Gemfile.lock
index fda3ca6fc..7af6a3675 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -100,13 +100,13 @@ GEM
capistrano-ext (1.2.1)
capistrano (>= 1.0.0)
capistrano_colors (0.5.5)
- capybara (0.3.9)
- culerity (>= 0.2.4)
+ capybara (1.1.2)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
- selenium-webdriver (>= 0.0.3)
+ selenium-webdriver (~> 2.0)
+ xpath (~> 0.1.4)
carrierwave (0.5.8)
activesupport (~> 3.0)
cgi_multipart_eof_fix (2.5.0)
@@ -140,9 +140,10 @@ GEM
cucumber-api-steps (0.6)
cucumber (>= 0.8.3)
jsonpath (>= 0.1.2)
- cucumber-rails (0.3.2)
- cucumber (>= 0.8.0)
- culerity (0.2.15)
+ cucumber-rails (1.2.1)
+ capybara (>= 1.1.2)
+ cucumber (>= 1.1.3)
+ nokogiri (>= 1.5.0)
daemons (1.1.4)
database_cleaner (0.7.0)
devise (1.3.4)
@@ -418,6 +419,8 @@ GEM
addressable (>= 2.2.2)
crack (>= 0.1.7)
will_paginate (3.0.pre2)
+ xpath (0.1.4)
+ nokogiri (~> 1.3)
yard (0.7.4)
yui-compressor (0.9.6)
POpen4 (>= 0.1.4)
@@ -434,13 +437,13 @@ DEPENDENCIES
capistrano (= 2.5.19)
capistrano-ext (= 1.2.1)
capistrano_colors
- capybara (~> 0.3.9)
+ capybara (~> 1.1.2)
carrierwave (= 0.5.8)
chef (= 0.9.12)
client_side_validations
cloudfiles (= 1.4.10)
cucumber-api-steps (= 0.6)
- cucumber-rails (= 0.3.2)
+ cucumber-rails (= 1.2.1)
database_cleaner (= 0.7.0)
devise (~> 1.3.1)
devise_invitable (= 0.5.0)
diff --git a/features/conversations.feature b/features/conversations.feature
index db3d5e2fc..7d8da195d 100644
--- a/features/conversations.feature
+++ b/features/conversations.feature
@@ -15,10 +15,10 @@ Feature: private messages
Then I should see "Greetings" within "#conversation_inbox"
And I should see "Greetings" within "#conversation_show"
And "Alice Awesome" should be part of active conversation
- And I should see "hello, alice!" within ".stream"
+ And I should see "hello, alice!" within ".stream_container"
When I sign in as "alice@alice.alice"
And I reply with "hey, how you doing?"
- Then I should see "hey, how you doing?" within ".stream"
+ Then I should see "hey, how you doing?" within ".stream_container"
Scenario: send an empty message
When I send a message with subject "Empty Greetings" and text " " to "Alice Awesome"
diff --git a/features/edits_profile.feature b/features/edits_profile.feature
index d225efd76..992caa997 100644
--- a/features/edits_profile.feature
+++ b/features/edits_profile.feature
@@ -39,5 +39,5 @@ Feature: editing your profile
Then I should be on my edit profile page
And I should see "Profile updated"
And the "profile_date_year" field should be filled with "1986"
- And the "profile_date_month" field should be filled with "November"
+ And the "profile_date_month" field should be filled with "11"
And the "profile_date_day" field should be filled with "30"
diff --git a/features/step_definitions/posts_steps.rb b/features/step_definitions/posts_steps.rb
index c6c9c80d5..2401c89d5 100644
--- a/features/step_definitions/posts_steps.rb
+++ b/features/step_definitions/posts_steps.rb
@@ -10,11 +10,11 @@ Then /^I should see an uploaded image within the photo drop zone$/ do
end
Then /^I should not see an uploaded image within the photo drop zone$/ do
- find("#photodropzone img").should be_nil
+ all("#photodropzone img").should be_empty
end
Then /^I should not see any posts in my stream$/ do
- find(".stream_element").should be_nil
+ all(".stream_element").should be_empty
end
Given /^"([^"]*)" has a public post with text "([^"]*)"$/ do |email, text|
diff --git a/features/support/env.rb b/features/support/env.rb
index 4a98d4715..3b50a0300 100644
--- a/features/support/env.rb
+++ b/features/support/env.rb
@@ -5,17 +5,12 @@
# files.
ENV["RAILS_ENV"] ||= "test"
-require File.expand_path(File.dirname(__FILE__) + '/../../config/environment') unless defined?(Rails)
-
-require 'cucumber/formatter/unicode' # Remove this line if you don't want Cucumber Unicode support
-require 'cucumber/rails/rspec'
-require 'cucumber/rails/world'
-require 'cucumber/web/tableish'
+require 'cucumber/rails'
require 'capybara/rails'
require 'capybara/cucumber'
require 'capybara/session'
-require 'cucumber/rails/capybara_javascript_emulation' # Lets you click links with onclick javascript handlers without using @culerity or @javascript
+#require 'cucumber/rails/capybara_javascript_emulation' # Lets you click links with onclick javascript handlers without using @culerity or @javascript
require 'cucumber/api_steps'
# Capybara defaults to XPath selectors rather than Webrat's default of CSS3. In
@@ -67,7 +62,8 @@ end
After do
AppConfig[:no_follow_diasporahq] = @no_follow_diaspora_hq_setting
if Capybara.current_session.driver.respond_to?(:browser)
- Capybara.current_session.driver.browser.manage.delete_all_cookies
+ Capybara.reset_sessions!
+ # Capybara.current_session.driver.browser.manage.delete_all_cookies
end
end
@@ -101,20 +97,20 @@ After('@localserver') do
CapybaraSettings.instance.restore
end
-class Capybara::Driver::Selenium < Capybara::Driver::Base
- class Node < Capybara::Node
- def [](name)
- node.attribute(name.to_s)
- rescue Selenium::WebDriver::Error::WebDriverError
- nil
- end
-
- def select(option)
- option_node = node.find_element(:xpath, ".//option[normalize-space(text())=#{Capybara::XPath.escape(option)}]") || node.find_element(:xpath, ".//option[contains(.,#{Capybara::XPath.escape(option)})]")
- option_node.click
- rescue
- options = node.find_elements(:xpath, "//option").map { |o| "'#{o.text}'" }.join(', ')
- raise Capybara::OptionNotFound, "No such option '#{option}' in this select box. Available options: #{options}"
- end
- end
-end
+# class Capybara::Driver::Selenium < Capybara::Driver::Base
+# class Node < Capybara::Node
+# def [](name)
+# node.attribute(name.to_s)
+# rescue Selenium::WebDriver::Error::WebDriverError
+# nil
+# end
+
+# def select(option)
+# option_node = node.find_element(:xpath, ".//option[normalize-space(text())=#{Capybara::XPath.escape(option)}]") || node.find_element(:xpath, ".//option[contains(.,#{Capybara::XPath.escape(option)})]")
+# option_node.click
+# rescue
+# options = node.find_elements(:xpath, "//option").map { |o| "'#{o.text}'" }.join(', ')
+# raise Capybara::OptionNotFound, "No such option '#{option}' in this select box. Available options: #{options}"
+# end
+# end
+# end
diff --git a/script/cucumber b/script/cucumber
new file mode 100755
index 000000000..7fa5c9208
--- /dev/null
+++ b/script/cucumber
@@ -0,0 +1,10 @@
+#!/usr/bin/env ruby
+
+vendored_cucumber_bin = Dir["#{File.dirname(__FILE__)}/../vendor/{gems,plugins}/cucumber*/bin/cucumber"].first
+if vendored_cucumber_bin
+ load File.expand_path(vendored_cucumber_bin)
+else
+ require 'rubygems' unless ENV['NO_RUBYGEMS']
+ require 'cucumber'
+ load Cucumber::BINARY
+end