rwiki 0.1.3 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (220) hide show
  1. data/Capfile +2 -0
  2. data/Gemfile +30 -0
  3. data/Rakefile +22 -65
  4. data/VERSION +1 -1
  5. data/config.ru +11 -0
  6. data/config/config.yml.example +1 -0
  7. data/config/deploy.rb +37 -0
  8. data/features/create_page.feature +30 -20
  9. data/features/delete_page.feature +23 -18
  10. data/features/display_page.feature +10 -11
  11. data/features/editor.feature +45 -0
  12. data/features/history.feature +46 -0
  13. data/features/rename_page.feature +42 -37
  14. data/features/step_definitions/common_steps.rb +19 -47
  15. data/features/step_definitions/common_transforms.rb +5 -0
  16. data/features/step_definitions/dialog_box_steps.rb +16 -0
  17. data/features/step_definitions/history_steps.rb +11 -0
  18. data/features/step_definitions/tab_panel_steps.rb +27 -0
  19. data/features/step_definitions/tree_panel_steps.rb +42 -0
  20. data/features/step_definitions/wait_steps.rb +21 -0
  21. data/features/support/env.rb +6 -0
  22. data/features/tab_panel.feature +47 -0
  23. data/features/tree_panel.feature +14 -15
  24. data/lib/rwiki.rb +1 -0
  25. data/lib/rwiki/app.rb +14 -2
  26. data/lib/rwiki/models/folder.rb +1 -1
  27. data/lib/rwiki/models/node.rb +11 -1
  28. data/lib/rwiki/models/page.rb +1 -1
  29. data/public/favicon.ico +0 -0
  30. data/public/images/compressed.png +0 -0
  31. data/public/images/css.png +0 -0
  32. data/public/images/file.png +0 -0
  33. data/public/images/html.png +0 -0
  34. data/public/images/icon_word.png +0 -0
  35. data/public/images/image.png +0 -0
  36. data/public/images/javascript.png +0 -0
  37. data/public/images/pdf.png +0 -0
  38. data/public/images/php.png +0 -0
  39. data/public/images/presentation.png +0 -0
  40. data/public/images/ruby.png +0 -0
  41. data/public/images/shellscript.png +0 -0
  42. data/public/images/stylesheet.png +0 -0
  43. data/public/images/text.png +0 -0
  44. data/public/images/wordprocessing.png +0 -0
  45. data/public/javascripts/Rwiki.js +71 -29
  46. data/public/javascripts/Rwiki/EditorPanel.js +5 -37
  47. data/public/javascripts/Rwiki/EditorPanel/Editor.js +8 -44
  48. data/public/javascripts/Rwiki/EditorWindow.js +66 -0
  49. data/public/javascripts/Rwiki/FuzzyFinderDialog.js +61 -0
  50. data/public/javascripts/Rwiki/NavigationPanel.js +25 -0
  51. data/public/javascripts/Rwiki/NodeManager.js +2 -0
  52. data/public/javascripts/Rwiki/TabPanel.js +39 -2
  53. data/public/javascripts/Rwiki/TreePanel.js +39 -26
  54. data/public/javascripts/Rwiki/TreePanel/Menu.js +1 -1
  55. data/public/javascripts/Rwiki/TreePanel/Node.js +46 -0
  56. data/public/javascripts/vendor/ext/adapter/ext/ext-base-debug.js +836 -710
  57. data/public/javascripts/vendor/ext/adapter/ext/ext-base.js +5 -5
  58. data/public/javascripts/vendor/ext/adapter/jquery/ext-jquery-adapter-debug.js +47 -700
  59. data/public/javascripts/vendor/ext/adapter/jquery/ext-jquery-adapter.js +5 -5
  60. data/public/javascripts/vendor/ext/adapter/prototype/ext-prototype-adapter-debug.js +45 -698
  61. data/public/javascripts/vendor/ext/adapter/prototype/ext-prototype-adapter.js +5 -5
  62. data/public/javascripts/vendor/ext/adapter/yui/ext-yui-adapter-debug.js +39 -696
  63. data/public/javascripts/vendor/ext/adapter/yui/ext-yui-adapter.js +5 -5
  64. data/public/javascripts/vendor/ext/ext-all-debug-w-comments.js +17932 -12860
  65. data/public/javascripts/vendor/ext/ext-all-debug.js +11674 -8102
  66. data/public/javascripts/vendor/ext/ext-all.js +6 -6
  67. data/public/javascripts/vendor/ext/ux/StatusBar.js +418 -0
  68. data/public/resources/ext/charts.swf +0 -0
  69. data/public/resources/ext/css/debug.css +4 -4
  70. data/public/resources/ext/css/ext-all-notheme.css +204 -52
  71. data/public/resources/ext/css/ext-all.css +234 -54
  72. data/public/resources/ext/css/reset-min.css +4 -4
  73. data/public/resources/ext/css/structure/borders.css +4 -4
  74. data/public/resources/ext/css/structure/box.css +4 -4
  75. data/public/resources/ext/css/structure/button.css +7 -7
  76. data/public/resources/ext/css/structure/combo.css +4 -4
  77. data/public/resources/ext/css/structure/core.css +15 -5
  78. data/public/resources/ext/css/structure/date-picker.css +4 -4
  79. data/public/resources/ext/css/structure/dd.css +4 -4
  80. data/public/resources/ext/css/structure/debug.css +4 -4
  81. data/public/resources/ext/css/structure/dialog.css +6 -9
  82. data/public/resources/ext/css/structure/editor.css +4 -4
  83. data/public/resources/ext/css/structure/form.css +14 -4
  84. data/public/resources/ext/css/structure/grid.css +15 -5
  85. data/public/resources/ext/css/structure/layout.css +7 -7
  86. data/public/resources/ext/css/structure/list-view.css +4 -4
  87. data/public/resources/ext/css/structure/menu.css +13 -6
  88. data/public/resources/ext/css/structure/panel-reset.css +4 -4
  89. data/public/resources/ext/css/structure/panel.css +70 -22
  90. data/public/resources/ext/css/structure/pivotgrid.css +65 -0
  91. data/public/resources/ext/css/structure/progress.css +4 -4
  92. data/public/resources/ext/css/structure/qtips.css +4 -4
  93. data/public/resources/ext/css/structure/reset.css +11 -5
  94. data/public/resources/ext/css/structure/resizable.css +4 -4
  95. data/public/resources/ext/css/structure/slider.css +4 -4
  96. data/public/resources/ext/css/structure/tabs.css +13 -8
  97. data/public/resources/ext/css/structure/toolbar.css +5 -5
  98. data/public/resources/ext/css/structure/tree.css +11 -11
  99. data/public/resources/ext/css/structure/window.css +5 -5
  100. data/public/resources/ext/css/theme-access/borders.css +4 -4
  101. data/public/resources/ext/css/theme-access/box.css +4 -4
  102. data/public/resources/ext/css/theme-access/button.css +4 -4
  103. data/public/resources/ext/css/theme-access/combo.css +4 -4
  104. data/public/resources/ext/css/theme-access/core.css +4 -4
  105. data/public/resources/ext/css/theme-access/date-picker.css +4 -4
  106. data/public/resources/ext/css/theme-access/dd.css +4 -4
  107. data/public/resources/ext/css/theme-access/debug.css +4 -4
  108. data/public/resources/ext/css/theme-access/dialog.css +4 -4
  109. data/public/resources/ext/css/theme-access/editor.css +4 -4
  110. data/public/resources/ext/css/theme-access/form.css +4 -4
  111. data/public/resources/ext/css/theme-access/grid.css +4 -4
  112. data/public/resources/ext/css/theme-access/layout.css +4 -4
  113. data/public/resources/ext/css/theme-access/list-view.css +8 -4
  114. data/public/resources/ext/css/theme-access/menu.css +4 -4
  115. data/public/resources/ext/css/theme-access/panel.css +4 -4
  116. data/public/resources/ext/css/theme-access/progress.css +4 -4
  117. data/public/resources/ext/css/theme-access/qtips.css +4 -4
  118. data/public/resources/ext/css/theme-access/resizable.css +4 -4
  119. data/public/resources/ext/css/theme-access/slider.css +4 -4
  120. data/public/resources/ext/css/theme-access/tabs.css +4 -4
  121. data/public/resources/ext/css/theme-access/toolbar.css +4 -4
  122. data/public/resources/ext/css/theme-access/tree.css +4 -4
  123. data/public/resources/ext/css/theme-access/window.css +5 -5
  124. data/public/resources/ext/css/theme-gray/borders.css +4 -4
  125. data/public/resources/ext/css/theme-gray/box.css +4 -4
  126. data/public/resources/ext/css/theme-gray/button.css +4 -4
  127. data/public/resources/ext/css/theme-gray/combo.css +4 -4
  128. data/public/resources/ext/css/theme-gray/core.css +6 -4
  129. data/public/resources/ext/css/theme-gray/date-picker.css +4 -4
  130. data/public/resources/ext/css/theme-gray/dd.css +4 -4
  131. data/public/resources/ext/css/theme-gray/debug.css +4 -4
  132. data/public/resources/ext/css/theme-gray/dialog.css +4 -4
  133. data/public/resources/ext/css/theme-gray/editor.css +4 -4
  134. data/public/resources/ext/css/theme-gray/form.css +4 -4
  135. data/public/resources/ext/css/theme-gray/grid.css +10 -6
  136. data/public/resources/ext/css/theme-gray/layout.css +4 -4
  137. data/public/resources/ext/css/theme-gray/list-view.css +5 -5
  138. data/public/resources/ext/css/theme-gray/menu.css +4 -4
  139. data/public/resources/ext/css/theme-gray/panel.css +4 -4
  140. data/public/resources/ext/css/theme-gray/pivotgrid.css +28 -0
  141. data/public/resources/ext/css/theme-gray/progress.css +4 -4
  142. data/public/resources/ext/css/theme-gray/qtips.css +4 -4
  143. data/public/resources/ext/css/theme-gray/resizable.css +4 -4
  144. data/public/resources/ext/css/theme-gray/slider.css +4 -4
  145. data/public/resources/ext/css/theme-gray/tabs.css +4 -4
  146. data/public/resources/ext/css/theme-gray/toolbar.css +4 -4
  147. data/public/resources/ext/css/theme-gray/tree.css +4 -4
  148. data/public/resources/ext/css/theme-gray/window.css +4 -4
  149. data/public/resources/ext/css/visual/borders.css +4 -4
  150. data/public/resources/ext/css/visual/box.css +4 -4
  151. data/public/resources/ext/css/visual/button.css +4 -4
  152. data/public/resources/ext/css/visual/combo.css +4 -4
  153. data/public/resources/ext/css/visual/core.css +6 -4
  154. data/public/resources/ext/css/visual/date-picker.css +4 -4
  155. data/public/resources/ext/css/visual/dd.css +4 -4
  156. data/public/resources/ext/css/visual/debug.css +4 -4
  157. data/public/resources/ext/css/visual/dialog.css +4 -4
  158. data/public/resources/ext/css/visual/editor.css +4 -4
  159. data/public/resources/ext/css/visual/form.css +4 -4
  160. data/public/resources/ext/css/visual/grid.css +8 -4
  161. data/public/resources/ext/css/visual/layout.css +4 -4
  162. data/public/resources/ext/css/visual/list-view.css +4 -4
  163. data/public/resources/ext/css/visual/menu.css +4 -4
  164. data/public/resources/ext/css/visual/panel.css +4 -4
  165. data/public/resources/ext/css/visual/pivotgrid.css +28 -0
  166. data/public/resources/ext/css/visual/progress.css +4 -4
  167. data/public/resources/ext/css/visual/qtips.css +4 -4
  168. data/public/resources/ext/css/visual/resizable.css +4 -4
  169. data/public/resources/ext/css/visual/slider.css +4 -4
  170. data/public/resources/ext/css/visual/tabs.css +4 -4
  171. data/public/resources/ext/css/visual/toolbar.css +5 -5
  172. data/public/resources/ext/css/visual/tree.css +4 -4
  173. data/public/resources/ext/css/visual/window.css +4 -4
  174. data/public/resources/ext/css/xtheme-access.css +9 -5
  175. data/public/resources/ext/css/xtheme-blue.css +34 -6
  176. data/public/resources/ext/css/xtheme-gray.css +35 -7
  177. data/public/resources/ext/css/yourtheme.css +11 -5
  178. data/public/resources/ext/images/access/panel/tool-sprites.gif +0 -0
  179. data/public/resources/ext/images/default/grid/grid3-rowheader.gif +0 -0
  180. data/public/resources/ext/images/default/grid/refresh-disabled.gif +0 -0
  181. data/public/resources/ext/images/default/panel/tool-sprites.gif +0 -0
  182. data/public/resources/ext/images/gray/grid/sort-hd.gif +0 -0
  183. data/public/resources/ext/images/gray/panel/tool-sprites.gif +0 -0
  184. data/public/resources/ext/images/gray/window/left-corners.png +0 -0
  185. data/public/resources/ext/images/gray/window/left-right.png +0 -0
  186. data/public/resources/ext/images/gray/window/right-corners.png +0 -0
  187. data/public/resources/ext/images/gray/window/top-bottom.png +0 -0
  188. data/public/stylesheets/coderay.css +3 -0
  189. data/public/stylesheets/markitup.css +19 -0
  190. data/public/stylesheets/style.css +1 -1
  191. data/run_tests.sh +1 -0
  192. data/rwiki.gemspec +56 -37
  193. data/test/fixtures/pages/Info/dummy +0 -0
  194. data/test/rwiki/models/test_folder.rb +4 -4
  195. data/vendor/.gitkeep +0 -0
  196. data/views/layout.erb +13 -5
  197. metadata +78 -69
  198. data/.idea/projectCodeStyle.xml +0 -80
  199. data/.rvmrc +0 -1
  200. data/public/javascripts/Rwiki/SidePanel.js +0 -26
  201. data/public/javascripts/Rwiki/Toolbar.js +0 -31
  202. data/public/javascripts/Rwiki/Viewport.js +0 -10
  203. data/tmp/ExtDesigner/MyViewport.js +0 -18
  204. data/tmp/ExtDesigner/MyViewport.ui.js +0 -29
  205. data/tmp/ExtDesigner/Rwiki.EditorPanel.js +0 -19
  206. data/tmp/ExtDesigner/Rwiki.EditorPanel.ui.js +0 -27
  207. data/tmp/ExtDesigner/Rwiki.MainPanel.js +0 -19
  208. data/tmp/ExtDesigner/Rwiki.MainPanel.ui.js +0 -29
  209. data/tmp/ExtDesigner/Rwiki.TabPane.PageTab.js +0 -19
  210. data/tmp/ExtDesigner/Rwiki.TabPane.PageTab.ui.js +0 -19
  211. data/tmp/ExtDesigner/Rwiki.TabPanel.js +0 -19
  212. data/tmp/ExtDesigner/Rwiki.TabPanel.ui.js +0 -27
  213. data/tmp/ExtDesigner/Rwiki.TreePanel.js +0 -19
  214. data/tmp/ExtDesigner/Rwiki.TreePanel.ui.js +0 -27
  215. data/tmp/ExtDesigner/Rwiki.Viewport.js +0 -18
  216. data/tmp/ExtDesigner/Rwiki.Viewport.ui.js +0 -30
  217. data/tmp/ExtDesigner/rwiki.xds +0 -192
  218. data/tmp/ExtDesigner/xds_includeOrder.txt +0 -12
  219. data/tmp/ExtDesigner/xds_index.html +0 -26
  220. data/tmp/ExtDesigner/xds_index.js +0 -19
