netzke-basepack 0.6.5 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. data/CHANGELOG.rdoc +7 -4
  2. data/README.md +63 -0
  3. data/Rakefile +4 -4
  4. data/javascripts/basepack.js +113 -133
  5. data/lib/netzke-basepack.rb +9 -2
  6. data/lib/netzke/basepack.rb +9 -6
  7. data/lib/netzke/basepack/accordion_panel.rb +1 -1
  8. data/lib/netzke/basepack/auth_app.rb +28 -21
  9. data/lib/netzke/basepack/border_layout_panel.rb +9 -57
  10. data/lib/netzke/basepack/border_layout_panel/javascripts/border_layout_panel.js +40 -0
  11. data/lib/netzke/basepack/data_accessor.rb +3 -5
  12. data/lib/netzke/basepack/form_panel.rb +55 -52
  13. data/lib/netzke/basepack/form_panel/fields.rb +4 -2
  14. data/lib/netzke/basepack/form_panel/javascripts/comma_list_cbg.js +13 -28
  15. data/lib/netzke/basepack/form_panel/javascripts/form_panel.js +61 -34
  16. data/lib/netzke/basepack/form_panel/javascripts/n_radio_group.js +4 -3
  17. data/lib/netzke/basepack/form_panel/javascripts/readonly_mode.js +10 -10
  18. data/lib/netzke/basepack/form_panel/services.rb +1 -1
  19. data/lib/netzke/basepack/grid_panel.rb +23 -17
  20. data/lib/netzke/basepack/grid_panel/columns.rb +116 -71
  21. data/lib/netzke/basepack/grid_panel/javascripts/advanced_search.js +5 -7
  22. data/lib/netzke/basepack/grid_panel/javascripts/check_column_fix.js +6 -0
  23. data/lib/netzke/basepack/grid_panel/javascripts/edit_in_form.js +18 -15
  24. data/lib/netzke/basepack/grid_panel/javascripts/event_handling.js +178 -0
  25. data/lib/netzke/basepack/grid_panel/javascripts/grid_panel.js +230 -454
  26. data/lib/netzke/basepack/grid_panel/javascripts/rows-dd.js +1 -0
  27. data/lib/netzke/basepack/grid_panel/record_form_window.rb +8 -8
  28. data/lib/netzke/basepack/grid_panel/services.rb +12 -15
  29. data/lib/netzke/basepack/paging_form_panel.rb +1 -82
  30. data/lib/netzke/basepack/paging_form_panel/javascripts/paging_form_panel.js +76 -0
  31. data/lib/netzke/basepack/query_builder.rb +4 -4
  32. data/lib/netzke/basepack/query_builder/javascripts/query_builder.js +7 -4
  33. data/lib/netzke/basepack/search_panel.rb +1 -1
  34. data/lib/netzke/basepack/search_panel/javascripts/condition_field.js +27 -20
  35. data/lib/netzke/basepack/search_panel/javascripts/search_panel.js +4 -4
  36. data/lib/netzke/basepack/search_window.rb +4 -4
  37. data/lib/netzke/basepack/simple_app.rb +36 -8
  38. data/lib/netzke/basepack/simple_app/javascripts/simple_app.js +27 -16
  39. data/lib/netzke/basepack/tab_panel/javascripts/tab_panel.js +1 -1
  40. data/lib/netzke/basepack/version.rb +2 -2
  41. data/lib/netzke/basepack/window.rb +2 -45
  42. data/lib/netzke/basepack/window/javascripts/window.js +18 -0
  43. data/lib/netzke/basepack/wrap_lazy_loaded.rb +1 -1
  44. data/locales/de.yml +79 -0
  45. data/locales/en.yml +0 -10
  46. data/netzke-basepack.gemspec +32 -19
  47. data/stylesheets/basepack.css +16 -16
  48. data/test/rails_app/.gitignore +1 -0
  49. data/test/rails_app/Gemfile +9 -5
  50. data/test/rails_app/Gemfile.lock +51 -49
  51. data/test/rails_app/app/components/author_form.rb +32 -0
  52. data/test/rails_app/app/components/book_form.rb +6 -4
  53. data/test/rails_app/app/components/book_grid.rb +4 -3
  54. data/test/rails_app/app/components/book_grid_loader.rb +2 -2
  55. data/test/rails_app/app/components/book_grid_with_custom_columns.rb +11 -5
  56. data/test/rails_app/app/components/book_grid_with_default_values.rb +1 -1
  57. data/test/rails_app/app/components/book_grid_with_extra_feedback.rb +11 -0
  58. data/test/rails_app/app/components/book_grid_with_extra_filters.rb +14 -0
  59. data/test/rails_app/app/components/book_grid_with_paging.rb +10 -0
  60. data/test/rails_app/app/components/book_grid_with_persistence.rb +6 -0
  61. data/test/rails_app/app/components/book_paging_form_panel.rb +3 -3
  62. data/test/rails_app/app/components/book_with_custom_primary_key_grid.rb +10 -0
  63. data/test/rails_app/app/components/form_without_model.rb +5 -4
  64. data/test/rails_app/app/components/paging_form_with_search.rb +3 -2
  65. data/test/rails_app/app/components/some_auth_app.rb +3 -3
  66. data/test/rails_app/app/components/some_border_layout.rb +2 -2
  67. data/test/rails_app/app/components/some_simple_app.rb +6 -5
  68. data/test/rails_app/app/components/window_component_loader.rb +11 -2
  69. data/test/rails_app/app/controllers/components_controller.rb +1 -1
  70. data/test/rails_app/app/models/book_with_custom_primary_key.rb +4 -0
  71. data/test/rails_app/config/initializers/netzke.rb +6 -0
  72. data/test/rails_app/config/locales/es.yml +0 -10
  73. data/test/rails_app/db/migrate/20110701070052_create_book_with_custom_primary_keys.rb +15 -0
  74. data/test/rails_app/db/schema.rb +12 -2
  75. data/test/rails_app/db/seeds.rb +21 -1
  76. data/test/rails_app/features/form_panel.feature +17 -17
  77. data/test/rails_app/features/grid_panel.feature +20 -4
  78. data/test/rails_app/features/grid_panel_with_custom_primary_key.feature +15 -0
  79. data/test/rails_app/features/paging_form_panel.feature +14 -0
  80. data/test/rails_app/features/search_in_grid.feature +2 -1
  81. data/test/rails_app/features/simple_app.feature +5 -0
  82. data/test/rails_app/features/step_definitions/accordion_steps.rb +1 -5
  83. data/test/rails_app/features/step_definitions/ext_steps.rb +16 -0
  84. data/test/rails_app/features/step_definitions/form_panel_steps.rb +10 -12
  85. data/test/rails_app/features/step_definitions/generic_steps.rb +12 -4
  86. data/test/rails_app/features/step_definitions/grid_panel_steps.rb +47 -32
  87. data/test/rails_app/features/tab_panel.feature +2 -2
  88. data/test/rails_app/spec/factories.rb +4 -0
  89. metadata +26 -13
  90. data/README.rdoc +0 -67
  91. data/from_05_to_06.rdoc +0 -2
  92. data/javascripts/feedback_ghost.js +0 -34
  93. data/test/rails_app/public/netzke/basepack/ts-checkbox.gif +0 -0
