locomotivecms 3.0.0.rc3 → 3.0.0.rc4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +3 -3
- data/README.md +1 -1
- data/app/assets/stylesheets/locomotive/unauthorized/_public.scss +7 -4
- data/app/controllers/locomotive/errors_controller.rb +4 -0
- data/app/helpers/locomotive/errors_helper.rb +2 -4
- data/app/models/locomotive/concerns/content_entry/csv.rb +4 -0
- data/app/models/locomotive/concerns/content_entry/slug.rb +0 -2
- data/app/models/locomotive/concerns/content_type/sync.rb +2 -2
- data/app/models/locomotive/concerns/page/templatized.rb +1 -1
- data/app/models/locomotive/concerns/site/access_points.rb +3 -3
- data/app/models/locomotive/theme_asset.rb +0 -1
- data/app/views/locomotive/developers_documentation/_wagon.html.slim +2 -2
- data/app/views/locomotive/devise_mailer/reset_password_instructions.html.slim +1 -0
- data/app/views/locomotive/errors/no_site.json +1 -0
- data/app/views/locomotive/shared/_sidebar.html.slim +1 -1
- data/app/views/locomotive/shared/_sidebar_without_site.html.slim +1 -1
- data/app/views/locomotive/shared/header/_account_menu.html.slim +2 -2
- data/config/locales/en.yml +1 -1
- data/config/routes.rb +4 -2
- data/lib/generators/locomotive/install/install_generator.rb +9 -9
- data/lib/generators/locomotive/install/templates/carrierwave.rb +23 -12
- data/lib/generators/locomotive/install/templates/carrierwave_aws.rb +36 -0
- data/lib/generators/locomotive/install/templates/mongoid.yml +97 -35
- data/lib/locomotive/dependencies.rb +1 -1
- data/lib/locomotive/middlewares/site.rb +10 -4
- data/lib/locomotive/mongoid/patches.rb +1 -1
- data/lib/locomotive/steam_adaptor.rb +6 -4
- data/lib/locomotive/version.rb +1 -1
- data/spec/dummy/config/application.rb +0 -3
- data/spec/dummy/config/initializers/devise.rb +128 -58
- data/spec/dummy/config/mongoid.yml +95 -78
- data/spec/models/locomotive/content_entry_spec.rb +6 -6
- data/spec/requests/locomotive/steam/cache_spec.rb +1 -1
- data/spec/requests/site_spec.rb +25 -0
- data/spec/support/mongoid.rb +2 -0
- metadata +16 -189
- data/features/api/accounts.feature +0 -43
- data/features/api/authentication.feature +0 -41
- data/features/api/authorization/accounts.feature +0 -165
- data/features/api/authorization/content_assets.feature +0 -147
- data/features/api/authorization/content_entries.feature +0 -202
- data/features/api/authorization/content_types.feature +0 -237
- data/features/api/authorization/current_site.feature +0 -30
- data/features/api/authorization/memberships.feature +0 -225
- data/features/api/authorization/pages.feature +0 -189
- data/features/api/authorization/sites.feature +0 -212
- data/features/api/authorization/snippets.feature +0 -179
- data/features/api/authorization/theme_assets.feature +0 -185
- data/features/api/authorization/translations.feature +0 -253
- data/features/api/content_entries.feature +0 -184
- data/features/api/content_types.feature +0 -156
- data/features/api/editable_elements.feature +0 -190
- data/features/api/entries_custom_fields.feature +0 -150
- data/features/api/memberships.feature +0 -26
- data/features/api/pages.feature +0 -72
- data/features/backoffice/authorization/account_settings.feature +0 -28
- data/features/backoffice/authorization/content_type.feature +0 -35
- data/features/backoffice/authorization/current_site.feature +0 -53
- data/features/backoffice/authorization/inline_front_end_editing.feature +0 -46
- data/features/backoffice/authorization/pages.feature +0 -95
- data/features/backoffice/authorization/theme_assets.feature +0 -50
- data/features/backoffice/content_types/edit.feature +0 -20
- data/features/backoffice/content_types/email.feature +0 -26
- data/features/backoffice/content_types/has_many.feature +0 -80
- data/features/backoffice/content_types/integer.feature +0 -26
- data/features/backoffice/content_types/localized.feature +0 -63
- data/features/backoffice/content_types/many_to_many.feature +0 -70
- data/features/backoffice/content_types/tags.feature +0 -22
- data/features/backoffice/content_types/uniqueness.feature +0 -29
- data/features/backoffice/contents.feature +0 -93
- data/features/backoffice/editable_elements.feature +0 -22
- data/features/backoffice/installation.feature +0 -33
- data/features/backoffice/login.feature +0 -33
- data/features/backoffice/mounting.feature +0 -13
- data/features/backoffice/my_account.feature +0 -22
- data/features/backoffice/pages.feature +0 -73
- data/features/backoffice/regressions.feature +0 -19
- data/features/backoffice/site.feature +0 -71
- data/features/backoffice/snippets.feature +0 -39
- data/features/backoffice/theme_assets.feature +0 -72
- data/features/backoffice/translations.feature +0 -50
- data/features/public/basic.feature +0 -30
- data/features/public/contact_form.feature +0 -98
- data/features/public/content_entries.feature +0 -69
- data/features/public/editable_elements.feature +0 -138
- data/features/public/has_many.feature +0 -8
- data/features/public/inheritance.feature +0 -157
- data/features/public/inline_front_end_editing.feature +0 -26
- data/features/public/many_to_many.feature +0 -64
- data/features/public/new_contact_form.feature +0 -95
- data/features/public/pages.feature +0 -116
- data/features/public/pagination.feature +0 -8
- data/features/public/robots.feature +0 -22
- data/features/public/session.feature +0 -40
- data/features/public/sitemap.feature +0 -74
- data/features/public/snippets.feature +0 -21
- data/features/public/tablerow.feature +0 -42
- data/features/public/tags.feature +0 -45
- data/features/step_definitions/api_steps.rb +0 -179
- data/features/step_definitions/backoffice/mounting_steps.rb +0 -22
- data/features/step_definitions/backoffice_steps.rb +0 -47
- data/features/step_definitions/content_assets_steps.rb +0 -12
- data/features/step_definitions/content_types_steps.rb +0 -135
- data/features/step_definitions/current_site_steps.rb +0 -43
- data/features/step_definitions/editable_elements_steps.rb +0 -24
- data/features/step_definitions/membership_steps.rb +0 -19
- data/features/step_definitions/more_web_steps.rb +0 -131
- data/features/step_definitions/page_steps.rb +0 -133
- data/features/step_definitions/pagination_steps.rb +0 -35
- data/features/step_definitions/pickle_steps.rb +0 -100
- data/features/step_definitions/relationships_steps.rb +0 -110
- data/features/step_definitions/site_steps.rb +0 -111
- data/features/step_definitions/snippet_steps.rb +0 -37
- data/features/step_definitions/theme_asset_steps.rb +0 -64
- data/features/step_definitions/translation_steps.rb +0 -7
- data/features/step_definitions/web_steps.rb +0 -225
- data/features/step_definitions/within_steps.rb +0 -14
- data/features/support/cleaner.rb +0 -4
- data/features/support/env.rb +0 -82
- data/features/support/factory_girl.rb +0 -2
- data/features/support/http.rb +0 -22
- data/features/support/locales.rb +0 -5
- data/features/support/paths.rb +0 -62
- data/features/support/pickle.rb +0 -24
- data/features/support/selectors.rb +0 -57
@@ -1,26 +0,0 @@
|
|
1
|
-
Feature: Memberships
|
2
|
-
In order to manage memberships programmatically
|
3
|
-
As an API user
|
4
|
-
I will be able to create and update memberships
|
5
|
-
|
6
|
-
Background:
|
7
|
-
Given I have the site: "test site" set up with id: "4f832c2cb0d86d3f42fffffb"
|
8
|
-
And I have accounts:
|
9
|
-
| email | id |
|
10
|
-
| new-user@a.com | 4f832c2cb0d86d3f42fffffc |
|
11
|
-
|
12
|
-
Scenario: Create membership by account email
|
13
|
-
Given I have an "admin" API token
|
14
|
-
When I do an API POST to memberships.json with:
|
15
|
-
"""
|
16
|
-
{
|
17
|
-
"membership": {
|
18
|
-
"site_id": "4f832c2cb0d86d3f42fffffb",
|
19
|
-
"email": "new-user@a.com"
|
20
|
-
}
|
21
|
-
}
|
22
|
-
"""
|
23
|
-
When I do an API GET request to memberships.json
|
24
|
-
Then the JSON response should be an array
|
25
|
-
And the JSON response should have 2 entries
|
26
|
-
And the JSON response at "1/account_id" should be "4f832c2cb0d86d3f42fffffc"
|
data/features/api/pages.feature
DELETED
@@ -1,72 +0,0 @@
|
|
1
|
-
Feature: Pages
|
2
|
-
In order to access the Page resources
|
3
|
-
As an admin
|
4
|
-
I will perform the basic RESTFUL actions on them
|
5
|
-
|
6
|
-
Background:
|
7
|
-
Given I have the site: "test site" set up
|
8
|
-
And I have an "admin" API token
|
9
|
-
And a page named "hello world" with the template:
|
10
|
-
"""
|
11
|
-
Hello world :-)
|
12
|
-
"""
|
13
|
-
And a page named "goodbye-world" with the template:
|
14
|
-
"""
|
15
|
-
Goodbye world :-(
|
16
|
-
"""
|
17
|
-
And I have a custom model named "Projects" with id "4f832c2cb0d86d3f42fffffe" and
|
18
|
-
| label | type | required |
|
19
|
-
| Name | string | true |
|
20
|
-
| Description | text | false |
|
21
|
-
|
22
|
-
Scenario: Protect the pages resources if not authenticated
|
23
|
-
Given I do not have an API token
|
24
|
-
When I visit "/locomotive/api/pages.json"
|
25
|
-
Then the JSON response at "error" should be "You need to sign in or sign up before continuing."
|
26
|
-
|
27
|
-
Scenario: Accessing pages
|
28
|
-
When I visit "/locomotive/api/pages.json"
|
29
|
-
Then the JSON should have the following:
|
30
|
-
| 0/fullpath | "index" |
|
31
|
-
| 1/fullpath | "hello-world" |
|
32
|
-
| 2/fullpath | "404" |
|
33
|
-
| 3/fullpath | "goodbye-world" |
|
34
|
-
|
35
|
-
Scenario: Creating templatized page
|
36
|
-
# "target_entry_name": "projects",
|
37
|
-
When I do an API POST to pages.json with:
|
38
|
-
"""
|
39
|
-
{
|
40
|
-
"page": {
|
41
|
-
"title": "My Templatized Page",
|
42
|
-
"templatized": "true",
|
43
|
-
"templatized_from_parent": "false",
|
44
|
-
"target_klass_slug": "projects",
|
45
|
-
"parent_fullpath": "index"
|
46
|
-
}
|
47
|
-
}
|
48
|
-
"""
|
49
|
-
When I do an API GET request to pages.json
|
50
|
-
Then the JSON response should be an array
|
51
|
-
And the JSON response should have 5 entries
|
52
|
-
And the JSON response at "4/title" should be "My Templatized Page"
|
53
|
-
And the JSON response at "4/target_klass_slug" should be "projects"
|
54
|
-
|
55
|
-
Scenario: Saving page SEO data
|
56
|
-
Given a page named "yet another page" with id "4f832c2cb0d86d3f42fffffe"
|
57
|
-
And I have an "admin" API token
|
58
|
-
When I do an API PUT to pages/4f832c2cb0d86d3f42fffffe.json with:
|
59
|
-
"""
|
60
|
-
{
|
61
|
-
"page": {
|
62
|
-
"seo_title": "Awesome SEO title",
|
63
|
-
"meta_keywords": "keywords,more_keywords,",
|
64
|
-
"meta_description": "It is awesome"
|
65
|
-
}
|
66
|
-
}
|
67
|
-
"""
|
68
|
-
When I do an API GET request to pages/4f832c2cb0d86d3f42fffffe.json
|
69
|
-
Then the JSON response should have the following:
|
70
|
-
| seo_title | "Awesome SEO title" |
|
71
|
-
| meta_keywords | "keywords,more_keywords," |
|
72
|
-
| meta_description | "It is awesome" |
|
@@ -1,28 +0,0 @@
|
|
1
|
-
Feature: Account Settings
|
2
|
-
In order to ensure sites are not tampered with
|
3
|
-
As an admin, designer or author
|
4
|
-
I will be restricted based on my role
|
5
|
-
|
6
|
-
Background:
|
7
|
-
Given I have the site: "test site" set up
|
8
|
-
And I have a designer and an author
|
9
|
-
|
10
|
-
Scenario: As an unauthenticated user
|
11
|
-
Given I am not authenticated
|
12
|
-
When I go to account settings
|
13
|
-
Then I should see "Log in"
|
14
|
-
|
15
|
-
Scenario: Accessing site settings as an Admin
|
16
|
-
Given I am an authenticated "admin"
|
17
|
-
When I go to account settings
|
18
|
-
Then I should see "new site"
|
19
|
-
|
20
|
-
Scenario: Accessing site settings as a Designer
|
21
|
-
Given I am an authenticated "designer"
|
22
|
-
When I go to account settings
|
23
|
-
Then I should not see "new site"
|
24
|
-
|
25
|
-
Scenario: Accessing site settings as an Author
|
26
|
-
Given I am an authenticated "author"
|
27
|
-
When I go to account settings
|
28
|
-
Then I should not see "new site"
|
@@ -1,35 +0,0 @@
|
|
1
|
-
Feature: Editing a content type
|
2
|
-
In order to edit a content type
|
3
|
-
As an admin, designer, or author
|
4
|
-
I will be restricted based on my role
|
5
|
-
|
6
|
-
Background:
|
7
|
-
Given I have the site: "test site" set up
|
8
|
-
And I have a custom model named "Projects" with
|
9
|
-
| label | type | required |
|
10
|
-
| Name | string | true |
|
11
|
-
| Description | text | false |
|
12
|
-
And I have a designer and an author
|
13
|
-
|
14
|
-
Scenario: As an unauthenticated user
|
15
|
-
Given I am not authenticated
|
16
|
-
When I go to the "Projects" model edition page
|
17
|
-
Then I should see "Log in"
|
18
|
-
|
19
|
-
Scenario: Accessing edition functionality as an Admin
|
20
|
-
Given I am an authenticated "admin"
|
21
|
-
When I go to the "Projects" model edition page
|
22
|
-
Then I should see "Editing model"
|
23
|
-
And I should see "Custom fields"
|
24
|
-
|
25
|
-
Scenario: Accessing edition functionality as a Designer
|
26
|
-
Given I am an authenticated "designer"
|
27
|
-
When I go to the "Projects" model edition page
|
28
|
-
Then I should see "Editing model"
|
29
|
-
And I should see "Custom fields"
|
30
|
-
|
31
|
-
Scenario: Accessing edition functionality as an Author
|
32
|
-
Given I am an authenticated "author"
|
33
|
-
When I go to the "Projects" model edition page
|
34
|
-
Then I should be on the pages list
|
35
|
-
And I should see the access denied message
|
@@ -1,53 +0,0 @@
|
|
1
|
-
Feature: Site Settings
|
2
|
-
In order to ensure site settings are not tampered with
|
3
|
-
As an admin, designer or author
|
4
|
-
I will be restricted based on my role
|
5
|
-
|
6
|
-
Background:
|
7
|
-
Given I have the site: "test site" set up
|
8
|
-
And I have a designer and an author
|
9
|
-
|
10
|
-
Scenario: As an unauthenticated user
|
11
|
-
Given I am not authenticated
|
12
|
-
When I go to site settings
|
13
|
-
Then I should see "Log in"
|
14
|
-
|
15
|
-
@javascript
|
16
|
-
Scenario: Accessing site settings as an Admin
|
17
|
-
Given I am an authenticated "admin"
|
18
|
-
When I go to site settings
|
19
|
-
Then I should see "add account"
|
20
|
-
And I should see "SEO settings"
|
21
|
-
And I should see "Access points"
|
22
|
-
And I should not see the role dropdown on myself
|
23
|
-
And I should see the role dropdown on the "designer"
|
24
|
-
And I should see the role dropdown on the "author"
|
25
|
-
And I should not see delete on myself
|
26
|
-
And I should see delete on the "designer"
|
27
|
-
And I should see delete on the "author"
|
28
|
-
|
29
|
-
@javascript
|
30
|
-
Scenario: Accessing site settings as a Designer
|
31
|
-
Given I am an authenticated "designer"
|
32
|
-
When I go to site settings
|
33
|
-
Then I should not see "add account"
|
34
|
-
And I should see "SEO settings"
|
35
|
-
And I should see "Access points"
|
36
|
-
And I should not see the role dropdown on myself
|
37
|
-
And I should not see the role dropdown on the "admin"
|
38
|
-
And I should see the role dropdown on the "author" without the "Administrator" option
|
39
|
-
And I should not see delete on the "admin"
|
40
|
-
And I should not see delete on myself
|
41
|
-
And I should see delete on the "author"
|
42
|
-
|
43
|
-
@javascript
|
44
|
-
Scenario: Accessing site settings as an Author
|
45
|
-
Given I am an authenticated "author"
|
46
|
-
When I go to site settings
|
47
|
-
Then I should not see "add account"
|
48
|
-
And I should see "SEO settings"
|
49
|
-
And I should not see "Access points"
|
50
|
-
And I should not see "Accounts"
|
51
|
-
# Paranoid Checks
|
52
|
-
And I should not see any role dropdowns
|
53
|
-
And I should not see any delete buttons
|
@@ -1,46 +0,0 @@
|
|
1
|
-
@javascript
|
2
|
-
Feature: Inline frontend editing
|
3
|
-
In order to ensure site content is not tampered with
|
4
|
-
As an admin, designer or author
|
5
|
-
I will be restricted based on my role
|
6
|
-
|
7
|
-
Background:
|
8
|
-
Given I have the site: "test site" set up
|
9
|
-
And I have a designer and an author
|
10
|
-
Given a page named "about" with the template:
|
11
|
-
"""
|
12
|
-
<html>
|
13
|
-
<head>{% inline_editor %}</head>
|
14
|
-
<body>Page Content</body>
|
15
|
-
</html>
|
16
|
-
"""
|
17
|
-
|
18
|
-
Scenario: As an unauthenticated user
|
19
|
-
Given I am not authenticated
|
20
|
-
When I view the rendered page at "/about"
|
21
|
-
Then I should not see "Admin"
|
22
|
-
When I view the rendered page at "/about/_admin"
|
23
|
-
Then I should not see "Editing mode"
|
24
|
-
And I should see "Log in"
|
25
|
-
|
26
|
-
Scenario: Inline editing as an Admin
|
27
|
-
Given I am an authenticated "admin"
|
28
|
-
When I view the rendered page at "/about"
|
29
|
-
Then I should see "Admin"
|
30
|
-
When I view the rendered page at "/about/_admin"
|
31
|
-
Then I should see "Editing mode"
|
32
|
-
|
33
|
-
@javascript
|
34
|
-
Scenario: Inline editing as a Designer
|
35
|
-
Given I am an authenticated "designer"
|
36
|
-
When I view the rendered page at "/about"
|
37
|
-
Then I should see "Admin"
|
38
|
-
When I view the rendered page at "/about/_admin"
|
39
|
-
Then I should see "Editing mode"
|
40
|
-
|
41
|
-
Scenario: Inline editing as an Author
|
42
|
-
Given I am an authenticated "author"
|
43
|
-
When I view the rendered page at "/about"
|
44
|
-
Then I should see "Admin"
|
45
|
-
When I view the rendered page at "/about/_admin"
|
46
|
-
Then I should see "Editing mode"
|
@@ -1,95 +0,0 @@
|
|
1
|
-
Feature: Pages
|
2
|
-
In order to ensure pages are not tampered with
|
3
|
-
As an admin, designer or author
|
4
|
-
I will be restricted based on my role
|
5
|
-
|
6
|
-
Background:
|
7
|
-
Given I have the site: "test site" set up
|
8
|
-
And I have a custom model named "Projects" with
|
9
|
-
| label | type | required |
|
10
|
-
| Name | string | true |
|
11
|
-
| Description | text | false |
|
12
|
-
And I have a designer and an author
|
13
|
-
And a page named "hello-world" with the template:
|
14
|
-
"""
|
15
|
-
Hello World
|
16
|
-
"""
|
17
|
-
|
18
|
-
Scenario: As an unauthenticated user
|
19
|
-
Given I am not authenticated
|
20
|
-
When I go to pages
|
21
|
-
Then I should see "Log in"
|
22
|
-
|
23
|
-
# listing pages
|
24
|
-
|
25
|
-
Scenario: Accessing pages as an Admin
|
26
|
-
Given I am an authenticated "admin"
|
27
|
-
When I go to pages
|
28
|
-
Then I should see "new page"
|
29
|
-
And I should see delete page buttons
|
30
|
-
And I should see "new model"
|
31
|
-
And I should see "Projects"
|
32
|
-
|
33
|
-
Scenario: Accessing pages as a Designer
|
34
|
-
Given I am an authenticated "designer"
|
35
|
-
When I go to pages
|
36
|
-
Then I should see "new page"
|
37
|
-
And I should see delete page buttons
|
38
|
-
And I should see "new model"
|
39
|
-
And I should see "Projects"
|
40
|
-
|
41
|
-
Scenario: Accessing pages as an Author
|
42
|
-
Given I am an authenticated "author"
|
43
|
-
When I go to pages
|
44
|
-
Then I should see "new page"
|
45
|
-
And I should not see delete page buttons
|
46
|
-
And I should not see "new model"
|
47
|
-
And I should see "Projects"
|
48
|
-
|
49
|
-
# new page
|
50
|
-
|
51
|
-
Scenario: Accessing new page as an Admin
|
52
|
-
Given I am an authenticated "admin"
|
53
|
-
When I go to the new page
|
54
|
-
Then I should see "New page"
|
55
|
-
|
56
|
-
Scenario: Accessing new page as a Designer
|
57
|
-
Given I am an authenticated "designer"
|
58
|
-
When I go to the new page
|
59
|
-
Then I should see "New page"
|
60
|
-
|
61
|
-
Scenario: Accessing new page as an Author
|
62
|
-
Given I am an authenticated "author"
|
63
|
-
When I go to the new page
|
64
|
-
Then I should see "New page"
|
65
|
-
And I should not see "Template"
|
66
|
-
|
67
|
-
# edit page
|
68
|
-
|
69
|
-
Scenario: Accessing edit page as an Admin
|
70
|
-
Given I am an authenticated "admin"
|
71
|
-
When I go to the "hello-world" edition page
|
72
|
-
Then I should see "Hello world"
|
73
|
-
And I should see "General information"
|
74
|
-
And I should see "SEO settings"
|
75
|
-
And I should see "Advanced options"
|
76
|
-
And I should see "Template"
|
77
|
-
|
78
|
-
Scenario: Accessing edit page as a Designer
|
79
|
-
Given I am an authenticated "designer"
|
80
|
-
When I go to the "hello-world" edition page
|
81
|
-
Then I should see "Hello world"
|
82
|
-
And I should see "General information"
|
83
|
-
And I should see "SEO settings"
|
84
|
-
And I should see "Advanced options"
|
85
|
-
And I should see "Template"
|
86
|
-
|
87
|
-
Scenario: Accessing edit page as an Author
|
88
|
-
Given I am an authenticated "author"
|
89
|
-
When I go to the "hello-world" edition page
|
90
|
-
Then I should see "Hello world"
|
91
|
-
And I should not see "General Information"
|
92
|
-
And I should see "SEO settings"
|
93
|
-
And I should see "Advanced options"
|
94
|
-
And I should not see "Template"
|
95
|
-
|
@@ -1,50 +0,0 @@
|
|
1
|
-
Feature: Theme Assets
|
2
|
-
In order to ensure theme assets are not tampered with
|
3
|
-
As an admin, designer or author
|
4
|
-
I will be restricted based on my role
|
5
|
-
|
6
|
-
Background:
|
7
|
-
Given I have the site: "test site" set up
|
8
|
-
And I have a designer and an author
|
9
|
-
And I have an image theme asset named "dog.png"
|
10
|
-
|
11
|
-
Scenario: As an unauthenticated user
|
12
|
-
Given I am not authenticated
|
13
|
-
When I go to theme assets
|
14
|
-
Then I should see "Log in"
|
15
|
-
|
16
|
-
@javascript
|
17
|
-
Scenario: Accessing theme assets as an Admin
|
18
|
-
Given I am an authenticated "admin"
|
19
|
-
When I go to theme assets
|
20
|
-
Then I should see "new snippet"
|
21
|
-
And I should see "new file"
|
22
|
-
And I should see "Snippets"
|
23
|
-
And I should see "Style and javascript"
|
24
|
-
And I should see "Images"
|
25
|
-
And I should see "dog.png"
|
26
|
-
And I should see a delete link
|
27
|
-
|
28
|
-
@javascript
|
29
|
-
Scenario: Accessing theme assets as a Designer
|
30
|
-
Given I am an authenticated "designer"
|
31
|
-
When I go to theme assets
|
32
|
-
Then I should see "new snippet"
|
33
|
-
And I should see "new file"
|
34
|
-
And I should see "Snippets"
|
35
|
-
And I should see "Style and javascript"
|
36
|
-
And I should see "Images"
|
37
|
-
And I should see "dog.png"
|
38
|
-
And I should see a delete link
|
39
|
-
|
40
|
-
@javascript
|
41
|
-
Scenario: Accessing theme assets as an Author
|
42
|
-
Given I am an authenticated "author"
|
43
|
-
When I go to theme assets
|
44
|
-
Then I should not see "new snippet"
|
45
|
-
And I should not see "new file"
|
46
|
-
And I should not see "Snippets"
|
47
|
-
And I should not see "Style and javascript"
|
48
|
-
And I should see "Images"
|
49
|
-
And I should see "dog.png"
|
50
|
-
And I should not see a delete link
|
@@ -1,20 +0,0 @@
|
|
1
|
-
Feature: Edit the different properties of a content type
|
2
|
-
|
3
|
-
Background:
|
4
|
-
Given I have the site: "test site" set up
|
5
|
-
And I have a custom model named "Projects" with
|
6
|
-
| label | type | required | target |
|
7
|
-
| Name | string | true | |
|
8
|
-
| Description | text | false | |
|
9
|
-
And I have entries for "Projects" with
|
10
|
-
| name | description |
|
11
|
-
| Fun project | Description for the fun one |
|
12
|
-
| Boring project | Description for the boring one |
|
13
|
-
And I am an authenticated user
|
14
|
-
|
15
|
-
@javascript
|
16
|
-
Scenario: I remove all notified accounts
|
17
|
-
Given I enable the public submission of the "Projects" model
|
18
|
-
When I go to the "Projects" model edition page
|
19
|
-
And I unselect the notified accounts
|
20
|
-
Then there should not be any notified accounts on the "Projects" model
|
@@ -1,26 +0,0 @@
|
|
1
|
-
Feature: Email fields
|
2
|
-
As an editor
|
3
|
-
In order to validate my data
|
4
|
-
I want to be able to create email fields
|
5
|
-
|
6
|
-
Background:
|
7
|
-
Given I have the site: "test site" set up
|
8
|
-
And I have a custom model named "Members" with
|
9
|
-
| label | type | required |
|
10
|
-
| Name | string | true |
|
11
|
-
| e-mail | email | true |
|
12
|
-
|
13
|
-
And I am an authenticated user
|
14
|
-
|
15
|
-
@javascript
|
16
|
-
Scenario:
|
17
|
-
And I go to the list of "Members"
|
18
|
-
And I follow "new entry" within the main content
|
19
|
-
And I fill in "Name" with "John Doe"
|
20
|
-
And I fill in "e-mail" with "fake"
|
21
|
-
And I press "Create"
|
22
|
-
Then I should see "Entry was not created."
|
23
|
-
|
24
|
-
When I fill in "e-mail" with "john@doe.com"
|
25
|
-
And I press "Create"
|
26
|
-
Then I should see "Entry was successfully created."
|
@@ -1,80 +0,0 @@
|
|
1
|
-
Feature: Create and manage has many relationships
|
2
|
-
In order to work with two associated models together
|
3
|
-
As an administrator
|
4
|
-
I want to set up and manage a has many relationship
|
5
|
-
|
6
|
-
Background:
|
7
|
-
Given I have the site: "test site" set up
|
8
|
-
And I have a custom model named "Clients" with
|
9
|
-
| label | type | required | target |
|
10
|
-
| Name | string | true | |
|
11
|
-
| Description | string | false | |
|
12
|
-
And I have a custom model named "Projects" with
|
13
|
-
| label | type | required | target |
|
14
|
-
| Name | string | true | |
|
15
|
-
| Description | text | false | |
|
16
|
-
| Client | belongs_to | false | Clients |
|
17
|
-
And I set up a has_many relationship between "Clients" and "Projects"
|
18
|
-
And I have entries for "Clients" with
|
19
|
-
| name | description |
|
20
|
-
| Alpha, Inc | Description for Alpha, Inc |
|
21
|
-
| Beta, Inc | Description for Beta, Inc |
|
22
|
-
| Gamma, Inc | Description for Gamma, Inc |
|
23
|
-
And I have entries for "Projects" with
|
24
|
-
| name | description |
|
25
|
-
| Fun project | Description for the fun one |
|
26
|
-
| Boring project | Description for the boring one |
|
27
|
-
|
28
|
-
And I am an authenticated user
|
29
|
-
|
30
|
-
@javascript
|
31
|
-
Scenario: I view a client without any projects
|
32
|
-
When I go to the list of "Clients"
|
33
|
-
And I choose "Alpha, Inc" in the list
|
34
|
-
Then I should see "The list is empty" within the list of entries
|
35
|
-
|
36
|
-
@javascript
|
37
|
-
Scenario: I add a project to a client
|
38
|
-
When I go to the list of "Projects"
|
39
|
-
And I choose "Fun project" in the list
|
40
|
-
And I select2 "Alpha, Inc" from "content_entry_client_id"
|
41
|
-
And I press "Save"
|
42
|
-
Then I should see "Entry was successfully updated."
|
43
|
-
When I go to the list of "Clients"
|
44
|
-
And I choose "Alpha, Inc" in the list
|
45
|
-
Then I should see "Fun project" within the list of entries
|
46
|
-
|
47
|
-
@javascript
|
48
|
-
Scenario: I add a project to a client from the client page
|
49
|
-
When I go to the list of "Clients"
|
50
|
-
And I choose "Beta, Inc" in the list
|
51
|
-
And I follow "+ Add a new entry"
|
52
|
-
Then I should see "Projects — new entry"
|
53
|
-
When I press "Create" within the dialog popup
|
54
|
-
Then I should see "Entry was not created."
|
55
|
-
When I fill in "Name" with "Project X" within the dialog popup
|
56
|
-
And I fill in "Description" with "Lorem ipsum" within the dialog popup
|
57
|
-
And I press "Create" within the dialog popup
|
58
|
-
Then I should see "Entry was successfully created."
|
59
|
-
And I should see "Project X" within the list of entries
|
60
|
-
And "p.empty" should not be visible within the list of entries
|
61
|
-
|
62
|
-
Scenario: with_scope with label value
|
63
|
-
Given the "client" "Alpha, Inc" has "Fun project" as one of its "projects"
|
64
|
-
And a page named "alpha-projects" with the template:
|
65
|
-
"""
|
66
|
-
<hr>
|
67
|
-
{% with_scope client: "Alpha, Inc" %}
|
68
|
-
{% for project in contents.projects %}- {{ project.name }}<br>{% endfor %}
|
69
|
-
{% endwith_scope %}
|
70
|
-
<hr>
|
71
|
-
"""
|
72
|
-
When I view the rendered page at "/alpha-projects"
|
73
|
-
Then the rendered output should look like:
|
74
|
-
"""
|
75
|
-
<hr>
|
76
|
-
|
77
|
-
- Fun project<br>
|
78
|
-
|
79
|
-
<hr>
|
80
|
-
"""
|
@@ -1,26 +0,0 @@
|
|
1
|
-
Feature: Integer fields
|
2
|
-
As an editor
|
3
|
-
In order to validate my data
|
4
|
-
I want to be able to set fields to integers
|
5
|
-
|
6
|
-
Background:
|
7
|
-
Given I have the site: "test site" set up
|
8
|
-
And I have a custom model named "ToDos" with
|
9
|
-
| label | type | required |
|
10
|
-
| Task | string | true |
|
11
|
-
| Priority | integer | true |
|
12
|
-
|
13
|
-
And I am an authenticated user
|
14
|
-
|
15
|
-
@javascript
|
16
|
-
Scenario:
|
17
|
-
And I go to the list of "ToDos"
|
18
|
-
And I follow "new entry" within the main content
|
19
|
-
And I fill in "Task" with "Buy milk"
|
20
|
-
And I fill in "Priority" with "one"
|
21
|
-
And I press "Create"
|
22
|
-
Then I should see "Entry was not created."
|
23
|
-
|
24
|
-
When I fill in "Priority" with "1"
|
25
|
-
And I press "Create"
|
26
|
-
Then I should see "Entry was successfully created."
|
@@ -1,63 +0,0 @@
|
|
1
|
-
Feature: Localized Content Entries
|
2
|
-
As an editor
|
3
|
-
In order to manage translations of custom content entries
|
4
|
-
I want to edit localized fields of custom contents of my site
|
5
|
-
|
6
|
-
Background:
|
7
|
-
Given I have the site: "test site" set up with name: "test site"
|
8
|
-
And the site "test site" has locales "en, de"
|
9
|
-
And I have a custom model named "Proverbs" with
|
10
|
-
| label | type | required | localized |
|
11
|
-
| Proverb | string | true | true |
|
12
|
-
| Author | string | false | false |
|
13
|
-
And I have entries for "Proverbs" with
|
14
|
-
| proverb | author |
|
15
|
-
| Jump on the bandwagon | John |
|
16
|
-
And I am an authenticated user
|
17
|
-
|
18
|
-
Scenario: See original entry in list
|
19
|
-
When I go to the list of "Proverbs"
|
20
|
-
Then I should see "Jump on the bandwagon"
|
21
|
-
And I should not see "untranslated"
|
22
|
-
|
23
|
-
@javascript
|
24
|
-
Scenario: See untranslated entry in list
|
25
|
-
When I switch the locale to "de"
|
26
|
-
And I go to the list of "Proverbs"
|
27
|
-
Then I should see "Jump on the bandwagon"
|
28
|
-
And I should see "untranslated"
|
29
|
-
|
30
|
-
Scenario: See original entry details
|
31
|
-
When I go to the list of "Proverbs"
|
32
|
-
And I follow "Jump on the bandwagon" within the main content
|
33
|
-
Then the "Proverb" field should contain "Jump on the bandwagon"
|
34
|
-
And the "Author" field should contain "John"
|
35
|
-
|
36
|
-
@javascript
|
37
|
-
Scenario: See untranslated entry details
|
38
|
-
When I switch the locale to "de"
|
39
|
-
And I go to the list of "Proverbs"
|
40
|
-
And I follow "Jump on the bandwagon" within the main content
|
41
|
-
Then the "Proverb" field should contain "Jump on the bandwagon"
|
42
|
-
And the "Author" field should contain "John"
|
43
|
-
|
44
|
-
@javascript
|
45
|
-
Scenario: Translate entry
|
46
|
-
When I switch the locale to "de"
|
47
|
-
And I go to the list of "Proverbs"
|
48
|
-
And I follow "Jump on the bandwagon" within the main content
|
49
|
-
|
50
|
-
When I fill in "Proverb" with "Auf einen fahrenden Zug aufspringen"
|
51
|
-
And I press "Save" within the main form
|
52
|
-
Then I should see "Entry was successfully updated."
|
53
|
-
|
54
|
-
When I go to the list of "Proverbs"
|
55
|
-
Then I should see "Auf einen fahrenden Zug aufspringen"
|
56
|
-
And I should not see "Jump on the bandwagon"
|
57
|
-
And I should not see "untranslated"
|
58
|
-
|
59
|
-
When I switch the locale to "en"
|
60
|
-
And I go to the list of "Proverbs"
|
61
|
-
Then I should not see "Auf einen fahrenden Zug aufspringen"
|
62
|
-
And I should see "Jump on the bandwagon"
|
63
|
-
And I should not see "untranslated"
|