data/Capfile ADDED
@@ -0,0 +1,2 @@
1
+ load 'deploy' if respond_to?(:namespace) # cap2 differentiator
2
+ load 'config/deploy'
data/Gemfile ADDED
@@ -0,0 +1,30 @@
1
+ source "http://rubygems.org"
2
+
3
+ gem "sinatra"
4
+ gem "RedCloth"
5
+ gem "coderay"
6
+ gem "json_pure"
7
+ gem "thin"
8
+ gem "fuzzy_file_finder"
9
+
10
+ # Add dependencies to develop your gem here.
11
+ # Include everything needed to run rake, tests, features, etc.
12
+ group :development do
13
+ gem "jeweler"
14
+ gem "ruby-debug" if RUBY_VERSION < "1.9"
15
+
16
+ gem "rack-test"
17
+ gem "test-unit"
18
+ gem "shoulda"
19
+ gem "jasmine"
20
+
21
+ gem "cucumber"
22
+ gem "cucumber-rails"
23
+ gem "capybara"
24
+ gem "rspec"
25
+ gem "rspec-core"
26
+ gem "rspec-expectations"
27
+
28
+ gem "capistrano"
29
+ end
30
+
data/Rakefile CHANGED
@@ -1,52 +1,28 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  require 'rubygems'
4
- require 'rake'
4
+ require 'bundler'
5
5
 
