trusty-cms 2.0.28 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +7 -10
- data/Gemfile.lock +142 -145
- data/app/assets/javascripts/admin/tabcontrol.js.erb +1 -1
- data/app/controllers/admin/configuration_controller.rb +1 -1
- data/app/controllers/admin/pages_controller.rb +2 -2
- data/app/controllers/admin/password_resets_controller.rb +1 -1
- data/app/controllers/admin/preferences_controller.rb +1 -1
- data/app/controllers/admin/resource_controller.rb +5 -5
- data/app/controllers/admin/users_controller.rb +1 -1
- data/app/controllers/admin/welcome_controller.rb +2 -2
- data/app/controllers/application_controller.rb +7 -7
- data/app/controllers/site_controller.rb +4 -4
- data/app/helpers/admin/configuration_helper.rb +1 -1
- data/app/models/page.rb +1 -1
- data/config/environments/test.rb +2 -4
- data/config/initializers/assets.rb +2 -0
- data/config/initializers/rails_patch.rb +1 -1
- data/lib/login_system.rb +6 -6
- data/lib/trusty_cms.rb +1 -1
- data/lib/trusty_cms/pagination/controller.rb +1 -1
- data/spec/controllers/application_controller_spec.rb +2 -2
- data/spec/dummy/config/application.rb +1 -0
- data/spec/dummy/config/environments/production.rb +1 -1
- data/spec/dummy/config/environments/test.rb +2 -2
- data/spec/features/pages_spec.rb +2 -2
- data/trusty_cms.gemspec +17 -17
- metadata +94 -76
- data/spec/features/javascript_smoke_spec.rb +0 -59
@@ -1,59 +0,0 @@
|
|
1
|
-
require 'rails_helper'
|
2
|
-
|
3
|
-
describe 'Editing using javascript features', js: true do
|
4
|
-
fixtures :users
|
5
|
-
|
6
|
-
before(:each) do
|
7
|
-
@admin = users(:captain_janeway)
|
8
|
-
log_in_as @admin.login
|
9
|
-
end
|
10
|
-
|
11
|
-
it 'edits all sorts of content' do
|
12
|
-
# Create a new homepage
|
13
|
-
click_link 'New Homepage'
|
14
|
-
fill_in 'Page Title', with: 'Voyager Home'
|
15
|
-
click_button 'Create Page'
|
16
|
-
|
17
|
-
# Create a new child page of the home page
|
18
|
-
# This is failing on Travis, but not on my box. Just trying to edit to push a new version.
|
19
|
-
click_link 'Add Child'
|
20
|
-
click_link 'Normal Page'
|
21
|
-
fill_in 'Page Title', with: 'Command Center'
|
22
|
-
page.execute_script("CKEDITOR.instances['part_body_content'].setData('You are on the bridge.');")
|
23
|
-
|
24
|
-
# Add a custom page part
|
25
|
-
click_link 'Add Part'
|
26
|
-
fill_in 'Name', with: 'footer'
|
27
|
-
click_button 'Add Part'
|
28
|
-
expect(page).to have_selector '#tabs #tab_footer'
|
29
|
-
page.execute_script("CKEDITOR.instances['part_footer_content'].setData('You are on the bridge.');")
|
30
|
-
|
31
|
-
# Switch tabs
|
32
|
-
click_link 'tab_body'
|
33
|
-
result = evaluate_script("CKEDITOR.instances['part_body_content'].getData()")
|
34
|
-
puts result
|
35
|
-
result.should include("You are on the bridge.")
|
36
|
-
expect(page).to_not have_field 'part_footer_content'
|
37
|
-
|
38
|
-
# Remove a tab
|
39
|
-
find('#tab_extended .close').click
|
40
|
-
expect(page).to_not have_content 'extended'
|
41
|
-
|
42
|
-
# Preview
|
43
|
-
click_button 'Preview'
|
44
|
-
within_frame 'page-preview' do
|
45
|
-
expect(page).to have_content 'You are on the bridge.'
|
46
|
-
expect(page).to_not have_content 'New Page'
|
47
|
-
end
|
48
|
-
|
49
|
-
# TODO: This is currently broken by treetable, but I don't understand how it works well enough to fix. Will consult carols10cents.
|
50
|
-
# Save and check that all changes were saved
|
51
|
-
#click_button 'Save Changes'
|
52
|
-
#click_link 'Command Center'
|
53
|
-
#expect(page).to_not have_content 'extended'
|
54
|
-
#expect(page).to have_content 'footer'
|
55
|
-
#expect(page).to have_field 'part_body_content', with: 'You are on the bridge.'
|
56
|
-
#click_link 'tab_footer'
|
57
|
-
#expect(page).to have_field 'part_footer_content', with: 'Copyright Voyager 2371'
|
58
|
-
end
|
59
|
-
end
|