From 8193f2e3506808c9f5d3495d4a16dc7c6cfb380a Mon Sep 17 00:00:00 2001 From: Sarah Mei Date: Sun, 31 Oct 2010 20:05:15 -0700 Subject: [PATCH] Adding the rest of the new user setup to cucumber. wip scenario for skipping the profile wizard. --- features/signs_up.feature | 31 ++++++++++++++++++++++++++++++- features/support/paths.rb | 2 ++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/features/signs_up.feature b/features/signs_up.feature index 59d34f3fa..e64b066e7 100644 --- a/features/signs_up.feature +++ b/features/signs_up.feature @@ -1,10 +1,11 @@ +@javascript Feature: new user registration Scenario: new user sees profile wizard 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 @@ -16,4 +17,32 @@ Feature: new user registration 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!" + + @wip + Scenario: new user can skip the profile wizard + 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 "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!" + + When I follow "skip getting started" + Then I should be on the home page + And I should see "We know you have friends, bring them to Diaspora!" diff --git a/features/support/paths.rb b/features/support/paths.rb index 3d3f64724..9a08357a0 100644 --- a/features/support/paths.rb +++ b/features/support/paths.rb @@ -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$/