6
6
  begin
7
- require 'jeweler'
8
- Jeweler::Tasks.new do |gem|
9
- gem.name = "rwiki"
10
- gem.summary = %Q{Yet another personal wiki}
11
- gem.description = %Q{Personal wiki based on ExtJS}
12
- gem.email = "lucassus@gmail.com"
13
- gem.homepage = "http://github.com/lucassus/rwiki"
14
- gem.authors = ["Łukasz Bandzarewicz"]
15
-
16
- gem.add_dependency "sinatra"
17
- gem.add_dependency "RedCloth"
18
- gem.add_dependency "coderay"
19
- gem.add_dependency "json_pure"
20
- gem.add_dependency "thin"
21
-
22
- if RUBY_VERSION >= "1.9"
23
- gem.add_development_dependency "ruby-debug19"
24
- else
25
- gem.add_development_dependency "ruby-debug"
26
- end
27
-
28
- gem.add_development_dependency "rack-test"
29
- gem.add_development_dependency "test-unit"
30
- gem.add_development_dependency "shoulda"
31
- gem.add_development_dependency "jasmine"
32
-
33
- gem.add_development_dependency "cucumber"
34
- gem.add_development_dependency "cucumber-rails"
35
- gem.add_development_dependency "webrat"
36
- gem.add_development_dependency "capybara"
37
- gem.add_development_dependency "rspec"
38
- gem.add_development_dependency "rspec-core"
39
- gem.add_development_dependency "rspec-expectations"
40
-
41
- gem.add_development_dependency "Selenium"
42
- gem.add_development_dependency "selenium-client"
7
+ Bundler.setup(:default, :development)
8
+ rescue Bundler::BundlerError => e
9
+ $stderr.puts e.message
10
+ $stderr.puts "Run `bundle install` to install missing gems"
11
+ exit e.status_code
12
+ end
13
+ require 'rake'
43
14
 
