diff --git a/features/backoffice/pages.feature b/features/backoffice/pages.feature index 0f976fb6..ad5ae4ca 100644 --- a/features/backoffice/pages.feature +++ b/features/backoffice/pages.feature @@ -10,19 +10,21 @@ Background: Scenario: Pages list is not accessible for non authenticated accounts Given I am not authenticated When I go to pages - Then I should see "Log in" + Then I should see "You need to sign in or sign up before continuing" +@javascript Scenario: Creating a valid page When I go to pages And I follow "new page" And I fill in "page_title" with "Test" And I fill in "Slug" with "test" And I select "Home page" from "Parent" - And I fill in "Raw template" 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 + And I should have "{% extends 'parent' %}" in the test page +@wip +@javascript Scenario: Updating a valid page When I go to pages And I follow "Home page" diff --git a/features/backoffice/site.feature b/features/backoffice/site.feature index a702df45..a4e0c068 100644 --- a/features/backoffice/site.feature +++ b/features/backoffice/site.feature @@ -10,7 +10,7 @@ Background: Scenario: Site settings are not accessible for non authenticated accounts Given I am not authenticated When I go to the site settings - Then I should see "Log in" + Then I should see "You need to sign in or sign up before continuing" Scenario: Add a new site Given I go to the account settings diff --git a/features/backoffice/snippets.feature b/features/backoffice/snippets.feature index 39bf1593..5b99d185 100644 --- a/features/backoffice/snippets.feature +++ b/features/backoffice/snippets.feature @@ -15,7 +15,6 @@ Background: "yield" """ - Scenario: Creating a Snippet When I go to theme assets And I follow "new snippet" diff --git a/features/step_definitions/backoffice_steps.rb b/features/step_definitions/backoffice_steps.rb index 9daecbec..821d83d2 100644 --- a/features/step_definitions/backoffice_steps.rb +++ b/features/step_definitions/backoffice_steps.rb @@ -1,7 +1,7 @@ ### Authentication Given /^I am not authenticated$/ do - visit('/admin/sign_out') + visit('/locomotive/sign_out') end Given /^I am an authenticated "([^"]*)"$/ do |role| diff --git a/features/support/paths.rb b/features/support/paths.rb index e80ab484..71315e77 100644 --- a/features/support/paths.rb +++ b/features/support/paths.rb @@ -17,27 +17,27 @@ module NavigationHelpers when /logout/ destroy_locomotive_account_session_url when /pages( list)?/ - locomotive_pages_path + pages_path when /new page/ - new_locomotive_page_path + new_page_path when /"(.*)" edition page/ page = Site.first.pages.where(:slug => $1).first - edit_locomotive_page_path(page) + edit_page_path(page) when /theme assets/ - locomotive_theme_assets_path + theme_assets_path when /site settings/ - edit_locomotive_current_site_path + edit_current_site_path when /account settings/ - edit_locomotive_my_account_path + edit_my_account_path when /the "(.*)" model list page/ content_type = Locomotive::Site.first.content_types.where(:name => $1).first - locomotive_contents_path(content_type.slug) + content_entries_path(content_type.slug) when /the "(.*)" model creation page/ content_type = Locomotive::Site.first.content_types.where(:name => $1).first - new_locomotive_content_path(content_type.slug) + new_content_entry_path(content_type.slug) when /the "(.*)" model edition page/ content_type = Locomotive::Site.first.content_types.where(:name => $1).first - edit_locomotive_content_type_path(content_type) + edit_content_entries_path(content_type) # Add more mappings here. # Here is an example that pulls values out of the Regexp: