From 5d8a0819e990d44ab4d406dac3b9cf0b42eb920e Mon Sep 17 00:00:00 2001 From: Jacques Crocker Date: Sat, 31 Jul 2010 00:44:34 -0700 Subject: [PATCH] Tweak features to use labels --- app/views/admin/pages/_form.html.haml | 1 + features/admin/login.feature | 8 ++++---- features/admin/pages.feature | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/views/admin/pages/_form.html.haml b/app/views/admin/pages/_form.html.haml index 90bab1d1..68e5d105 100644 --- a/app/views/admin/pages/_form.html.haml +++ b/app/views/admin/pages/_form.html.haml @@ -33,6 +33,7 @@ %ul{ :id => "parts" } = f.fields_for :parts do |g| %li{ :style => "#{'display: none' if g.object.disabled?}" } + = g.label :value, g.object.name, :style => "display:none" %code= g.text_area :value = g.hidden_field :name = g.hidden_field :slug diff --git a/features/admin/login.feature b/features/admin/login.feature index fd996ed1..a87d6373 100644 --- a/features/admin/login.feature +++ b/features/admin/login.feature @@ -6,14 +6,14 @@ Feature: Login Scenario: Successful authentication When 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" Then I should see "Listing pages" Scenario: Failed authentication When I go to login - And I fill in "admin_email" with "admin@locomotiveapp.org" - And I fill in "admin_password" with "" + And I fill in "Email" with "admin@locomotiveapp.org" + And I fill in "Password" with "" And I press "Log in" Then I should not see "Listing pages" \ No newline at end of file diff --git a/features/admin/pages.feature b/features/admin/pages.feature index c5dac1cd..be7dd1c5 100644 --- a/features/admin/pages.feature +++ b/features/admin/pages.feature @@ -16,7 +16,7 @@ Scenario: Creating a valid page And I fill in "Title" with "Test" And I fill in "Slug" with "test" And I select "Home page" from "Parent" - And I fill in "page_parts_attributes_0_value" with "Lorem ipsum...." + And I fill in "Body" with "Lorem ipsum...." And I press "Create" Then I should see "Page was successfully created." And I should have "Lorem ipsum...." in the test page layout @@ -25,7 +25,7 @@ Scenario: Updating a valid page When I go to pages And I follow "Home page" And I fill in "Title" with "Home page !" - And I fill in "page_parts_attributes_0_value" with "My new content is here" + 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