@@ -0,0 +1,10 @@
1
+ class BookGridWithPaging < Netzke::Basepack::GridPanel
2
+ js_property :title, "Books with paging"
3
+
4
+ def default_config
5
+ super.merge(
6
+ :model => "Book",
7
+ :rows_per_page => 2
8
+ )
9
+ end
10
+ end
@@ -0,0 +1,6 @@
1
+ class BookGridWithPersistence < BookGrid
2
+
3
+ def default_config
4
+ super.merge :persistence => true
5
+ end
6
+ end
@@ -8,15 +8,15 @@ class BookPagingFormPanel < Netzke::Basepack::PagingFormPanel
8
8
  :mode => :lockable,
9
9
  :items => [{:layout => :hbox, :label_align => :top, :border => false, :defaults => {:border => false}, :items => [{
10
10
  :flex => 2,
11
- :layout => :form,
11
+ :layout => :anchor,
12
12
  :defaults => {:anchor => "-8"},
13
13
  :items => [:title, :notes, :digitized, :created_at, :updated_at]
14
14
  },{
15
15
  :flex => 1,
16
- :layout => :form,
16
+ :layout => :anchor,
17
17
  :defaults => {:anchor => "-8"},
18
18
  :items => [:author__name, {:name => :author__first_name, :read_only => true}, :exemplars]
19
19
  }]}]
