tabulatr2 0.9.13 → 0.9.14

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7c84d124ea6a79ae026aa59ba8a1365a1bc6ae16
4
- data.tar.gz: 85d817921b527a2a5ab2f0427080b64d14830a86
3
+ metadata.gz: 8bc8b3d34ed931fa24fe85981c1b2e5763248c6c
4
+ data.tar.gz: 7752208548f494554ab70a4d754df3bfdaa329fd
5
5
  SHA512:
6
- metadata.gz: 8de26639ec20250a03e347ee476320bd9f7eddf964bd5893266828c77350d35ccebe99cc3f8ab4e9de82e04280235c8a932cc7b76a89d7ad5244a45313c97635
7
- data.tar.gz: 7a003812abef8c87fbe511f3950c9d9d9d31312190a13720d7c996a3c1a8d4f5f760dd71d5e27a338b9691c9532fd9f080ff0fad68603469524dd3cb5dba50b7
6
+ metadata.gz: b7cef62c4f02e49c3469a786e796d74fa5c3d32e65715c836b9ad63a87bd37b8f7f63199893bf799bd21a7711e1051624b8bfa85595b5df044d14c4630312307
7
+ data.tar.gz: dbebfc21118fdac9f3b13deb6c077881d76ca48faa574d0e3757fd8c1b2ba711c7bb5cb1c124e1c85f3606b15605f25d52319a889a123984e21729d38574ed1b
@@ -0,0 +1,2 @@
1
+ @import 'tabulatr/application';
2
+ @import 'font-awesome';
@@ -22,6 +22,7 @@
22
22
  #++
23
23
 
24
24
  require 'slim'
25
+ require 'font-awesome-rails'
25
26
  class Tabulatr::Engine < Rails::Engine
26
27
 
27
28
  end
@@ -22,5 +22,5 @@
22
22
  #++
23
23
 
24
24
  module Tabulatr
25
- VERSION = "0.9.13"
25
+ VERSION = "0.9.14"
26
26
  end
@@ -1,7 +1,6 @@
1
1
  require File.expand_path('../boot', __FILE__)
2
2
 
3
3
  require 'rails/all'
4
- require 'font-awesome-rails'
5
4
 
6
5
  Bundler.require(*Rails.groups)
7
6
 
@@ -129,24 +129,16 @@ describe "Tabulatr" do
129
129
  Product.create!(:title => n, :active => true, :price => 10.0)
130
130
  end
131
131
  visit simple_index_products_path
132
- find(".tabulatr-filter-menu-wrapper a.btn").click
133
- within(".tabulatr-filter-menu-wrapper .dropdown.open") do
134
- find_link('Title').click
135
- end
136
- expect(find('.dropdown-menu').visible?)
137
- find(".tabulatr-filter-menu-wrapper a.btn").trigger('click')
138
- within(".tabulatr_filter_form") do
139
- fill_in("product_filter[products:title][like]", with: "ore")
140
- expect{find('#title_like').visible?}.to be_true
141
- find_button("Apply").trigger('click')
142
- end
132
+ click_link 'Filter'
133
+ fill_in("product_filter[products:title][like]", with: "ore")
134
+ find('.tabulatr-submit-table').click
143
135
  expect(page).to have_selector('td[data-tabulatr-column-name="products:title"]', text: 'lorem')
144
136
  expect(page).to have_selector('td[data-tabulatr-column-name="products:title"]', text: 'labore')
145
137
  expect(page).to have_selector('td[data-tabulatr-column-name="products:title"]', text: 'dolore')
146
138
 
147
139
  within(".tabulatr_filter_form") do
148
140
  fill_in("product_filter[products:title][like]", :with => "loreem")
149
- find_button("Apply").trigger('click')
141
+ find('.tabulatr-submit-table').click
150
142
  end
151
143
  expect(page).not_to have_selector('td[data-tabulatr-column-name="products:title"]', text: 'lorem')
152
144
  expect(page).not_to have_selector('td[data-tabulatr-column-name="products:title"]', text: 'labore')
@@ -157,13 +149,9 @@ describe "Tabulatr" do
157
149
  Product.create!([{title: 'foo', vendor: @vendor1},
158
150
  {title: 'bar', vendor: @vendor2}])
159
151
  visit simple_index_products_path
160
- find(".tabulatr-filter-menu-wrapper a.btn").click
161
- within(".tabulatr-filter-menu-wrapper .dropdown.open") do
162
- find_link('Vendor Name').click
163
- end
164
- find(".tabulatr-filter-menu-wrapper a.btn").trigger('click')
152
+ click_link 'Filter'
165
153
  find('form.tabulatr_filter_form').fill_in("product_filter[vendor:name]", with: "producer")