44
- # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
45
- end
46
- Jeweler::GemcutterTasks.new
47
- rescue LoadError
48
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
15
+ require 'jeweler'
16
+ Jeweler::Tasks.new do |gem|
17
+ gem.name = "rwiki"
18
+ gem.license = "MIT"
19
+ gem.summary = %Q{Yet another personal wiki}
20
+ gem.description = %Q{Personal wiki based on ExtJS}
21
+ gem.email = "lucassus@gmail.com"
22
+ gem.homepage = "http://github.com/lucassus/rwiki"
23
+ gem.authors = ["Łukasz Bandzarewicz"]
49
24
  end
25
+ Jeweler::RubygemsDotOrgTasks.new
50
26
 
51
27
  require 'rake/testtask'
52
28
  Rake::TestTask.new(:test) do |test|
@@ -55,36 +31,17 @@ Rake::TestTask.new(:test) do |test|
55
31
  test.verbose = true
56
32
  end
57
33
 
58
- begin
59
- require 'rcov/rcovtask'
60
- Rcov::RcovTask.new do |test|
61
- test.libs << 'test'
62
- test.pattern = 'test/**/test_*.rb'
63
- test.verbose = true
64
- end
65
- rescue LoadError
66
- task :rcov do
67
- abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
68
- end
69
- end
70
-
71
- task :test => :check_dependencies
34
+ require 'cucumber/rake/task'
35
+ Cucumber::Rake::Task.new(:features)
72
36
 
