From 0607be09ab7c57537ab1228a57a11137f9f0d893 Mon Sep 17 00:00:00 2001 From: Jacques Crocker Date: Sat, 31 Jul 2010 01:27:21 -0700 Subject: [PATCH] Remove broken envjs and tweak cucumber environment --- Gemfile | 5 ++++- Gemfile.lock | 9 --------- doc/feature_list.txt | 4 ++-- features/admin/pages.feature | 2 +- features/step_definitions/admin_steps.rb | 4 ++-- features/support/env.rb | 9 ++++++--- 6 files changed, 15 insertions(+), 18 deletions(-) diff --git a/Gemfile b/Gemfile index b83f41a3..36f55b19 100644 --- a/Gemfile +++ b/Gemfile @@ -47,7 +47,10 @@ group :test do gem "pickle", :git => "http://github.com/codegram/pickle.git" gem "pickle-mongoid" gem 'capybara' - gem "capybara-envjs", ">= 0.1.5" + + # would be nice.. + # gem "capybara-envjs" + gem 'database_cleaner' gem 'cucumber' gem 'cucumber-rails' diff --git a/Gemfile.lock b/Gemfile.lock index d694b033..a718cbe5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -90,9 +90,6 @@ GEM rack (>= 1.0.0) rack-test (>= 0.5.4) selenium-webdriver (>= 0.0.3) - capybara-envjs (0.1.6) - capybara (>= 0.3.9) - envjs (>= 0.3.7) carrierwave (0.5.0.beta2) activesupport (>= 3.0.0.beta4) cgi_multipart_eof_fix (2.5.0) @@ -111,8 +108,6 @@ GEM daemons (1.1.0) database_cleaner (0.5.2) diff-lcs (1.1.2) - envjs (0.3.7) - johnson (>= 2.0.0.pre3) erubis (2.6.6) abstract (>= 1.0.0) factory_girl (1.3.1) @@ -145,8 +140,6 @@ GEM gemcutter (>= 0.1.0) git (>= 1.2.5) rubyforge (>= 2.0.0) - johnson (2.0.0.pre3) - stackdeck (~> 0.2) json_pure (1.4.3) launchy (0.3.7) configuration (>= 0.0.5) @@ -223,7 +216,6 @@ GEM json_pure rubyzip spork (0.8.4) - stackdeck (0.2.0) term-ansicolor (1.0.5) thor (0.14.0) treetop (1.4.8) @@ -250,7 +242,6 @@ DEPENDENCIES aws bson_ext (>= 1.0.1) capybara - capybara-envjs (>= 0.1.5) carrierwave (= 0.5.0.beta2) cgi_multipart_eof_fix cucumber diff --git a/doc/feature_list.txt b/doc/feature_list.txt index 9ecf9fe3..62c2fd86 100644 --- a/doc/feature_list.txt +++ b/doc/feature_list.txt @@ -3,11 +3,11 @@ General Cucumbering Strategy: Admin Pages Contents Pages - - Create a Page + - Create a Page (DONE) - Create a Sub Page - Create another Sub Page - Move Sub Pages around (use Selenium for this) - - Edit a Page + - Edit a Page (DONE) - Delete a Page Models - Create a New Model diff --git a/features/admin/pages.feature b/features/admin/pages.feature index be7dd1c5..264fce9c 100644 --- a/features/admin/pages.feature +++ b/features/admin/pages.feature @@ -28,4 +28,4 @@ Scenario: Updating a valid page And I fill in "Body" with "My new content is here" And I press "Update" Then I should see "Page was successfully updated." - And I should have "My new content is here" in the index page layout \ No newline at end of file + And I should have "My new content is here" in the index page layout diff --git a/features/step_definitions/admin_steps.rb b/features/step_definitions/admin_steps.rb index 01d53e3e..49681659 100644 --- a/features/step_definitions/admin_steps.rb +++ b/features/step_definitions/admin_steps.rb @@ -20,8 +20,8 @@ end Given /^I am an authenticated user$/ do Given %{I go to login} - And %{I fill in "admin_email" with "admin@locomotiveapp.org"} - And %{I fill in "admin_password" with "easyone"} + And %{I fill in "Email" with "admin@locomotiveapp.org"} + And %{I fill in "Password" with "easyone"} And %{I press "Log in"} end diff --git a/features/support/env.rb b/features/support/env.rb index cca05079..57773bbf 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -16,14 +16,16 @@ require 'capybara/rails' require 'capybara/cucumber' require 'capybara/session' -require 'capybara/envjs' +# envjs doesnt work at the moment +# require 'capybara/envjs' # Capybara defaults to XPath selectors rather than Webrat's default of CSS3. In # order to ease the transition to Capybara we set the default here. If you'd # prefer to use XPath just remove this line and adjust any selectors in your # steps to use the XPath syntax. Capybara.default_selector = :css -Capybara.javascript_driver = :envjs + +Capybara.javascript_driver = :selenium # 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 @@ -40,4 +42,5 @@ Locomotive.configure do |config| config.default_domain = 'example.com' end -Capybara.default_host = 'test.example.com' \ No newline at end of file +Capybara.default_host = 'test.example.com' +# Capybara.app_host = 'http://test.example.com' \ No newline at end of file