fixing cucumber tests (wip)
This commit is contained in:
parent
085a54d7c1
commit
4269a00985
@ -10,19 +10,21 @@ Background:
|
|||||||
Scenario: Pages list is not accessible for non authenticated accounts
|
Scenario: Pages list is not accessible for non authenticated accounts
|
||||||
Given I am not authenticated
|
Given I am not authenticated
|
||||||
When I go to pages
|
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
|
Scenario: Creating a valid page
|
||||||
When I go to pages
|
When I go to pages
|
||||||
And I follow "new page"
|
And I follow "new page"
|
||||||
And I fill in "page_title" with "Test"
|
And I fill in "page_title" with "Test"
|
||||||
And I fill in "Slug" with "test"
|
And I fill in "Slug" with "test"
|
||||||
And I select "Home page" from "Parent"
|
And I select "Home page" from "Parent"
|
||||||
And I fill in "Raw template" with "Lorem ipsum...."
|
|
||||||
And I press "Create"
|
And I press "Create"
|
||||||
Then I should see "Page was successfully created."
|
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
|
Scenario: Updating a valid page
|
||||||
When I go to pages
|
When I go to pages
|
||||||
And I follow "Home page"
|
And I follow "Home page"
|
||||||
|
@ -10,7 +10,7 @@ Background:
|
|||||||
Scenario: Site settings are not accessible for non authenticated accounts
|
Scenario: Site settings are not accessible for non authenticated accounts
|
||||||
Given I am not authenticated
|
Given I am not authenticated
|
||||||
When I go to the site settings
|
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
|
Scenario: Add a new site
|
||||||
Given I go to the account settings
|
Given I go to the account settings
|
||||||
|
@ -15,7 +15,6 @@ Background:
|
|||||||
"yield"
|
"yield"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
Scenario: Creating a Snippet
|
Scenario: Creating a Snippet
|
||||||
When I go to theme assets
|
When I go to theme assets
|
||||||
And I follow "new snippet"
|
And I follow "new snippet"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
### Authentication
|
### Authentication
|
||||||
|
|
||||||
Given /^I am not authenticated$/ do
|
Given /^I am not authenticated$/ do
|
||||||
visit('/admin/sign_out')
|
visit('/locomotive/sign_out')
|
||||||
end
|
end
|
||||||
|
|
||||||
Given /^I am an authenticated "([^"]*)"$/ do |role|
|
Given /^I am an authenticated "([^"]*)"$/ do |role|
|
||||||
|
@ -17,27 +17,27 @@ module NavigationHelpers
|
|||||||
when /logout/
|
when /logout/
|
||||||
destroy_locomotive_account_session_url
|
destroy_locomotive_account_session_url
|
||||||
when /pages( list)?/
|
when /pages( list)?/
|
||||||
locomotive_pages_path
|
pages_path
|
||||||
when /new page/
|
when /new page/
|
||||||
new_locomotive_page_path
|
new_page_path
|
||||||
when /"(.*)" edition page/
|
when /"(.*)" edition page/
|
||||||
page = Site.first.pages.where(:slug => $1).first
|
page = Site.first.pages.where(:slug => $1).first
|
||||||
edit_locomotive_page_path(page)
|
edit_page_path(page)
|
||||||
when /theme assets/
|
when /theme assets/
|
||||||
locomotive_theme_assets_path
|
theme_assets_path
|
||||||
when /site settings/
|
when /site settings/
|
||||||
edit_locomotive_current_site_path
|
edit_current_site_path
|
||||||
when /account settings/
|
when /account settings/
|
||||||
edit_locomotive_my_account_path
|
edit_my_account_path
|
||||||
when /the "(.*)" model list page/
|
when /the "(.*)" model list page/
|
||||||
content_type = Locomotive::Site.first.content_types.where(:name => $1).first
|
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/
|
when /the "(.*)" model creation page/
|
||||||
content_type = Locomotive::Site.first.content_types.where(:name => $1).first
|
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/
|
when /the "(.*)" model edition page/
|
||||||
content_type = Locomotive::Site.first.content_types.where(:name => $1).first
|
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.
|
# Add more mappings here.
|
||||||
# Here is an example that pulls values out of the Regexp:
|
# Here is an example that pulls values out of the Regexp:
|
||||||
|
Loading…
Reference in New Issue
Block a user