73
37
  task :default => :test
74
38
 
75
39
  require 'rake/rdoctask'
76
40
  Rake::RDocTask.new do |rdoc|
77
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
41
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
78
42
 
79
43
  rdoc.rdoc_dir = 'rdoc'
80
- rdoc.title = "rwiki #{version}"
44
+ rdoc.title = "rwiki #{version}"
81
45
  rdoc.rdoc_files.include('README*')
82
46
  rdoc.rdoc_files.include('lib/**/*.rb')
83
47
  end
84
-
85
- begin
86
- require 'jasmine'
87
- load 'jasmine/tasks/jasmine.rake'
88
- rescue LoadError
89
- puts "Jasmine not available. Install it with: gem install jasmine"
90
- end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.3
1
+ 0.2.1
@@ -0,0 +1,11 @@
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), 'lib'))
2
+ require 'rwiki'
3
+ require 'yaml'
4
+
5
+ config = YAML.load_file(File.join(File.dirname(__FILE__), 'config', 'config.yml'))
6
+ working_path = config[:working_path]
7
+
8
+ puts "Working path is: #{working_path}"
9
+ Rwiki::Models::Node.working_path = working_path
10
+
11
+ run Rwiki::App
@@ -0,0 +1 @@
1
+ :working_path: /home/lucassus/Dropox/Documents/Rwiki
@@ -0,0 +1,37 @@
1
+ $:.unshift(File.expand_path('./lib', ENV['rvm_path']))
2
+ require "rvm/capistrano"
3
+
4
+ set :rvm_type, :system
5
+
6
+ set :application, "rwiki"
7
+ set :deploy_to, "/home/projects/rwiki"
8
+
9
+ set :scm, :git
10
+ set :repository, "git://github.com/lucassus/rwiki.git"
11
+
12
+ set :domain, "vps_rwiki"
13
+ role :app, domain
14
+
15
+ namespace :deploy do
16
+ desc "Restart the application"
17
+ task :restart, :role => :app do
18
+ run "touch #{current_path}/tmp/restart.txt"
19
+ end
20
+
21
+ task :symlink_shared, :roles => :app do
22
+ # Symlink configuration
23
+ run "rm -rf #{release_path}/config/config.yml"
24
+ run "ln -s #{shared_path}/config/config.yml #{release_path}/config/config.yml"
25
+
26
+ # Symlink gems
27
+ run "rm -rf #{release_path}/vendor/bundle"
28
+ run "ln -s #{shared_path}/bundle #{release_path}/vendor/bundle"
29
+ end
30
+
31
+ task :bundle_install, :roles => :app do
32
+ run "cd #{current_path} && bundle install --path vendor/bundle"
33
+ end
34
+ end
35
+
36
+ after :deploy, :'deploy:symlink_shared'
37
+ after :deploy, :'deploy:bundle_install'
@@ -1,45 +1,55 @@
1
1
  Feature: Create page
