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.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +3 -3
  3. data/README.md +1 -1
  4. data/app/assets/stylesheets/locomotive/unauthorized/_public.scss +7 -4
  5. data/app/controllers/locomotive/errors_controller.rb +4 -0
  6. data/app/helpers/locomotive/errors_helper.rb +2 -4
  7. data/app/models/locomotive/concerns/content_entry/csv.rb +4 -0
  8. data/app/models/locomotive/concerns/content_entry/slug.rb +0 -2
  9. data/app/models/locomotive/concerns/content_type/sync.rb +2 -2
  10. data/app/models/locomotive/concerns/page/templatized.rb +1 -1
  11. data/app/models/locomotive/concerns/site/access_points.rb +3 -3
  12. data/app/models/locomotive/theme_asset.rb +0 -1
  13. data/app/views/locomotive/developers_documentation/_wagon.html.slim +2 -2
  14. data/app/views/locomotive/devise_mailer/reset_password_instructions.html.slim +1 -0
  15. data/app/views/locomotive/errors/no_site.json +1 -0
  16. data/app/views/locomotive/shared/_sidebar.html.slim +1 -1
  17. data/app/views/locomotive/shared/_sidebar_without_site.html.slim +1 -1
  18. data/app/views/locomotive/shared/header/_account_menu.html.slim +2 -2
  19. data/config/locales/en.yml +1 -1
  20. data/config/routes.rb +4 -2
  21. data/lib/generators/locomotive/install/install_generator.rb +9 -9
  22. data/lib/generators/locomotive/install/templates/carrierwave.rb +23 -12
  23. data/lib/generators/locomotive/install/templates/carrierwave_aws.rb +36 -0
  24. data/lib/generators/locomotive/install/templates/mongoid.yml +97 -35
  25. data/lib/locomotive/dependencies.rb +1 -1
  26. data/lib/locomotive/middlewares/site.rb +10 -4
  27. data/lib/locomotive/mongoid/patches.rb +1 -1
  28. data/lib/locomotive/steam_adaptor.rb +6 -4
  29. data/lib/locomotive/version.rb +1 -1
  30. data/spec/dummy/config/application.rb +0 -3
  31. data/spec/dummy/config/initializers/devise.rb +128 -58
  32. data/spec/dummy/config/mongoid.yml +95 -78
  33. data/spec/models/locomotive/content_entry_spec.rb +6 -6
  34. data/spec/requests/locomotive/steam/cache_spec.rb +1 -1
  35. data/spec/requests/site_spec.rb +25 -0
  36. data/spec/support/mongoid.rb +2 -0
  37. metadata +16 -189
  38. data/features/api/accounts.feature +0 -43
  39. data/features/api/authentication.feature +0 -41
  40. data/features/api/authorization/accounts.feature +0 -165
  41. data/features/api/authorization/content_assets.feature +0 -147
  42. data/features/api/authorization/content_entries.feature +0 -202
  43. data/features/api/authorization/content_types.feature +0 -237
  44. data/features/api/authorization/current_site.feature +0 -30
  45. data/features/api/authorization/memberships.feature +0 -225
  46. data/features/api/authorization/pages.feature +0 -189
  47. data/features/api/authorization/sites.feature +0 -212
  48. data/features/api/authorization/snippets.feature +0 -179
  49. data/features/api/authorization/theme_assets.feature +0 -185
  50. data/features/api/authorization/translations.feature +0 -253
  51. data/features/api/content_entries.feature +0 -184
  52. data/features/api/content_types.feature +0 -156
  53. data/features/api/editable_elements.feature +0 -190
  54. data/features/api/entries_custom_fields.feature +0 -150
  55. data/features/api/memberships.feature +0 -26
  56. data/features/api/pages.feature +0 -72
  57. data/features/backoffice/authorization/account_settings.feature +0 -28
  58. data/features/backoffice/authorization/content_type.feature +0 -35
  59. data/features/backoffice/authorization/current_site.feature +0 -53
  60. data/features/backoffice/authorization/inline_front_end_editing.feature +0 -46
  61. data/features/backoffice/authorization/pages.feature +0 -95
  62. data/features/backoffice/authorization/theme_assets.feature +0 -50
  63. data/features/backoffice/content_types/edit.feature +0 -20
  64. data/features/backoffice/content_types/email.feature +0 -26
  65. data/features/backoffice/content_types/has_many.feature +0 -80
  66. data/features/backoffice/content_types/integer.feature +0 -26
  67. data/features/backoffice/content_types/localized.feature +0 -63
  68. data/features/backoffice/content_types/many_to_many.feature +0 -70
  69. data/features/backoffice/content_types/tags.feature +0 -22
  70. data/features/backoffice/content_types/uniqueness.feature +0 -29
  71. data/features/backoffice/contents.feature +0 -93
  72. data/features/backoffice/editable_elements.feature +0 -22
  73. data/features/backoffice/installation.feature +0 -33
  74. data/features/backoffice/login.feature +0 -33
  75. data/features/backoffice/mounting.feature +0 -13
  76. data/features/backoffice/my_account.feature +0 -22
  77. data/features/backoffice/pages.feature +0 -73
  78. data/features/backoffice/regressions.feature +0 -19
  79. data/features/backoffice/site.feature +0 -71
  80. data/features/backoffice/snippets.feature +0 -39
  81. data/features/backoffice/theme_assets.feature +0 -72
  82. data/features/backoffice/translations.feature +0 -50
  83. data/features/public/basic.feature +0 -30
  84. data/features/public/contact_form.feature +0 -98
  85. data/features/public/content_entries.feature +0 -69
  86. data/features/public/editable_elements.feature +0 -138
  87. data/features/public/has_many.feature +0 -8
  88. data/features/public/inheritance.feature +0 -157
  89. data/features/public/inline_front_end_editing.feature +0 -26
  90. data/features/public/many_to_many.feature +0 -64
  91. data/features/public/new_contact_form.feature +0 -95
  92. data/features/public/pages.feature +0 -116
  93. data/features/public/pagination.feature +0 -8
  94. data/features/public/robots.feature +0 -22
  95. data/features/public/session.feature +0 -40
  96. data/features/public/sitemap.feature +0 -74
  97. data/features/public/snippets.feature +0 -21
  98. data/features/public/tablerow.feature +0 -42
  99. data/features/public/tags.feature +0 -45
  100. data/features/step_definitions/api_steps.rb +0 -179
  101. data/features/step_definitions/backoffice/mounting_steps.rb +0 -22
  102. data/features/step_definitions/backoffice_steps.rb +0 -47
  103. data/features/step_definitions/content_assets_steps.rb +0 -12
  104. data/features/step_definitions/content_types_steps.rb +0 -135
  105. data/features/step_definitions/current_site_steps.rb +0 -43
  106. data/features/step_definitions/editable_elements_steps.rb +0 -24
  107. data/features/step_definitions/membership_steps.rb +0 -19
  108. data/features/step_definitions/more_web_steps.rb +0 -131
  109. data/features/step_definitions/page_steps.rb +0 -133
  110. data/features/step_definitions/pagination_steps.rb +0 -35
  111. data/features/step_definitions/pickle_steps.rb +0 -100
  112. data/features/step_definitions/relationships_steps.rb +0 -110
  113. data/features/step_definitions/site_steps.rb +0 -111
  114. data/features/step_definitions/snippet_steps.rb +0 -37
  115. data/features/step_definitions/theme_asset_steps.rb +0 -64
  116. data/features/step_definitions/translation_steps.rb +0 -7
  117. data/features/step_definitions/web_steps.rb +0 -225
  118. data/features/step_definitions/within_steps.rb +0 -14
  119. data/features/support/cleaner.rb +0 -4
  120. data/features/support/env.rb +0 -82
  121. data/features/support/factory_girl.rb +0 -2
  122. data/features/support/http.rb +0 -22
  123. data/features/support/locales.rb +0 -5
  124. data/features/support/paths.rb +0 -62
  125. data/features/support/pickle.rb +0 -24
  126. data/features/support/selectors.rb +0 -57