20
20
  })
21
21
  end
22
- end
22
+ end
@@ -0,0 +1,10 @@
1
+ class BookWithCustomPrimaryKeyGrid < Netzke::Basepack::GridPanel
2
+
3
+ js_property :title, "Books (model with non-standard id)"
4
+
5
+ def default_config
6
+ super.merge(
7
+ :model => "BookWithCustomPrimaryKey"
8
+ )
9
+ end
10
+ end
@@ -1,20 +1,21 @@
1
1
  class FormWithoutModel < Netzke::Basepack::FormPanel
2
2
  def configuration
3
3
  super.merge(
4
- :file_upload => true,
4
+ # :file_upload => true, # incompatible
5
5
  :items => [
6
6
  :text_field,
7
7
  {:name => :number_field, :attr_type => :integer},
8
8
  {:name => :boolean_field, :attr_type => :boolean, :input_value => true},
9
9
  {:name => :date_field, :attr_type => :date},
10
- {:name => :datetime_field, :attr_type => :datetime},
10
+ # {:name => :datetime_field, :attr_type => :datetime}, #incompatible: no xtype
11
11
  {:name => :combobox_field, :xtype => :combo, :store => [[1, "One"], [2, "Two"], [3, "Three"]]},
12
+ {:name => :time_field, :attr_type => :time },
12
13
  ]
13
- )
14
+ )
14
15
  end
15
16
 
16
17
  def netzke_submit_endpoint(params)
17
18
  data = ActiveSupport::JSON.decode(params[:data])
18
- {:feedback => data.each_pair.map{ |k,v| "#{k.humanize}: #{v}" }.join("<br/>")}
19
+ {:netzke_feedback => data.each_pair.map{ |k,v| "#{k.humanize}: #{v}" }.join("<br/>")}
19
20
  end
20
21
  end
@@ -1,3 +1,4 @@
1
+ # OUTDATED
1
2
  class PagingFormWithSearch < Netzke::Basepack::BorderLayoutPanel
2
3
  def default_config
3
4
  super.tap do |s|
@@ -21,13 +22,13 @@ class PagingFormWithSearch < Netzke::Basepack::BorderLayoutPanel
21
22
  :class_name => "Netzke::Basepack::SearchPanel",
22
23
  :model => config[:model],
23
24
  :bbar => [:apply.action],
24
- :query => []
25
+ :preset_query => []
25
26
  }
26
27
  end
27
28
 
28
29
  js_method :init_component, <<-JS