2
2
 
3
3
  Background:
4
- Given I go to the home page
5
- And I wait for ajax call complete
4
+ Given I open the application
6
5
 
7
6
  @javascript
8
7
  Scenario: Create a new page
9
- When I right click node "./folder"
8
+ When I right click the node with path "./folder"
10
9
  And I follow "Create page"
11
10
  Then I should see dialog box titled "Create page"
12
11
 
13
- When I fill in the dialog box input with "The new page"
14
- And press "OK"
15
- And I reload the page
16
- And I double click node "./folder"
17
- Then I should see "The new page"
12
+ When I fill in the input with "The new page" within the dialog box
13
+ And I press "OK" within the dialog box
14
+ Then I should see the node titled "The new page"
18
15
 
19
- When I click node "./folder/The new page.txt"
16
+ When I reload the application
17
+ And I double click the node with path "./folder"
18
+ Then I should see the node titled "The new page"
19
+
20
+ When I click the node with path "./folder/The new page.txt"
20
21
  Then I should have the following open tabs:
21
22
  | The new page |
23
+ And I should see page title "Rwiki ./folder/The new page.txt"
24
+ And I should see "The new page" within "h1"
22
25
 
23
26
  @javascript
24
27
  Scenario: Create an existing page
25
- When I right click node "./folder"
28
+ When I right click the node with path "./folder"
26
29
  And I follow "Create page"
27
30
  Then I should see dialog box titled "Create page"
28
31
 
29
- When I fill in the dialog box input with "test"
30
- And press "OK"
31
- And I reload the page
32
- And I double click node "./folder"
33
- And I click node "./folder/test.txt"
32
+ When I fill in the input with "test" within the dialog box
33
+ And I press "OK" within the dialog box
34
+ Then I should see the node titled "test"
35
+
36
+ When I reload the application
37
+ And I double click the node with path "./folder"
38
+ Then I should see the node titled "test"
39
+
40
+ When I click the node with path "./folder/test.txt"
34
41
  Then I should see "Test 1" within "h3"
