rwiki 0.1.3 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Capfile +2 -0
- data/Gemfile +30 -0
- data/Rakefile +22 -65
- data/VERSION +1 -1
- data/config.ru +11 -0
- data/config/config.yml.example +1 -0
- data/config/deploy.rb +37 -0
- data/features/create_page.feature +30 -20
- data/features/delete_page.feature +23 -18
- data/features/display_page.feature +10 -11
- data/features/editor.feature +45 -0
- data/features/history.feature +46 -0
- data/features/rename_page.feature +42 -37
- data/features/step_definitions/common_steps.rb +19 -47
- data/features/step_definitions/common_transforms.rb +5 -0
- data/features/step_definitions/dialog_box_steps.rb +16 -0
- data/features/step_definitions/history_steps.rb +11 -0
- data/features/step_definitions/tab_panel_steps.rb +27 -0
- data/features/step_definitions/tree_panel_steps.rb +42 -0
- data/features/step_definitions/wait_steps.rb +21 -0
- data/features/support/env.rb +6 -0
- data/features/tab_panel.feature +47 -0
- data/features/tree_panel.feature +14 -15
- data/lib/rwiki.rb +1 -0
- data/lib/rwiki/app.rb +14 -2
- data/lib/rwiki/models/folder.rb +1 -1
- data/lib/rwiki/models/node.rb +11 -1
- data/lib/rwiki/models/page.rb +1 -1
- data/public/favicon.ico +0 -0
- data/public/images/compressed.png +0 -0
- data/public/images/css.png +0 -0
- data/public/images/file.png +0 -0
- data/public/images/html.png +0 -0
- data/public/images/icon_word.png +0 -0
- data/public/images/image.png +0 -0
- data/public/images/javascript.png +0 -0
- data/public/images/pdf.png +0 -0
- data/public/images/php.png +0 -0
- data/public/images/presentation.png +0 -0
- data/public/images/ruby.png +0 -0
- data/public/images/shellscript.png +0 -0
- data/public/images/stylesheet.png +0 -0
- data/public/images/text.png +0 -0
- data/public/images/wordprocessing.png +0 -0
- data/public/javascripts/Rwiki.js +71 -29
- data/public/javascripts/Rwiki/EditorPanel.js +5 -37
- data/public/javascripts/Rwiki/EditorPanel/Editor.js +8 -44
- data/public/javascripts/Rwiki/EditorWindow.js +66 -0
- data/public/javascripts/Rwiki/FuzzyFinderDialog.js +61 -0
- data/public/javascripts/Rwiki/NavigationPanel.js +25 -0
- data/public/javascripts/Rwiki/NodeManager.js +2 -0
- data/public/javascripts/Rwiki/TabPanel.js +39 -2
- data/public/javascripts/Rwiki/TreePanel.js +39 -26
- data/public/javascripts/Rwiki/TreePanel/Menu.js +1 -1
- data/public/javascripts/Rwiki/TreePanel/Node.js +46 -0
- data/public/javascripts/vendor/ext/adapter/ext/ext-base-debug.js +836 -710
- data/public/javascripts/vendor/ext/adapter/ext/ext-base.js +5 -5
- data/public/javascripts/vendor/ext/adapter/jquery/ext-jquery-adapter-debug.js +47 -700
- data/public/javascripts/vendor/ext/adapter/jquery/ext-jquery-adapter.js +5 -5
- data/public/javascripts/vendor/ext/adapter/prototype/ext-prototype-adapter-debug.js +45 -698
- data/public/javascripts/vendor/ext/adapter/prototype/ext-prototype-adapter.js +5 -5
- data/public/javascripts/vendor/ext/adapter/yui/ext-yui-adapter-debug.js +39 -696
- data/public/javascripts/vendor/ext/adapter/yui/ext-yui-adapter.js +5 -5
- data/public/javascripts/vendor/ext/ext-all-debug-w-comments.js +17932 -12860
- data/public/javascripts/vendor/ext/ext-all-debug.js +11674 -8102
- data/public/javascripts/vendor/ext/ext-all.js +6 -6
- data/public/javascripts/vendor/ext/ux/StatusBar.js +418 -0
- data/public/resources/ext/charts.swf +0 -0
- data/public/resources/ext/css/debug.css +4 -4
- data/public/resources/ext/css/ext-all-notheme.css +204 -52
- data/public/resources/ext/css/ext-all.css +234 -54
- data/public/resources/ext/css/reset-min.css +4 -4
- data/public/resources/ext/css/structure/borders.css +4 -4
- data/public/resources/ext/css/structure/box.css +4 -4
- data/public/resources/ext/css/structure/button.css +7 -7
- data/public/resources/ext/css/structure/combo.css +4 -4
- data/public/resources/ext/css/structure/core.css +15 -5
- data/public/resources/ext/css/structure/date-picker.css +4 -4
- data/public/resources/ext/css/structure/dd.css +4 -4
- data/public/resources/ext/css/structure/debug.css +4 -4
- data/public/resources/ext/css/structure/dialog.css +6 -9
- data/public/resources/ext/css/structure/editor.css +4 -4
- data/public/resources/ext/css/structure/form.css +14 -4
- data/public/resources/ext/css/structure/grid.css +15 -5
- data/public/resources/ext/css/structure/layout.css +7 -7
- data/public/resources/ext/css/structure/list-view.css +4 -4
- data/public/resources/ext/css/structure/menu.css +13 -6
- data/public/resources/ext/css/structure/panel-reset.css +4 -4
- data/public/resources/ext/css/structure/panel.css +70 -22
- data/public/resources/ext/css/structure/pivotgrid.css +65 -0
- data/public/resources/ext/css/structure/progress.css +4 -4
- data/public/resources/ext/css/structure/qtips.css +4 -4
- data/public/resources/ext/css/structure/reset.css +11 -5
- data/public/resources/ext/css/structure/resizable.css +4 -4
- data/public/resources/ext/css/structure/slider.css +4 -4
- data/public/resources/ext/css/structure/tabs.css +13 -8
- data/public/resources/ext/css/structure/toolbar.css +5 -5
- data/public/resources/ext/css/structure/tree.css +11 -11
- data/public/resources/ext/css/structure/window.css +5 -5
- data/public/resources/ext/css/theme-access/borders.css +4 -4
- data/public/resources/ext/css/theme-access/box.css +4 -4
- data/public/resources/ext/css/theme-access/button.css +4 -4
- data/public/resources/ext/css/theme-access/combo.css +4 -4
- data/public/resources/ext/css/theme-access/core.css +4 -4
- data/public/resources/ext/css/theme-access/date-picker.css +4 -4
- data/public/resources/ext/css/theme-access/dd.css +4 -4
- data/public/resources/ext/css/theme-access/debug.css +4 -4
- data/public/resources/ext/css/theme-access/dialog.css +4 -4
- data/public/resources/ext/css/theme-access/editor.css +4 -4
- data/public/resources/ext/css/theme-access/form.css +4 -4
- data/public/resources/ext/css/theme-access/grid.css +4 -4
- data/public/resources/ext/css/theme-access/layout.css +4 -4
- data/public/resources/ext/css/theme-access/list-view.css +8 -4
- data/public/resources/ext/css/theme-access/menu.css +4 -4
- data/public/resources/ext/css/theme-access/panel.css +4 -4
- data/public/resources/ext/css/theme-access/progress.css +4 -4
- data/public/resources/ext/css/theme-access/qtips.css +4 -4
- data/public/resources/ext/css/theme-access/resizable.css +4 -4
- data/public/resources/ext/css/theme-access/slider.css +4 -4
- data/public/resources/ext/css/theme-access/tabs.css +4 -4
- data/public/resources/ext/css/theme-access/toolbar.css +4 -4
- data/public/resources/ext/css/theme-access/tree.css +4 -4
- data/public/resources/ext/css/theme-access/window.css +5 -5
- data/public/resources/ext/css/theme-gray/borders.css +4 -4
- data/public/resources/ext/css/theme-gray/box.css +4 -4
- data/public/resources/ext/css/theme-gray/button.css +4 -4
- data/public/resources/ext/css/theme-gray/combo.css +4 -4
- data/public/resources/ext/css/theme-gray/core.css +6 -4
- data/public/resources/ext/css/theme-gray/date-picker.css +4 -4
- data/public/resources/ext/css/theme-gray/dd.css +4 -4
- data/public/resources/ext/css/theme-gray/debug.css +4 -4
- data/public/resources/ext/css/theme-gray/dialog.css +4 -4
- data/public/resources/ext/css/theme-gray/editor.css +4 -4
- data/public/resources/ext/css/theme-gray/form.css +4 -4
- data/public/resources/ext/css/theme-gray/grid.css +10 -6
- data/public/resources/ext/css/theme-gray/layout.css +4 -4
- data/public/resources/ext/css/theme-gray/list-view.css +5 -5
- data/public/resources/ext/css/theme-gray/menu.css +4 -4
- data/public/resources/ext/css/theme-gray/panel.css +4 -4
- data/public/resources/ext/css/theme-gray/pivotgrid.css +28 -0
- data/public/resources/ext/css/theme-gray/progress.css +4 -4
- data/public/resources/ext/css/theme-gray/qtips.css +4 -4
- data/public/resources/ext/css/theme-gray/resizable.css +4 -4
- data/public/resources/ext/css/theme-gray/slider.css +4 -4
- data/public/resources/ext/css/theme-gray/tabs.css +4 -4
- data/public/resources/ext/css/theme-gray/toolbar.css +4 -4
- data/public/resources/ext/css/theme-gray/tree.css +4 -4
- data/public/resources/ext/css/theme-gray/window.css +4 -4
- data/public/resources/ext/css/visual/borders.css +4 -4
- data/public/resources/ext/css/visual/box.css +4 -4
- data/public/resources/ext/css/visual/button.css +4 -4
- data/public/resources/ext/css/visual/combo.css +4 -4
- data/public/resources/ext/css/visual/core.css +6 -4
- data/public/resources/ext/css/visual/date-picker.css +4 -4
- data/public/resources/ext/css/visual/dd.css +4 -4
- data/public/resources/ext/css/visual/debug.css +4 -4
- data/public/resources/ext/css/visual/dialog.css +4 -4
- data/public/resources/ext/css/visual/editor.css +4 -4
- data/public/resources/ext/css/visual/form.css +4 -4
- data/public/resources/ext/css/visual/grid.css +8 -4
- data/public/resources/ext/css/visual/layout.css +4 -4
- data/public/resources/ext/css/visual/list-view.css +4 -4
- data/public/resources/ext/css/visual/menu.css +4 -4
- data/public/resources/ext/css/visual/panel.css +4 -4
- data/public/resources/ext/css/visual/pivotgrid.css +28 -0
- data/public/resources/ext/css/visual/progress.css +4 -4
- data/public/resources/ext/css/visual/qtips.css +4 -4
- data/public/resources/ext/css/visual/resizable.css +4 -4
- data/public/resources/ext/css/visual/slider.css +4 -4
- data/public/resources/ext/css/visual/tabs.css +4 -4
- data/public/resources/ext/css/visual/toolbar.css +5 -5
- data/public/resources/ext/css/visual/tree.css +4 -4
- data/public/resources/ext/css/visual/window.css +4 -4
- data/public/resources/ext/css/xtheme-access.css +9 -5
- data/public/resources/ext/css/xtheme-blue.css +34 -6
- data/public/resources/ext/css/xtheme-gray.css +35 -7
- data/public/resources/ext/css/yourtheme.css +11 -5
- data/public/resources/ext/images/access/panel/tool-sprites.gif +0 -0
- data/public/resources/ext/images/default/grid/grid3-rowheader.gif +0 -0
- data/public/resources/ext/images/default/grid/refresh-disabled.gif +0 -0
- data/public/resources/ext/images/default/panel/tool-sprites.gif +0 -0
- data/public/resources/ext/images/gray/grid/sort-hd.gif +0 -0
- data/public/resources/ext/images/gray/panel/tool-sprites.gif +0 -0
- data/public/resources/ext/images/gray/window/left-corners.png +0 -0
- data/public/resources/ext/images/gray/window/left-right.png +0 -0
- data/public/resources/ext/images/gray/window/right-corners.png +0 -0
- data/public/resources/ext/images/gray/window/top-bottom.png +0 -0
- data/public/stylesheets/coderay.css +3 -0
- data/public/stylesheets/markitup.css +19 -0
- data/public/stylesheets/style.css +1 -1
- data/run_tests.sh +1 -0
- data/rwiki.gemspec +56 -37
- data/test/fixtures/pages/Info/dummy +0 -0
- data/test/rwiki/models/test_folder.rb +4 -4
- data/vendor/.gitkeep +0 -0
- data/views/layout.erb +13 -5
- metadata +78 -69
- data/.idea/projectCodeStyle.xml +0 -80
- data/.rvmrc +0 -1
- data/public/javascripts/Rwiki/SidePanel.js +0 -26
- data/public/javascripts/Rwiki/Toolbar.js +0 -31
- data/public/javascripts/Rwiki/Viewport.js +0 -10
- data/tmp/ExtDesigner/MyViewport.js +0 -18
- data/tmp/ExtDesigner/MyViewport.ui.js +0 -29
- data/tmp/ExtDesigner/Rwiki.EditorPanel.js +0 -19
- data/tmp/ExtDesigner/Rwiki.EditorPanel.ui.js +0 -27
- data/tmp/ExtDesigner/Rwiki.MainPanel.js +0 -19
- data/tmp/ExtDesigner/Rwiki.MainPanel.ui.js +0 -29
- data/tmp/ExtDesigner/Rwiki.TabPane.PageTab.js +0 -19
- data/tmp/ExtDesigner/Rwiki.TabPane.PageTab.ui.js +0 -19
- data/tmp/ExtDesigner/Rwiki.TabPanel.js +0 -19
- data/tmp/ExtDesigner/Rwiki.TabPanel.ui.js +0 -27
- data/tmp/ExtDesigner/Rwiki.TreePanel.js +0 -19
- data/tmp/ExtDesigner/Rwiki.TreePanel.ui.js +0 -27
- data/tmp/ExtDesigner/Rwiki.Viewport.js +0 -18
- data/tmp/ExtDesigner/Rwiki.Viewport.ui.js +0 -30
- data/tmp/ExtDesigner/rwiki.xds +0 -192
- data/tmp/ExtDesigner/xds_includeOrder.txt +0 -12
- data/tmp/ExtDesigner/xds_index.html +0 -26
- data/tmp/ExtDesigner/xds_index.js +0 -19
data/Capfile
ADDED
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 '
|
4
|
+
require 'bundler'
|
5
5
|
|
6
6
|
begin
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
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
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
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
|
-
|
59
|
-
|
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
|
41
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
78
42
|
|
79
43
|
rdoc.rdoc_dir = 'rdoc'
|
80
|
-
rdoc.title
|
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
|
1
|
+
0.2.1
|
data/config.ru
ADDED
@@ -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
|
data/config/deploy.rb
ADDED
@@ -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
|
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
|
14
|
-
And press "OK"
|
15
|
-
|
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
|
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
|
30
|
-
And press "OK"
|
31
|
-
|
32
|
-
|
33
|
-
|
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
|
43
|
-
And press "OK"
|
44
|
-
|
45
|
-
|
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
|
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
|
-
|
16
|
-
|
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 "./
|
22
|
-
And I
|
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
|
28
|
-
|
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
|
-
|
35
|
-
|
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
|
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
|