29
30
  function(){
30
- Netzke.classes.PagingFormWithSearch.superclass.initComponent.call(this);
31
+ this.callParent();
31
32
 
32
33
  this.getChildComponent('search_panel').on('conditionsupdate', function(query){
33
34
  this.getChildComponent('paging_form_panel').getStore().baseParams.query = Ext.encode(query);
@@ -3,9 +3,9 @@ class SomeAuthApp < Netzke::Basepack::AuthApp
3
3
  [:simple_accordion.action, :user_grid.action, :simple_tab_panel.action] + super
4
4
  end
5
5
 
6
- action :simple_accordion, :icon => :application_tile_vertical, :handler => :load_component_by_action
7
- action :user_grid, :icon => :table, :handler => :load_component_by_action
8
- action :simple_tab_panel, :icon => :table_multiple, :handler => :load_component_by_action
6
+ action :simple_accordion, :icon => :application_tile_vertical, :handler => :load_netzke_component_by_action
7
+ action :user_grid, :icon => :table, :handler => :load_netzke_component_by_action
8
+ action :simple_tab_panel, :icon => :table_multiple, :handler => :load_netzke_component_by_action
9
9
 
10
10
  component :user_grid
11
11
  component :simple_accordion
@@ -15,13 +15,13 @@ class SomeBorderLayout < Netzke::Basepack::BorderLayoutPanel
15
15
 
16
16
  js_method :on_update_west_region, <<-JS
17
17
  function(){
18
- this.getChildComponent('user_grid').body.update('Updated West Region Content');
18
+ this.child('component[name="user_grid"]').body.update('Updated West Region Content');
19
19
  }
20
20
  JS
21
21
 
22
22
  js_method :on_update_center_region, <<-JS
23
23
  function(){
24
- this.getChildComponent('role_grid').body.update('Updated Center Region Content');
24
+ this.child('component[name="role_grid"]').body.update('Updated Center Region Content');
25
25
  }
26
26
  JS
27
27
 
@@ -3,9 +3,9 @@ class SomeSimpleApp < Netzke::Basepack::SimpleApp
3
3
  [:simple_accordion.action, :user_grid.action, :simple_tab_panel.action] + super
4
4
  end
5
5
 
6
- action :simple_accordion, :icon => :application_tile_vertical, :handler => :load_component_by_action
7
- action :user_grid, :icon => :table, :handler => :load_component_by_action
8
- action :simple_tab_panel, :icon => :table_multiple, :handler => :load_component_by_action
6
+ action :simple_accordion, :icon => :application_tile_vertical, :handler => :load_netzke_component_by_action
7
+ action :user_grid, :icon => :table, :handler => :load_netzke_component_by_action
8
+ action :simple_tab_panel, :icon => :table_multiple, :handler => :load_netzke_component_by_action
9
9
 
10
10
  component :user_grid
11
11
  component :simple_accordion
@@ -23,8 +23,9 @@ class SomeSimpleApp < Netzke::Basepack::SimpleApp
23
23
  <div style="margin:10px; color:#333; text-align:center; font-family: Helvetica;">
24
24
  Simple <span style="color:#B32D15">Netzke</span> app
25
25
  </div>
26
- },
27
- :bodyStyle => {"background" => "#FFF url(\"/images/header-deco.gif\") top left repeat-x"}
26
+ }
27
+ # TODO: this has no effect anymore:
28
+ # :bodyStyle => {:background => "#AAA url(\"/images/header-deco.gif\") top left repeat-x"}
28
29
  },{
29
30
  :region => :center,
30
31
  :layout => 'border',
@@ -3,7 +3,14 @@ class WindowComponentLoader < Netzke::Base
3
3
  :persistence => true,
4
4
  :class_name => "Basepack::Window",
5
5
  :title => "Some Window Component",
6
- :lazy_loading => true
6
+ :lazy_loading => true,
7
+ :width => 400,
8
+ :height => 300,
9
+ :modal => true,
10
+ :items => [{
11
+ :class_name => "Netzke::Basepack::GridPanel",
12
+ :model => "User"
13
+ }]
7
14
  }
8
15
 
9
16
  action :load_window
@@ -12,7 +19,9 @@ class WindowComponentLoader < Netzke::Base
12
19
 
13
20
  js_method :on_load_window, <<-JS
14
21
  function(params){
15
- this.loadComponent({name: "some_window"});
22
+ this.loadNetzkeComponent({name: "some_window", callback: function(w){
23
+ w.show();
24
+ }});
16
25
  }