35
42
 
36
43
  @javascript
37
44
  Scenario: Create a folder
38
- When I right click node "./folder"
45
+ When I right click the node with path "./folder"
39
46
  And I follow "Create folder"
40
47
  Then I should see dialog box titled "Create folder"
41
48
 
42
- When I fill in the dialog box input with "The new folder"
43
- And press "OK"
44
- And I reload the page
45
- And I double click node "./folder"
49
+ When I fill in the input with "The new folder" within the dialog box
50
+ And I press "OK" within the dialog box
51
+ Then I should see the node titled "The new folder"
52
+
53
+ When I reload the application
54
+ And I double click the node with path "./folder"
55
+ Then I should see the node titled "The new folder"
@@ -1,36 +1,41 @@
1
1
  Feature: Delete a page
2
2
 
3
3
  Background:
4
- Given I go to the home page
5
- And I wait for ajax call complete
6
-
4
+ Given I open the application
7
5
 
8
6
  @javascript
9
7
  Scenario: Delete a page
10
- When I right click node "./home.txt"
8
+ When I right click the node with path "./home.txt"
11
9
  And I follow "Delete node"
12
10
  Then I should see dialog box titled "Confirm"
13
11
 
14
- When I press "Yes"
15
- And I reload the page
16
- Then I should not see "home"
12
+ When I press "Yes" within the dialog box
13
+ Then I should not see the node titled "home"
14
+
15
+ When I reload the application
16
+ Then I should not see the node titled "home"
17
17
 
18
18
  @javascript
19
19
  Scenario: Delete a page when tab is open
20
- When I click node "./home.txt"
21
- And I click node "./test.txt"
22
- And I right click node "./home.txt"
20
+ When I click the node with path "./home.txt"
21
+ And I double click the node with path "./folder"
22
+ And I double click the node with path "./folder/subfolder"
23
+ And I click the node with path "./folder/subfolder/ruby.txt"
24
+ And I right click the node with path "./home.txt"
23
25
  And I follow "Delete node"
24
26
  Then I should see dialog box titled "Confirm"
25
27
 
26
- When I press "Yes"
27
- Then I should have the following open tabs:
28
- | test |
28
+ When I press "Yes" within the dialog box
29
+ Then I should not see the node titled "home"
30
+ And I should have the following open tabs:
31
+ | ruby |
32
+ And I should see page title "Rwiki ./folder/subfolder/ruby.txt"
29
33
 
30
-
31
- When I right click node "./test.txt"
34
+ When I right click the node with path "./folder/subfolder/ruby.txt"
32
35
  And I follow "Delete node"
33
36
  Then I should see dialog box titled "Confirm"
34
- When I press "Yes"
35
- Then I should have no open tabs
36
-
37
+
38
+ When I press "Yes" within the dialog box
39
+ Then I should not see the node titled "ruby"
40
+ And I should have no open tabs
41
+ And I should see page title "Rwiki"
@@ -1,28 +1,27 @@
1
1
  Feature: Display a page
2
2
 
3
3
  Background:
4
- Given I go to the home page
5
- And I wait for ajax call complete
4
+ Given I open the application
6
5
 
7
6
  @javascript
8
7
  Scenario: Display the home.txt page
9
- When I click node "./home.txt"
10
- And I wait for ajax call complete
8
+ When I click the node with path "./home.txt"
11
9
 
12
10
  Then I should have the following open tabs:
13
11
  | home |
12
+ And I should see page title "Rwiki ./home.txt"
14
13
  And I should see "Sample page" within "h1"
15
14
  And I should see "Lorem ipsum.."
16
15
  And I should see "Sample section" within "h2"
17
16
 
18
17
  @javascript
19
18
  Scenario: Display the ./folder/test.txt page
20
- When I double click node "./folder"
21
- And I click node "./folder/test.txt"
22
- And I wait for ajax call complete
19
+ When I double click the node with path "./folder"
20
+ And I click the node with path "./folder/test.txt"
23
21
 