166
- find('form.tabulatr_filter_form').find_button('Apply').trigger('click')
154
+ find('.tabulatr-submit-table').click
167
155
  expect(page).not_to have_selector('td[data-tabulatr-column-name="vendor:name"]', text: @vendor1.name)
168
156
  expect(page).to have_selector('td[data-tabulatr-column-name="vendor:name"]', text: @vendor2.name)
169
157
  end
@@ -172,22 +160,19 @@ describe "Tabulatr" do
172
160
  n = names.length
173
161
  Product.create!([{title: 'foo', price: 5}, {title: 'bar', price: 17}])
174
162
  visit simple_index_products_path
175
- find(".tabulatr-filter-menu-wrapper a.btn").click
176
- within(".tabulatr-filter-menu-wrapper .dropdown.open") do
177
- find_link('Price').click
178
- end
179
- find(".tabulatr-filter-menu-wrapper a.btn").trigger('click')
163
+
164
+ click_link 'Filter'
180
165
  within('.tabulatr_filter_form') do
181
166
  fill_in("product_filter[products:price][from]", :with => 4)
182
167
  fill_in("product_filter[products:price][to]", :with => 10)
183
- find_button("Apply").trigger('click')
168
+ find('.tabulatr-submit-table').click
184
169
  end
185
170
  page.find(".tabulatr_table tbody tr[data-id='#{Product.first.id}']").should have_content('foo')
186
171
  page.has_no_css?(".tabulatr_table tbody tr[data-id='#{Product.last.id}']")
187
172
  within('.tabulatr_filter_form') do
188
173
  fill_in("product_filter[products:price][from]", :with => 12)
189
174
  fill_in("product_filter[products:price][to]", :with => 19)
190
- find_button("Apply").trigger('click')
175
+ find('.tabulatr-submit-table').click
191
176
  end
192
177
  page.should have_selector(".tabulatr_table tbody tr[data-id='#{Product.last.id}']")
193
178
  page.should have_no_selector(".tabulatr_table tbody tr[data-id='#{Product.first.id}']")
@@ -196,24 +181,14 @@ describe "Tabulatr" do
196
181
  it 'removes the filters', js: true do
197
182
  Product.create!([{title: 'foo', price: 5}, {title: 'bar', price: 5}])
198
183
  visit simple_index_products_path
199
- find(".tabulatr-filter-menu-wrapper a.btn").click
200
- within(".tabulatr-filter-menu-wrapper .dropdown.open") do
201
- find_link('Title').click
202
- end
203
- expect(find('.dropdown-menu').visible?)
204
- find(".tabulatr-filter-menu-wrapper a.btn").trigger('click')
184
+ click_link 'Filter'
205
185
  within(".tabulatr_filter_form") do
206
186
  fill_in("product_filter[products:title][like]", with: "foo")
207
- # expect(find('#products--title_like').visible?)
208
- find_button("Apply").trigger('click')
187
+ find('.tabulatr-submit-table').click
209
188
  end
210
- # expect(page).to have_content('foo')
211
- # expect(page).to have_no_content('bar')
212
189
  expect(page).not_to have_selector('td[data-tabulatr-column-name="products:title"]', text: 'bar')
213
190
  expect(page).to have_selector('td[data-tabulatr-column-name="products:title"]', text: 'foo')
214
- find("a[data-hide-table-filter='products:title']").trigger('click')
215
- # expect(page).to have_content('foo')
216
- # expect(page).to have_content('bar')
191
+ find('.tabulatr-reset-table').click
217
192
  expect(page).to have_selector('td[data-tabulatr-column-name="products:title"]', text: 'bar')
218
193
  expect(page).to have_selector('td[data-tabulatr-column-name="products:title"]', text: 'foo')
219
194
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tabulatr2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.13
4
+ version: 0.9.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Horn
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-11-26 00:00:00.000000000 Z
13
+ date: 2014-12-14 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -97,7 +97,7 @@ files:
97
97
  - app/assets/javascripts/tabulatr/_tabulatr.js
98
98
  - app/assets/javascripts/tabulatr/application.js
99
99
  - app/assets/javascripts/tabulatr/jquery.inview.min.js
100
- - app/assets/stylesheets/tabulatr.css
100
+ - app/assets/stylesheets/tabulatr.css.scss
101
101
  - app/assets/stylesheets/tabulatr/application.css.scss
102
102
  - app/assets/stylesheets/tabulatr/bootstrap2_fixes.css.scss
103
103
  - app/views/tabulatr/_tabulatr_actual_table.html.slim
@@ -1,5 +0,0 @@
1
- /*
2
- *
3
- *= require tabulatr/application
4
- *= require font-awesome
5
- */