17
26
  JS
18
27
  end
@@ -1,6 +1,6 @@
1
1
  class ComponentsController < ApplicationController
2
2
  def index
3
3
  component_name = params[:component].gsub("::", "_").underscore
4
- render :inline => "<%= netzke :#{component_name}, :class_name => '#{params[:component]}' %>", :layout => true
4
+ render :inline => "<%= netzke :#{component_name}, :class_name => '#{params[:component]}', :height => 400 %>", :layout => true
5
5
  end
6
6
  end
@@ -0,0 +1,4 @@
1
+ class BookWithCustomPrimaryKey < ActiveRecord::Base
2
+ set_primary_key 'uid'
3
+ belongs_to :author
4
+ end
@@ -1,3 +1,9 @@
1
1
  Netzke::Basepack.setup do |config|
2
2
  # config.icons_uri = "/images/icons"
3
3
  end
4
+
5
+ Netzke::Core.setup do |config|
6
+ config.ext_uri = "/extjs4"
7
+ # config.ext3_compat_uri = "/extjs-compatibility"
8
+ config.js_direct_max_retries = 0
9
+ end
@@ -23,16 +23,6 @@ es:
23
23
  deleted_n_records: "%{n} entrada(s) borrado"
24
24
  cannot_delete: "No se puede borrar"
25
25
 
26
- empty_msg: Vacio
27
- first_text: Primer pagina
28
- prev_text: Anterior pagina
29
- next_text: Siguiente pagina
30
- last_text: Última pagina
31
- before_page_text: Pagina
32
- after_page_text: "de {0}"
33
- refresh_text: Bajar de nuevo
34
- display_msg: "Mostrando {0} - {1} de {2}"
35
-
36
26
  search_window:
37
27
  title: Busqueda avanzada
38
28
  actions:
@@ -0,0 +1,15 @@
1
+ class CreateBookWithCustomPrimaryKeys < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :book_with_custom_primary_keys, :primary_key => :uid do |t|
4
+ t.integer :uid
5
+ t.string :title
6
+ t.integer :author_id
7
+
8
+ t.timestamps
9
+ end
10
+ end
11
+
12
+ def self.down
13
+ drop_table :book_with_custom_primary_keys
14
+ end
15
+ end
@@ -10,7 +10,7 @@
10
10
  #
11
11
  # It's strongly recommended to check this file into your version control system.
12
12
 
13
- ActiveRecord::Schema.define(:version => 20110213213050) do
13
+ ActiveRecord::Schema.define(:version => 20110701070052) do
14
14
 
15
15
  create_table "addresses", :force => true do |t|
16
16
  t.integer "user_id"
@@ -29,11 +29,18 @@ ActiveRecord::Schema.define(:version => 20110213213050) do
29
29
  t.datetime "updated_at"
30
30
  end
31
31
 
32
+ create_table "book_with_custom_primary_keys", :primary_key => "uid", :force => true do |t|
33
+ t.string "title"
34
+ t.integer "author_id"
35
+ t.datetime "created_at"
36
+ t.datetime "updated_at"
37
+ end
38
+
32
39
  create_table "books", :force => true do |t|
33
40
  t.integer "author_id"
34
41
  t.string "title"
35
42
  t.integer "exemplars"
36
- t.boolean "digitized"
43
+ t.boolean "digitized", :default => false
37
44
  t.text "notes"
38
45
  t.string "tags"
39
46
  t.integer "rating"
@@ -54,6 +61,9 @@ ActiveRecord::Schema.define(:version => 20110213213050) do
54
61
  add_index "netzke_component_states", ["role_id"], :name => "index_netzke_component_states_on_role_id"
55
62
  add_index "netzke_component_states", ["user_id"], :name => "index_netzke_component_states_on_user_id"
56
63
 