24
22
  Then I should have the following open tabs:
25
23
  | test |
24
+ And I should see page title "Rwiki ./folder/test.txt"
26
25
  And I should see "Test 1" within "h3"
27
26
  And I should see "Item one"
28
27
  And I should see "Item two"
@@ -31,11 +30,11 @@ Feature: Display a page
31
30
 
32
31
  @javascript
33
32
  Scenario: Display the several page
34
- When I click node "./home.txt"
35
- And I double click node "./folder"
36
- And I click node "./folder/test.txt"
37
- And I wait for ajax call complete
33
+ When I click the node with path "./home.txt"
34
+ And I double click the node with path "./folder"
35
+ And I click the node with path "./folder/test.txt"
38
36
 
39
37
  Then I should have the following open tabs:
40
38
  | home |
41
39
  | test |
40
+ And I should see page title "Rwiki ./folder/test.txt"
@@ -0,0 +1,45 @@
1
+ Feature: Editing a page
2
+
3
+ Background:
4
+ Given I open the application
5
+
6
+ @javascript
7
+ Scenario: Invoke the editor window
8
+ When I click the node with path "./home.txt"
9
+ And I press "Edit the page"
10
+ Then I should see the window titled "Editing page ./home.txt"
11
+
12
+ @javascript
13
+ Scenario: Edit and save the page
14
+ When I click the node with path "./home.txt"
15
+ And I press "Edit the page"
16
+ Then I should see the window titled "Editing page ./home.txt"
17
+
18
+ When I fill in "editor" with "h1. A new page header"
19
+ And I press "Save"
20
+ Then I should not see the window
21
+ And I should see "A new page header" within "h1"
22
+
23
+ When I reload the application
24
+ Then I should see "A new page header" within "h1"
25
+
26
+ @javascript
27
+ Scenario: Edit and Save and continue
28
+ When I click the node with path "./home.txt"
29
+ And I press "Edit the page"
30
+ Then I should see the window titled "Editing page ./home.txt"
31
+
32
+ When I fill in "editor" with "h1. A new page header"
33
+ And I press "Save and continue"
34
+ Then I should see "A new page header" within "h1"
35
+
36
+
37
+ @javascript
38
+ Scenario: Edit and Cancel
39
+ When I click the node with path "./home.txt"
40
+ And I press "Edit the page"
41
+ Then I should see the window titled "Editing page ./home.txt"
42
+
43
+ When I fill in "editor" with "h1. A new page header"
44
+ And I press "Cancel"
45
+ Then I should see "Sample page" within "h1"
@@ -0,0 +1,46 @@
1
+ Feature: History
2
+
3
+ Background:
4
+ Given I open the application
5
+
6
+ @javascript
7
+ Scenario: Open page with path given in the url
8
+ When I open the application for page with path "./home.txt"
9
+
10
+ Then I should have the following open tabs:
11
+ | home |
12
+ And the node with path "./home.txt" should be selected
13
+ Then I should see "Sample page" within "h1"
14
+
15
+ @javascript
16
+ Scenario: After reload the application last opened page should be loaded
17
+ When I double click the node with path "./folder"
18
+ And I click the node with path "./folder/test.txt"
19
+ And I reload the application
20
+
21
+ Then I should have the following open tabs:
22
+ | test |
23
+ And I should see page title "Rwiki ./folder/test.txt"
24
+ And I should see "Test 1" within "h3"
25
+ And the node with path "./folder/test.txt" should be selected
26
+
27
+ @javascript
28
+ Scenario: Browser history
29
+ When I double click the node with path "./folder"
30
+ And I click the node with path "./folder/test.txt"
31
+ And I click the node with path "./test.txt"
32
+ And I click the node with path "./home.txt"
33
+
34
+ When I press the browser back button
35
+ Then the node with path "./test.txt" should be selected
36
+
37
+ When I press the browser back button
38
+ Then the node with path "./folder/test.txt" should be selected
39
+
40
+ When I press the browser forward button
41
+ Then the node with path "./test.txt" should be selected
42
+
43
+ When I create a new page title "A new page" for the node with path "./Info"
44
+ And I press the browser back button
45
+ And I press the browser forward button
46
+ Then the node with path "./Info/A new page.txt" should be selected