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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8bc8b3d34ed931fa24fe85981c1b2e5763248c6c
|
4
|
+
data.tar.gz: 7752208548f494554ab70a4d754df3bfdaa329fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7cef62c4f02e49c3469a786e796d74fa5c3d32e65715c836b9ad63a87bd37b8f7f63199893bf799bd21a7711e1051624b8bfa85595b5df044d14c4630312307
|
7
|
+
data.tar.gz: dbebfc21118fdac9f3b13deb6c077881d76ca48faa574d0e3757fd8c1b2ba711c7bb5cb1c124e1c85f3606b15605f25d52319a889a123984e21729d38574ed1b
|
data/lib/tabulatr/engine.rb
CHANGED
data/lib/tabulatr/version.rb
CHANGED
@@ -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
|
-
|
133
|
-
|
134
|
-
|
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
|
-
|
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
|
-
|
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('
|
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
|
-
|
176
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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(
|
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.
|
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-
|
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
|