64
+ create_table "netzke_temp_table", :force => true do |t|
65
+ end
66
+
57
67
  create_table "roles", :force => true do |t|
58
68
  t.string "name"
59
69
  t.datetime "created_at"
@@ -6,15 +6,35 @@
6
6
  # cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
7
7
  # Mayor.create(:name => 'Daley', :city => cities.first)
8
8
 
9
- # TODO: replace with faker
9
+ Role.delete_all
10
10
  Role.create([
11
11
  {:name => "writer"},
12
12
  {:name => "reader"}
13
13
  ])
14
14
 
15
+ User.delete_all
15
16
  User.create([
16
17
  {:first_name => "Mark", :last_name => "Twain", :role => Role.find_by_name("writer")},
17
18
  {:first_name => "Carlos", :last_name => "Castaneda", :role => Role.find_by_name("writer")},
18
19
  {:first_name => "Sergei", :last_name => "Kozlov", :role => Role.find_by_name("reader")},
19
20
  {:first_name => "Paul", :last_name => "Schyska", :role => Role.find_by_name("reader")}
21
+ ])
22
+
23
+ Author.delete_all
24
+ Author.create([
25
+ {:first_name => "Carlos", :last_name => "Castaneda"},
26
+ {:first_name => "Herman", :last_name => "Hesse"}
27
+ ])
28
+
29
+ Book.delete_all
30
+
31
+ hesse = Author.find_by_last_name("Hesse")
32
+ castaneda = Author.find_by_last_name("Castaneda")
33
+ Book.create([
34
+ {:title => "Journey to Ixtlan", :author => castaneda},
35
+ {:title => "The Tales of Power", :author => castaneda},
36
+ {:title => "The Art of Dreaming", :author => castaneda},
37
+ {:title => "Steppenwolf", :author => hesse},
38
+ {:title => "Demian", :author => hesse},
39
+ {:title => "Narciss and Goldmund", :author => hesse}
20
40
  ])
@@ -46,7 +46,7 @@ Scenario: FormPanel should be functional without model provided
46
46
  And I fill in "Number field:" with "42"
47
47
  And I expand combobox "Combobox field"
48
48
  And I select "Two" from combobox "Combobox field"
49
- And I check "Boolean field:"
49
+ And I check ext checkbox "Boolean field"
50
50
  And I press "Apply"
51
51
 
52
52
  Then I should see "Text field: Some text"
@@ -60,36 +60,36 @@ Scenario: Checkbox field should work properly
60
60
  And a book exists with author: that author, digitized: false, exemplars: 2, title: "Some Title"
61
61
  When I go to the BookForm test page
62
62
  And I fill in "Exemplars:" with "4"
63
- And I check "Digitized:"
63
+ And I check ext checkbox "Digitized"
64
64
  And I press "Apply"
65
65
  Then I should see "YES"
66
66
  And a book should exist with digitized: true, author: that author, exemplars: 4
67
67
  And a book should not exist with digitized: false, author: that author
68
68
 
69
- @javascript
70
- Scenario: Checkbox group for tags should work properly
71
- Given a book exists with title: "Some Title"
72
- When I go to the BookForm test page
73
- And I check "recommend"
74
- And I check "cool"
75
- And I press "Apply"
76
- And I wait for the response from the server
77
- Then the "cool" checkbox should be checked
78
- And the "recommend" checkbox should be checked
79
- But the "read" checkbox should not be checked
80
- And a book should exist with tags: "cool,recommend"
69
+ # @javascript
70
+ # Scenario: Checkbox group for tags should work properly
71
+ # Given a book exists with title: "Some Title"
72
+ # When I go to the BookForm test page
73
+ # And I check ext checkbox "recommend"
74
+ # And I check ext checkbox "cool"
75
+ # And I press "Apply"
76
+ # And I wait for the response from the server
77
+ # Then ext "cool" checkbox should be checked
78
+ # And ext "recommend" checkbox should be checked
79
+ # But ext "read" checkbox should not be checked
80
+ # And a book should exist with tags: "cool,recommend"
81
81
 