@@ -1,70 +0,0 @@
1
- Feature: Set up a many to many relationship
2
- In order to have a N:N relationship between 2 content types
3
- As an administrator
4
- I want to set up a many to many relationship
5
-
6
- Background:
7
- Given I have the site: "test site" set up
8
- And I have a custom model named "Articles" with
9
- | label | type | required |
10
- | Title | string | true |
11
- | Body | 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
- And I set up a many_to_many relationship between "Articles" and "Projects"
17
- And I have entries for "Articles" with
18
- | title | body |
19
- | Hello world | Lorem ipsum |
20
- | Lorem ipsum | Lorem ipsum... |
21
- And I have entries for "Projects" with
22
- | name | description |
23
- | My sexy project | Lorem ipsum |
24
- | Foo project | Lorem ipsum... |
25
- | Bar project | Lorem ipsum... |
26
-
27
- And I am an authenticated user
28
-
29
- @javascript
30
- Scenario: I attach projects to an article
31
- When I go to the list of "Articles"
32
- And I choose "Hello world" in the list
33
- Then I should see "The list is empty. Add an entry from the select box below."
34
- When I select2 "My sexy project" from "entry"
35
- And I follow "+ add"
36
- Then I should see "My sexy project" within the list of entries
37
- And "p.empty" should not be visible within the list of entries
38
- When I press "Save"
39
- Then I should see "Entry was successfully updated."
40
- When I go to the list of "Projects"
41
- And I choose "My sexy project" in the list
42
- Then I should see "Hello world" within the list of entries
43
-
44
- @javascript
45
- Scenario: I am able to delete a related model
46
- When I go to the list of "Articles"
47
- And I follow "remove model"
48
- And I go to the list of "Projects"
49
- And I follow "edit model"
50
- Then I should see "Editing model"
51
-
52
- Scenario: with_scope with label value
53
- Given the "project" "My sexy project" has "Lorem ipsum" as one of its "articles"
54
- And a page named "sexy-articles" with the template:
55
- """
56
- <hr>
57
- {% with_scope projects.in: ["My sexy project"] %}
58
- {% for article in contents.articles %}- {{ article.title }}<br>{% endfor %}
59
- {% endwith_scope %}
60
- <hr>
61
- """
62
- When I view the rendered page at "/sexy-articles"
63
- Then the rendered output should look like:
64
- """
65
- <hr>
66
-
67
- - Lorem ipsum<br>
68
-
69
- <hr>
70
- """
@@ -1,22 +0,0 @@
1
- Feature: Tagged content
2
- As a designer
3
- In order to organize my content
4
- I want to be able to tag it
5
-
6
- Background:
7
- Given I have the site: "test site" set up
8
- And I have a custom model named "Titles" with
9
- | label | type | required |
10
- | Title | string | true |
11
- | Tags | tags | false |
12
-
13
- And I am an authenticated user
14
-
15
- @javascript
16
- Scenario:
17
- When I go to the list of "Titles"
18
- And I follow "new entry" within the main content
19
- And I fill in "Title" with "My title"
20
- And I fill in "Tags" with the tags "one, two, three"
21
- And I press "Create"
22
- Then I should see "Entry was successfully created."
@@ -1,29 +0,0 @@
1
- Feature: Unique fields
2
- As an editor
3
- In order to validate my data
4
- I want to be able to create unique 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 | unique |
10
- | Name | string | true | false |
11
- | e-mail | email | true | true |
12
- And I have entries for "Members" with
13
- | name | e_mail |
14
- | John Doe | john@doe.com |
15
-
16
- And I am an authenticated user
17
-
18
- @javascript
19
- Scenario:
20
- And I go to the list of "Members"
21
- And I follow "new entry" within the main content
22
- And I fill in "Name" with "John Doe II"
23
- And I fill in "e-mail" with "john@doe.com"
24
- And I press "Create"
25
- Then I should see "Entry was not created."
26
-
27
- When I fill in "e-mail" with "john@doe.es"
28
- And I press "Create"
29
- Then I should see "Entry was successfully created."
@@ -1,93 +0,0 @@
1
- Feature: Manage Contents
2
- In order to manage instances from custom content types
3
- As an administrator
4
- I want to add/edit/delete custom contents of my site
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
- | Category | select | false |
13
- And I have "Design, Development" as "Category" values of the "Projects" model
14
- And I am an authenticated user
15
- And I have entries for "Projects" with
16
- | name | description | category |
17
- | My sexy project | Lorem ipsum | Development |
18
- | Foo project | Lorem ipsum... | Design |
19
- | Bar project | Lorem ipsum... | Design |
20
- | Other project #1 | Lorem ipsum... | Design |
21
- | Other project #2 | Lorem ipsum... | Design |
22
- | Other project #3 | Lorem ipsum... | Design |
23
-
24
- Scenario: Listing content entries
25
- When I go to the list of "Projects"
26
- Then I should see "My sexy project"
27
- And I should see "Other project #2"
28
- And I should see "Other project #3"
29
-
30
- Scenario: Listing content entries without pagination
31
- When I change the number of items to display per page to 4
32
- And I go to the list of "Projects"
33
- Then I should see "Other project #2"
34
- And I should see "Other project #3"
35
-
36
- Scenario: Listing content entries with pagination
37
- When I change the number of items to display per page to 4
38
- And the custom model named "Projects" is ordered by "name"
39
- And I go to the list of "Projects"
40
- Then I should not see "Other project #2"
41
- And I should not see "Other project #3"
42
-
43
- Scenario: Add a new entry
44
- When I go to the list of "Projects"
45
- And I follow "new entry" within the main content
46
- Then I should see "Projects — new entry"
47
- When I fill in "Name" with "My other sexy project"
48
- And I fill in "Description" with "Lorem ipsum...."
49
- And I press "Create"
50
- Then I should see "Entry was successfully created." in the html code
51
-
52
- Scenario: Add an invalid entry
53
- When I go to the list of "Projects"
54
- And I follow "new entry" within the main content
55
- And I fill in "Description" with "Lorem ipsum...."
56
- And I press "Create"
57
- Then I should not see "Entry was successfully created." in the html code
58
-
59
- Scenario: Update an existing entry
60
- When I go to the list of "Projects"
61
- And I follow "My sexy project" within the main content
62
- When I fill in "Name" with "My other sexy project (UPDATED)"
63
- And I press "Save" within the main form
64
- Then I should see "Entry was successfully updated." in the html code
65
- When I go to the list of "Projects"
66
- Then I should see "My other sexy project (UPDATED)"
67
-
68
- Scenario: Update an invalid entry
69
- When I go to the list of "Projects"
70
- And I follow "My sexy project" within the main content
71
- When I fill in "Name" with ""
72
- And I press "Save" within the main form
73
- Then I should not see "Entry was successfully updated." in the html code
74
-
75
- Scenario: Destroy an entry
76
- When I go to the list of "Projects"
77
- And I delete the first content entry
78
- Then I should see "Entry was successfully deleted." in the html code
79
- And I should not see "My sexy project"
80
-
81
- Scenario: Export list of entries
82
- When I go to the list of "Projects"
83
- And I follow "Export"
84
- Then I should get a download with the filename "projects.csv"
85
-
86
- Scenario: Group entries by category
87
- When I go to the list of "Projects"
88
- Then I should not see "Development"
89
- And I should not see "Design"
90
- When I change the presentation of the "Projects" model by grouping items by "Category"
91
- And I go to the list of "Projects"
92
- Then I should see "Development"
93
- And I should see "Design"
@@ -1,22 +0,0 @@
1
- Feature: Manage Pages
2
- In order to manage pages
3
- As an administrator
4
- I want to add/edit/delete editable elements of my pages
5
-
6
- Background:
7
- Given I have the site: "test site" set up
8
- And I am an authenticated user
9
-
10
- @javascript
11
- Scenario: Insert a control element
12
- Given a page named "hello-world" with the template:
13
- """
14
- {% block menu %}{% editable_control 'Menu position', options: 'top=Top of the Page,bottom=Bottom of the Page' %}bottom{% endeditable_control %}{% endblock %}
15
- """
16
- When I go to the "hello-world" edition page
17
- Then "Bottom of the Page" should be selected for "page[editable_elements_attributes][0][content]"
18
- When I select "Top of the Page" from "page[editable_elements_attributes][0][content]"
19
- And I press "Save"
20
- Then I should see "Page was successfully updated."
21
- When I reload the page
22
- Then "Top of the Page" should be selected for "page[editable_elements_attributes][0][content]"
@@ -1,33 +0,0 @@
1
- Feature: Install LocomotiveCMS
2
- In order to get LocomotiveCMS working
3
- I want to create Admin account
4
- And first site
5
- With respect to chosen locale
6
-
7
- Scenario: Install Locomotive with Russian locale
8
- When I go to pages
9
- Then I should see "Create account"
10
- And I fill in the following:
11
- | Account name | Admin |
12
- | Email | admin@example.com |
13
- | account[password] | easyone |
14
- | account[password_confirmation] | easyone |
15
-
16
- When I press "Create account"
17
-
18
- Then I should see "Create your first site"
19
- And I fill in "FirstSite" for "Name"
20
- And I fill in "cool" for "Subdomain"
21
- And I select "Russian" from "Site locale"
22
-
23
- When I press "Create site"
24
-
25
- Then I should see "Войти"
26
- And I fill in the following:
27
- | Email | admin@example.com |
28
- | Пароль | easyone |
29
-
30
- When I press "Войти"
31
- Then I should see "Список страниц"
32
- And I should not see "Home page"
33
- And I should see "Стартовая страница"
@@ -1,33 +0,0 @@
1
- Feature: Log in
2
- In order to access locomotive admin panel
3
- As an administrator
4
- I want to log in
5
-
6
- Background:
7
- Given I have the site: "test site" set up
8
-
9
- Scenario: Successfully logging in
10
- When I go to login
11
- And I fill in "Email" with "admin@locomotiveapp.org"
12
- And I fill in "Password" with "easyone"
13
- And I press "Log in"
14
- Then I should see "Listing pages"
15
-
16
- Scenario: Attempting to login with an invalid emai or password
17
- When I go to login
18
- And I fill in "Email" with "admin@locomotiveapp.org"
19
- And I fill in "Password" with ""
20
- And I press "Log in"
21
- Then I should not see "Listing pages"
22
- And I should see "Invalid email or password"
23
-
24
- Scenario: Attempting to login with an account without a membership
25
- Given the following accounts exist:
26
- | email | password | password_confirmation |
27
- | john@locomotiveapp.org | bluecheese | bluecheese |
28
- When I go to login
29
- And I fill in "Email" with "john@locomotiveapp.org"
30
- And I fill in "Password" with "bluecheese"
31
- And I press "Log in"
32
- Then I should not see "Listing pages"
33
- And I should see "not a member of this site"
@@ -1,13 +0,0 @@
1
- Feature: Mounting Locomotive CMS
2
- As an administrator
3
- In order to gain some flexibility when mounting locomotive CMS
4
- I want to be able to mount locomotove on any given path
5
-
6
- Background:
7
- Given I have a site set up
8
-
9
- @javascript
10
- Scenario: Accessing the backend when mounted on a custom path
11
- Given the engine is mounted on a non standard path
12
- And I am an authenticated "admin"
13
- Then I should be able to access the backend
@@ -1,22 +0,0 @@
1
- Feature: Manage my account
2
- In order to manage my account
3
- As an administrator
4
- I want to edit my profile and credentials
5
-
6
- Background:
7
- Given I have the site: "test site" set up with name: "test site"
8
- And I am an authenticated user
9
-
10
- @javascript
11
- Scenario: Viewing my API key
12
- When I go to the account settings
13
- And I click on the "Credentials" folder
14
- Then I should see "d49cd50f6f0d2b163f48fc73cb249f0244c37074"
15
-
16
- @javascript
17
- Scenario: Changing my API key
18
- When I go to the account settings
19
- And I click on the "Credentials" folder
20
- And I should see "d49cd50f6f0d2b163f48fc73cb249f0244c37074"
21
- And I press "Regenerate"
22
- Then I should not see "d49cd50f6f0d2b163f48fc73cb249f0244c37074"
@@ -1,73 +0,0 @@
1
- Feature: Manage Pages
2
- In order to manage pages
3
- As an administrator
4
- I want to add/edit/delete pages of my site
5
-
6
- Background:
7
- Given I have the site: "test site" set up with name: "test site", timezone_name: "Paris"
8
- And I am an authenticated user
9
-
10
- Scenario: Pages list is not accessible for non authenticated accounts
11
- Given I am not authenticated
12
- When I go to pages
13
- Then I should see "You need to sign in or sign up before continuing"
14
-
15
- Scenario: Templatized pages are avaiable to authors
16
- Given I am not authenticated
17
- And I am an authenticated "author"
18
- And I have a custom model named "Articles" with
19
- | label | type | required |
20
- | Title | string | true |
21
- And I have entries for "Articles" with
22
- | title |
23
- | Hello world |
24
- And a templatized page for the "Articles" model and with the template:
25
- """
26
- Here is the title: "{{ article.title }}"
27
- """
28
- When I go to pages
29
- Then I should see "Template for Articles"
30
-
31
- @javascript
32
- Scenario: Creating a valid page
33
- When I go to pages
34
- And I follow "new page" within the main content
35
- And I fill in "page_title" with "Test"
36
- And I fill in "Slug" with "test"
37
- And I select "Home page" from "Parent"
38
- And I sync my form with my backbone model because of Firefox
39
- And I press "Create"
40
- Then I should see "Page was successfully created."
41
- And I should have "{% extends 'parent' %}" in the test page
42
-
43
- @javascript
44
- Scenario: Updating a valid page
45
- When I go to pages
46
- And I follow "Home page" within the main content
47
- And I change the page title to "Home page !"
48
- And I change the page template to "My new content is here"
49
- And I press "Save"
50
- Then I should see "Page was successfully updated."
51
- Then I go to pages
52
- And updated_at of the index page should respect site's timezone
53
- And I should have "My new content is here" in the index page
54
-
55
- @javascript
56
- Scenario: Localizing page slugs
57
- Given the site "test site" has locales "en, es"
58
- When I go to pages
59
- And I follow "new page" within the main content
60
- And I fill in "page_title" with "Translated"
61
- And I wait 1500ms
62
- And I press "Create"
63
- Then I should see "Page was successfully created."
64
- And I should see a "show" link to "/translated"
65
-
66
- When I switch the locale to "es"
67
- And I fill in "Slug" with "pagina-traducida"
68
- And I wait 1500ms
69
- Then I should see "/es/pagina-traducida"
70
-
71
- When I press "Save"
72
- Then I should see a "show" link to "/es/pagina-traducida"
73
-
@@ -1,19 +0,0 @@
1
- Feature: Specific tests to avoid bug regressions
2
-
3
- @javascript
4
- Scenario: Changing a field requiredness when the first field is a file (WTF)
5
- Given I have the site: "test site" set up
6
- And I have a custom model named "Projects" with
7
- | label | type | required | target |
8
- | Image | file | true | |
9
- | Description | string | true | |
10
- And I am an authenticated user
11
- Given I go to the list of "Projects"
12
- And I follow "new entry" within the main content
13
- Then I should see "Description*"
14
- Given I go to the "Projects" model edition page
15
- And I click on the 2nd required flag
16
- And I press "Save"
17
- And I wait 100ms
18
- When I follow "new entry" within the main content
19
- Then I should not see "Description*"
@@ -1,71 +0,0 @@
1
- Feature: Manage my site
2
- In order to manage my site
3
- As an administrator
4
- I want to edit/delete my site
5
-
6
- Background:
7
- Given I have the site: "test site" set up
8
-
9
- Scenario: Site settings are not accessible for non authenticated accounts
10
- Given I am not authenticated
11
- When I go to the site settings
12
- Then I should see "You need to sign in or sign up before continuing"
13
-
14
- Scenario: Add a new site
15
- Given I am an authenticated user
16
- When I go to the account settings
17
- And I follow "new site"
18
- Then I should see "Fill in the form below to create your new site."
19
- When I fill in "Name" with "Acme"
20
- And I fill in "Subdomain" with "acme"
21
- And I press "Create"
22
- Then I should see "Site was successfully created." in the html code
23
- And I should be a administrator of the "Acme" site
24
-
25
- Scenario: Add a new site with chosen locale
26
- Given I am an authenticated user
27
- When I go to the account settings
28
- And I follow "new site"
29
- When I fill in "Name" with "Acme"
30
- And I fill in "Subdomain" with "acme"
31
- And I select "Russian" from "First language"
32
- When I press "Create"
33
- Then I should see "Site was successfully created." in the html code
34
-
35
- Scenario: Change timezone of site
36
- Given I am an authenticated user
37
- When I go to the site settings
38
- And I select "(GMT+03:00) Moscow" from "Timezone"
39
- Then I press "Save"
40
- Then I should see "My site was successfully updated." in the html code
41
-
42
- @javascript
43
- Scenario: Adding a domain to a site
44
- Given I am an authenticated user
45
- Then I should be able to add a domain to my site
46
-
47
- @javascript
48
- Scenario: Removing a domain from a site
49
- Given I am an authenticated user
50
- Then I should be able to remove a domain from my site
51
-
52
- @javascript
53
- Scenario: Removing a membership
54
- Given I am an authenticated user
55
- Then I should be able to remove a membership from my site
56
-
57
- @javascript
58
- Scenario: Saving a site with AJAX
59
- Given I am an authenticated user
60
- Then I should be able to save the site with AJAX
61
- Given multi_sites is disabled
62
- Then I should be able to save the site with AJAX
63
-
64
- @javascript
65
- Scenario: Multiple saves
66
- Given I am an authenticated user
67
- When I go to the site settings
68
- And I press "Save"
69
- Then I should see "My site was successfully updated."
70
- When I press "Save"
71
- Then I should see "My site was successfully updated."
@@ -1,39 +0,0 @@
1
- Feature: Snippets
2
- In order to manage snippets
3
- As an administrator
4
- I want to add/edit/delete snippets of my site
5
-
6
- Background:
7
- Given I have the site: "test site" set up
8
- And I am an authenticated user
9
- And a page named "home" with the template:
10
- """
11
- {% include 'yield' %}
12
- """
13
- And a snippet named "yield" with the template:
14
- """
15
- "yield"
16
- """
17
-
18
- Scenario: Creating a snippet
19
- When I go to theme assets
20
- And I follow "new snippet" within the main content
21
- And I fill in "Name" with "Banner"
22
- And I fill in "Slug" with "banner"
23
- And I fill in "snippet_template" with "banner"
24
- And I press "Create"
25
- Then I should see "Snippet was successfully created." in the html code
26
- And I should have "banner" in the banner snippet
27
-
28
- @javascript
29
- Scenario: Updating a snippet that includes another snippet
30
- Given a snippet named "other" with the template:
31
- """
32
- "other"
33
- """
34
- When I go to theme assets
35
- And I follow "yield"
36
- And I change the snippet template to "{% include other %}"
37
- And I press "Save"
38
- Then I should see "Snippet was successfully updated."
39
- And I should have "{% include other %}" in the yield snippet
@@ -1,72 +0,0 @@
1
- Feature: Manage Theme Assets
2
- In order to manage theme assets
3
- As an administrator
4
- I want to add/edit/delete theme assets of my site
5
-
6
- Background:
7
- Given I have the site: "test site" set up
8
- And I am an authenticated user
9
-
10
- Scenario: Theme assets list is not accessible for non authenticated accounts
11
- Given I am not authenticated
12
- When I go to theme assets
13
- Then I should see "Log in"
14
-
15
- Scenario: Uploading a valid image
16
- When I go to theme assets
17
- And I follow "new file"
18
- And I attach the file "spec/fixtures/assets/5k.png" to "File"
19
- And I press "Create"
20
- Then I should see "File was successfully created." in the html code
21
- And I should not see "Code"
22
- And I should see "images/5k.png"
23
-
24
- Scenario: Uploading a stylesheet
25
- When I go to theme assets
26
- And I follow "new file"
27
- And I attach the file "spec/fixtures/assets/main.css" to "File"
28
- And I press "Create"
29
- Then I should see "File was successfully created." in the html code
30
- And I should see "Code"
31
- And I should see "stylesheets/main.css"
32
-
33
- @javascript
34
- Scenario: Updating a stylesheet
35
- Given a stylesheet asset named "application"
36
- When I go to theme assets
37
- And I follow "application.css" within the main content
38
- And I change the theme asset code to "Lorem ipsum (updated)"
39
- And I press "Save"
40
- Then I should see "File was successfully updated."
41
- And I should see "Editing application.css"
42
- And I should see "application.css"
43
- And I should see "Lorem ipsum (updated)" as the theme asset code
44
-
45
- Scenario: Uploading a javascript
46
- When I go to theme assets
47
- And I follow "new file"
48
- And I fill in "Folder" with "javascripts/test"
49
- And I attach the file "spec/fixtures/assets/application.js" to "File"
50
- And I press "Create"
51
- Then I should see "File was successfully created." in the html code
52
- And I should see "Code"
53
- And I should see "javascripts/test/application.js"
54
-
55
- @javascript
56
- Scenario: Updating a javascript
57
- Given a javascript asset named "application"
58
- When I go to theme assets
59
- And I follow "application.js"
60
- And I change the theme asset code to "Lorem ipsum (updated)"
61
- And I press "Save"
62
- Then I should see "File was successfully updated."
63
-
64
- Scenario: Uploading an image which already exists
65
- When I go to theme assets
66
- And I follow "new file"
67
- And I attach the file "spec/fixtures/assets/5k.png" to "File"
68
- And I press "Create"
69
- And I follow "new file"
70
- And I attach the file "spec/fixtures/assets/5k.png" to "File"
71
- And I press "Create"
72
- Then I should see "File was not created." in the html code
@@ -1,50 +0,0 @@
1
- Feature: Translations
2
- In order to avoid template duplication
3
- As a designer
4
- I want to be able to define translations and use them in my templates
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, es"
9
- And I have a designer and an author
10
-
11
- Scenario: As an unauthenticated user
12
- Given I am not authenticated
13
- When I go to translations
14
- Then I should see "Log in"
15
-
16
- Scenario: As a designer
17
- Given I am an authenticated "designer"
18
- And I go to translations
19
- And I follow "new translation"
20
- And I fill in "Key" with "hello_world"
21
- And I fill in "English" with "Hello, World!"
22
- And I fill in "Spanish" with "¡Hola, Mundo!"
23
- And I press "Create"
24
- Then I should see "Translation was successfully created" in the html code
25
- And I follow "new translation"
26
- And I fill in "Key" with "english_only_please"
27
- And I fill in "English" with "English only, please"
28
- And I press "Create"
29
- When I follow "Contents"
30
- And I follow "Home page" within the main content
31
- And I fill in "page_raw_template" with "{{ 'hello_world' | translate}} {{ 'english_only_please' | translate}} {% locale_switcher %}"
32
- And I press "Save"
33
- And I follow "show"
34
- Then I should see "Hello, World!"
35
- And I should see "English only, please"
36
- When I follow "es"
37
- Then I should see "¡Hola, Mundo!"
38
- And I should see "English only, please"
39
-
40
- Scenario: As an author
41
- When I am an authenticated "author"
42
- And I go to translations
43
- And I follow "new translation"
44
- And I fill in "Key" with "example_key"
45
- And I fill in "English" with "Example text"
46
- And I fill in "Spanish" with "Texto de ejemplo"
47
- And I press "Create"
48
- Then I should see "Translation was successfully created" in the html code
49
- When I follow "Remove example_key"
50
- Then I should see "Translation was successfully deleted" in the html code