82
82
  @javascript
83
- Scenario: Validations
83
+ Scenario: Validations
84
84
  Given a book exists with title: "Some Title"
85
85
  When I go to the BookForm test page
86
86
  And I fill in "Title:" with ""
87
87
  And I press "Apply"
88
- And I sleep 1 second
88
+ And I wait for the response from the server
89
89
  Then I should see "Title can't be blank"
90
90
  But I should not see "Success!"
91
91
  When I fill in "Title:" with "Not Blank"
92
92
  And I press "Apply"
93
- And I sleep 1 second
93
+ And I wait for the response from the server
94
94
  Then I should not see "Title can't be blank"
95
95
  But I should see "Success!"
@@ -122,22 +122,18 @@ Scenario: Column filters
122
122
  | Getting Things Done | 3 | true | Productivity |
123
123
  When I go to the BookGrid test page
124
124
  And I enable filter on column "exemplars" with value "{gt:6}"
125
- And I sleep 1 second
126
125
  Then the grid should show 1 records
127
126
 
128
127
  When I clear all filters in the grid
129
128
  And I enable filter on column "notes" with value "'read'"
130
- And I sleep 1 second
131
129
  Then the grid should show 2 records
132
130
 
133
131
  When I clear all filters in the grid
134
132
  And I enable filter on column "digitized" with value "false"
135
- And I sleep 1 second
136
133
  Then the grid should show 1 records
137
134
 
138
135
  When I clear all filters in the grid
139
136
  And I enable filter on column "digitized" with value "true"
140
- And I sleep 1 second
141
137
  Then the grid should show 2 records
142
138
 
143
139
  @javascript
@@ -205,6 +201,7 @@ Scenario: Renderers for association columns should take effect
205
201
  And a book exists with title: "Lolita", author: that author
206
202
  When I go to the BookGridWithCustomColumns test page
207
203
  Then I should see "NABOKOV"
204
+ And I should see "*Vladimir*"
208
205
 
209
206
  @javascript
210
207
  Scenario: Reloading grid data
@@ -232,3 +229,22 @@ Scenario: Advanced search window should be hidable after loading grid panel dyna
232
229
  And I wait for the response from the server
233
230
  And I press "Cancel" within "#book_grid_loader__book_grid_one__search_form"
234
231
  Then the "book_grid_loader__book_grid_one__search_form" component should be hidden
232
+
233
+ @javascript
234
+ Scenario: Column order should be saved across page reloads
235
+ Given I am on the BookGridWithPersistence test page
236
+ When I drag "Digitized" column before "Title"
237
+ And I go to the BookGridWithPersistence test page
238
+ Then I should see columns in order: "Author name", "Digitized", "Title"
239
+
240
+ @javascript
241
+ Scenario: I must see total records value
242
+ Given the following books exist:
243
+ | title |
244
+ | Journey to Ixtlan |
245
+ | Lolita |
246
+ | Getting Things Done |
247
+ | Magus |
248
+
249
+ When I go to the BookGridWithPaging test page
250
+ Then I should see "of 2" within paging toolbar
@@ -0,0 +1,15 @@
1
+ Feature: Grid panel with custom primary key
2
+ In order to value
3
+ As a role
4
+ I want feature
5
+
6
+ # @javascript
7
+ # Scenario: Inline editing
8
+ # Given a book exists with title: "Book you are to write"
9
+ # When I go to the BookWithCustomPrimaryKeyGrid test page
10
+ # And I edit row 1 of the grid with title: "My fight club"
11
+ # And I press "Apply"
12
+ # And I wait for the response from the server
13
+ # Then the grid should have 0 modified records
14
+ # And a book_with_custom_primary_key should exist with title: "My fight club"
15
+ # But a book should not exist with title: "Book you are to write"