marty 0.5.39 → 0.5.40

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: 1c7c49130696eaee7cf90daac35a2e8f7de5b4d4
4
- data.tar.gz: d9c02183be57f6889d9071b27461315571278226
3
+ metadata.gz: f166abb0b1bc5f9da59dc6c3879fbda45bfa1c2a
4
+ data.tar.gz: 78a16a950bbc27e7f34f54e6d123bd1bd3a112e8
5
5
  SHA512:
6
- metadata.gz: 49df1bf75aac668d3e2e2431a38826a55f75bbf51a68194b7fee998f19bfa58f3e98cb63b724866d6764d7a0cc8d179bb00ed9a483f91acb606ba7fafd3d6ba1
7
- data.tar.gz: 73d88973b75a3291f77db255243f99927e2ea8dd6d46d6f34bdc088e5d12799c9058d5219452721d231f7465202a62f4e63ca7c3cdb70b51f328beaf207e2034
6
+ metadata.gz: 19fc34d83a632f06a345f927dad2769d89310c3ff330abf34dd99f7bdd054799e29d5067e78dc3b167c669d5a0004ad6d293ba6fb63f24a053610f4bb090e1d6
7
+ data.tar.gz: d08d671febf9c71fde42c01c37f61a62d861544a3c30f39de44f55eb69b421444b45565b01f1ac94c78d54b56934d2ee52fa7ee3c0fd03ee542bfc1d7b7d7033
data/Gemfile CHANGED
@@ -21,4 +21,7 @@ group :development, :test do
21
21
  gem 'netzke-core'
22
22
  gem 'netzke-basepack'
23
23
  gem 'netzke-testing' #, path: File.expand_path('../../netzke-testing', __FILE__)
24
+
25
+ #gem 'marty_rspec', path: File.expand_path('../../marty_rspec', __FILE__)
26
+ gem 'marty_rspec'
24
27
  end
@@ -47,9 +47,9 @@ module Marty
47
47
  def git_details app_name = Rails.application.class.parent.to_s
48
48
  [
49
49
  Diagnostic.new("#{app_name} Git Version", true,
50
- `git describe 2>&1`.strip),
50
+ `git describe 2>&1`.strip),
51
51
  Diagnostic.new("#{app_name} Git Details", true,
52
- `git show --pretty=format:"sha: %h, %D" 2>&1`.strip)
52
+ `git show --pretty=format:"sha: %h, %D" --no-patch 2>&1`.strip)
53
53
  ]
54
54
  end
55
55
 
data/lib/marty/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Marty
2
- VERSION = "0.5.39"
2
+ VERSION = "0.5.40"
3
3
  end
@@ -23,11 +23,11 @@ feature 'Posting workflows', js: true do
23
23
  Marty::NewPostingForm.has_marty_permissions(BASE: :admin)
24
24
  end
25
25
 
26
- let(:pg) { gridpanel('posting_grid') }
27
-
28
26
  it 'create posting and select it' do
29
27
  log_in_as('admin1')
30
28
 
29
+ posting_grid = netzke_find('posting_grid')
30
+
31
31
  by 'bring up new posting form' do
32
32
  wait_for_ajax
33
33
  press('Postings')
@@ -49,8 +49,8 @@ feature 'Posting workflows', js: true do
49
49
 
50
50
  and_by 'select new posting' do
51
51
  within(:gridpanel, 'posting_window', match: :first) do
52
- expect(row_count(pg)).to eq 2
53
- select_row(2, pg)
52
+ expect(posting_grid.row_count).to eq 2
53
+ posting_grid.select_row(2)
54
54
  press('Select')
55
55
  end
56
56
  end
@@ -3,6 +3,7 @@ require 'spec_helper'
3
3
  feature 'under Applications menu, Reports using Data Import', js: true do
4
4
 
5
5
  before(:all) do
6
+ marty_whodunnit
6
7
  @clean_file = "/tmp/clean_#{Process.pid}.psql"
7
8
  save_clean_db(@clean_file)
8
9
  dt = Time.zone.now
@@ -49,21 +50,20 @@ feature 'under Applications menu, Reports using Data Import', js: true do
49
50
  )
50
51
  end
51
52
 
52
- let(:tg) { gridpanel('tag_grid') }
53
- let(:sg) { gridpanel('script_grid') }
54
- let(:rf) { gridpanel('report_form') }
55
-
56
53
  it 'adds 2 new fannie bups via datareport script' do
57
54
  expect do
58
55
  log_in_as('marty')
59
56
  go_to_reporting
60
57
 
58
+ tag_grid = netzke_find('tag_grid')
59
+ script_grid = netzke_find('script_grid')
60
+
61
61
  by 'select BASE tag' do
62
- select_row(2, tg)
62
+ tag_grid.select_row(2)
63
63
  end
64
64
 
65
65
  and_by 'select DataReport script & Data Import node' do
66
- select_row(2, sg)
66
+ script_grid.select_row(2)
67
67
  end
68
68
 
69
69
  and_by 'select Data Import node' do
@@ -104,7 +104,8 @@ feature 'under Applications menu, Reports using Data Import', js: true do
104
104
 
105
105
  and_by 'background job has shown up' do
106
106
  wait_for_ajax
107
- expect(row_count(treepanel('promise_view'))).to eq 1
107
+ promise_view = netzke_find('promise_view', 'treepanel')
108
+ expect(promise_view.row_count).to eq 1
108
109
  find(:xpath, "//tr[contains(@class, 'green-row')]", match: :first)
109
110
  end
110
111
 
@@ -120,12 +121,15 @@ feature 'under Applications menu, Reports using Data Import', js: true do
120
121
  log_in_as('dev1')
121
122
  go_to_reporting
122
123
 
124
+ tag_grid = netzke_find('tag_grid')
125
+ script_grid = netzke_find('script_grid')
126
+
123
127
  by 'select BASE tag' do
124
- select_row(2, tg)
128
+ tag_grid.select_row(2)
125
129
  end
126
130
 
127
131
  and_by 'select DataReport script & Data Import node' do
128
- select_row(2, sg)
132
+ script_grid.select_row(2)
129
133
  end
130
134
 
131
135
  and_by 'select Data Import node' do
@@ -90,10 +90,6 @@ DELOREAN
90
90
  }
91
91
  end
92
92
 
93
- let(:tg) { gridpanel('tag_grid') }
94
- let(:sg) { gridpanel('script_grid') }
95
- let(:rf) { gridpanel('report_form') }
96
-
97
93
  def select_node node_name
98
94
  wait_for_ajax
99
95
  #hacky: assumes only 1 combobox without label
@@ -109,14 +105,17 @@ DELOREAN
109
105
  log_in_as('dev1')
110
106
  go_to_reporting
111
107
 
108
+ tag_grid = netzke_find('tag_grid')
109
+ script_grid = netzke_find('script_grid')
110
+
112
111
  by 'select 2nd tag' do
113
112
  wait_for_ajax
114
- zoom_out(tg)
115
- select_row(2, tg)
113
+ zoom_out
114
+ tag_grid.select_row(2)
116
115
  end
117
116
 
118
117
  and_by 'select SomeReport script & CC node' do
119
- select_row(1, sg)
118
+ script_grid.select_row(1)
120
119
  select_node('CC (csv)')
121
120
  end
122
121
 
@@ -145,11 +144,11 @@ DELOREAN
145
144
  end
146
145
 
147
146
  and_by 'select 3rd tag' do
148
- select_row(3, tg)
147
+ tag_grid.select_row(3)
149
148
  end
150
149
 
151
150
  and_by 'select SomeReport script' do
152
- select_row(1, sg)
151
+ script_grid.select_row(1)
153
152
  end
154
153
 
155
154
  and_by 'validate script combobox' do
@@ -172,14 +171,17 @@ DELOREAN
172
171
  log_in_as('dev1')
173
172
  go_to_reporting
174
173
 
174
+ tag_grid = netzke_find('tag_grid')
175
+ script_grid = netzke_find('script_grid')
176
+
175
177
  by 'select 2nd tag' do
176
178
  wait_for_ajax
177
- zoom_out(tg)
178
- select_row(2, tg)
179
+ zoom_out
180
+ tag_grid.select_row(2)
179
181
  end
180
182
 
181
183
  and_by 'select SomeReport script & AA node' do
182
- select_row(1, sg)
184
+ script_grid.select_row(1)
183
185
  select_node('AA (csv)')
184
186
  end
185
187
 
@@ -201,21 +203,24 @@ DELOREAN
201
203
  log_in_as('dev1')
202
204
  go_to_reporting
203
205
 
206
+ tag_grid = netzke_find('tag_grid')
207
+ script_grid = netzke_find('script_grid')
208
+
204
209
  by 'select 2nd tag' do
205
210
  wait_for_ajax
206
- zoom_out(tg)
207
- select_row(2, tg)
211
+ zoom_out
212
+ tag_grid.select_row(2)
208
213
  end
209
214
 
210
215
  and_by 'select SomeReport script & AA node' do
211
- select_row(1, sg)
216
+ script_grid.select_row(1)
212
217
  select_node('DD [role: dev] (csv)')
213
218
  end
214
219
 
215
220
  and_by 'generate report disabled' do
216
221
  fill_in('Note Rate', with: '3.00')
217
- expect(btn_disabled?('Generate Report', rf)).to be_truthy
218
- expect(btn_disabled?('Background Report', rf)).to be_falsy
222
+ expect(btn_disabled?('Generate Report')).to be_truthy
223
+ expect(btn_disabled?('Background Report')).to be_falsy
219
224
  end
220
225
  end
221
226
 
@@ -223,14 +228,17 @@ DELOREAN
223
228
  log_in_as('viewer1')
224
229
  go_to_reporting
225
230
 
231
+ tag_grid = netzke_find('tag_grid')
232
+ script_grid = netzke_find('script_grid')
233
+
226
234
  by 'select 2nd tag' do
227
235
  wait_for_ajax
228
- zoom_out(tg)
229
- select_row(2, tg)
236
+ zoom_out
237
+ tag_grid.select_row(2)
230
238
  end
231
239
 
232
240
  and_by 'select SomeReport script & AA' do
233
- select_row(1, sg)
241
+ script_grid.select_row(1)
234
242
  end
235
243
 
236
244
  and_by 'no DD [role: dev] (csv)' do
@@ -66,17 +66,16 @@ feature 'under Applications menu, Scripting workflows', js: true do
66
66
  }
67
67
  end
68
68
 
69
- let(:tg) { gridpanel('tag_grid') }
70
- let(:sg) { gridpanel('script_grid') }
71
- let(:sf) { gridpanel('script_form') }
72
-
73
69
  it 'adding scripts and tags & ensure proper validations' do
74
70
  log_in_as('dev1')
75
71
  go_to_scripting
76
72
 
73
+ script_grid = netzke_find('script_grid')
74
+ tag_grid = netzke_find('tag_grid')
75
+
77
76
  by 'select DEV tag' do
78
77
  wait_for_ajax
79
- select_row(1, tg)
78
+ tag_grid.select_row(1)
80
79
  end
81
80
 
82
81
  and_by 'add script' do
@@ -90,8 +89,8 @@ feature 'under Applications menu, Scripting workflows', js: true do
90
89
  and_by 'select the new script' do
91
90
  wait_for_ajax
92
91
  within(:gridpanel, 'script_grid', match: :first) do
93
- validate_row_values(6, sg, name: 'Xyz', tag: 'DEV')
94
- select_row(6, sg)
92
+ script_grid.validate_row_values(6, name: 'Xyz', tag: 'DEV')
93
+ script_grid.select_row(6)
95
94
  end
96
95
  end
97
96
 
@@ -118,20 +117,20 @@ feature 'under Applications menu, Scripting workflows', js: true do
118
117
  and_by 'new tag shows up' do
119
118
  wait_for_ajax
120
119
  within(:gridpanel, 'tag_grid', match: :first) do
121
- expect(row_count(tg)).to eq 6
120
+ expect(tag_grid.row_count).to eq 6
122
121
  end
123
122
  end
124
123
 
125
124
  and_by 'tag row 2 has 6 scripts' do
126
- select_row(2, tg)
125
+ tag_grid.select_row(2)
127
126
  wait_for_ajax
128
- expect(row_count(sg)).to eq 6
127
+ expect(script_grid.row_count).to eq 6
129
128
  end
130
129
 
131
130
  and_by 'tag row 3 has 5 scripts' do
132
- select_row(3, tg)
131
+ tag_grid.select_row(3)
133
132
  wait_for_ajax
134
- expect(row_count(sg)).to eq 5
133
+ expect(script_grid.row_count).to eq 5
135
134
  end
136
135
  end
137
136
 
@@ -139,9 +138,12 @@ feature 'under Applications menu, Scripting workflows', js: true do
139
138
  log_in_as('dev1')
140
139
  go_to_scripting
141
140
 
141
+ script_grid = netzke_find('script_grid')
142
+ tag_grid = netzke_find('tag_grid')
143
+
142
144
  by 'select DEV tag' do
143
145
  wait_for_ajax
144
- select_row(1, tg)
146
+ tag_grid.select_row(1)
145
147
  end
146
148
 
147
149
  and_by 'add script with duplicate name' do
@@ -164,7 +166,7 @@ feature 'under Applications menu, Scripting workflows', js: true do
164
166
 
165
167
  and_by 'no script got added' do
166
168
  wait_for_ajax
167
- expect(row_count(sg)).to eq 5
169
+ expect(script_grid.row_count).to eq 5
168
170
  end
169
171
  end
170
172
 
@@ -173,13 +175,15 @@ feature 'under Applications menu, Scripting workflows', js: true do
173
175
  # no nav buttons available, but check direct access
174
176
  ensure_on('/#scripting')
175
177
 
178
+ script_grid = netzke_find('script_grid')
179
+ tag_grid = netzke_find('tag_grid')
180
+
176
181
  by 'nothing should work & log out' do
177
182
  wait_for_ajax
178
- expect(row_count(sg)).to eq 0
179
- expect(row_count(tg)).to eq 0
180
- expect(btn_disabled?('New Script', sg)).to be_truthy
181
- expect(btn_disabled?('Delete Script', sg)).to be_truthy
182
- expect(btn_disabled?('New Tag', tg)).to be_truthy
183
+ expect(script_grid.row_count).to eq 0
184
+ expect(tag_grid.row_count).to eq 0
185
+ expect(btn_disabled?('New Script')).to be_truthy
186
+ expect(btn_disabled?('New Tag')).to be_truthy
183
187
  log_out
184
188
  end
185
189
 
@@ -190,16 +194,15 @@ feature 'under Applications menu, Scripting workflows', js: true do
190
194
 
191
195
  and_by 'viewable but cannot add scripts or tags' do
192
196
  wait_for_ajax
193
- expect(row_count(sg)).to eq 5
194
- select_row(1, tg)
197
+ expect(script_grid.row_count).to eq 5
198
+ tag_grid.select_row(1)
195
199
  wait_for_ajax
196
- expect(btn_disabled?('New Script', sg)).to be_truthy
197
- expect(btn_disabled?('Delete Script', sg)).to be_truthy
198
- expect(btn_disabled?('New Tag', tg)).to be_truthy
199
- select_row(4, tg)
200
+ expect(btn_disabled?('New Script')).to be_truthy
201
+ expect(btn_disabled?('New Tag')).to be_truthy
202
+ tag_grid.select_row(4)
200
203
  wait_for_ajax
201
- expect(row_count(sg)).to eq 5
202
- expect(btn_disabled?('Save', sf)).to be_truthy
204
+ expect(script_grid.row_count).to eq 5
205
+ expect(btn_disabled?('Save')).to be_truthy
203
206
  end
204
207
  end
205
208
 
@@ -207,14 +210,18 @@ feature 'under Applications menu, Scripting workflows', js: true do
207
210
  log_in_as('dev1')
208
211
  go_to_scripting
209
212
 
213
+ script_grid = netzke_find('script_grid')
214
+ tag_grid = netzke_find('tag_grid')
215
+
216
+
210
217
  by 'select tag row 2' do
211
218
  wait_for_ajax
212
- select_row(2, tg)
219
+ tag_grid.select_row(2)
213
220
  end
214
221
 
215
222
  and_by 'select script row 5' do
216
223
  wait_for_ajax
217
- select_row(5, sg)
224
+ script_grid.select_row(5)
218
225
  end
219
226
 
220
227
  and_by 'form displays correct body' do
@@ -223,12 +230,12 @@ feature 'under Applications menu, Scripting workflows', js: true do
223
230
  end
224
231
 
225
232
  and_by 'select different tag' do
226
- select_row(4, tg)
233
+ tag_grid.select_row(4)
227
234
  end
228
235
 
229
236
  and_by 'select script row 5' do
230
237
  wait_for_ajax
231
- select_row(5, sg)
238
+ script_grid.select_row(5)
232
239
  end
233
240
 
234
241
  and_by 'form displays updated body' do
@@ -241,14 +248,17 @@ feature 'under Applications menu, Scripting workflows', js: true do
241
248
  log_in_as('dev1')
242
249
  go_to_scripting
243
250
 
251
+ script_grid = netzke_find('script_grid')
252
+ tag_grid = netzke_find('tag_grid')
253
+
244
254
  by 'select DEV tag' do
245
255
  wait_for_ajax
246
- select_row(1, tg)
256
+ tag_grid.select_row(1)
247
257
  end
248
258
 
249
259
  and_by 'select script row 5' do
250
260
  wait_for_ajax
251
- select_row(5, sg)
261
+ script_grid.select_row(5)
252
262
  end
253
263
 
254
264
  and_by 'edit script form body' do
@@ -261,13 +271,13 @@ feature 'under Applications menu, Scripting workflows', js: true do
261
271
 
262
272
  and_by 'new script does not exist in old tag' do
263
273
  wait_for_ajax
264
- select_row(2, tg)
274
+ tag_grid.select_row(2)
265
275
  # FIX? selection change required to refresh script form
266
- select_row(1, sg)
267
- select_row(5, sg)
276
+ script_grid.select_row(1)
277
+ script_grid.select_row(5)
268
278
  wait_for_ajax
269
279
  expect(page).not_to have_content "#123\n#456\n"
270
- select_row(1, sg)
280
+ script_grid.select_row(1)
271
281
  end
272
282
 
273
283
  and_by 'make new tag' do
@@ -280,11 +290,11 @@ feature 'under Applications menu, Scripting workflows', js: true do
280
290
 
281
291
  and_by 'new tag contains new script' do
282
292
  wait_for_ajax
283
- select_row(2, tg)
293
+ tag_grid.select_row(2)
284
294
  wait_for_ajax
285
- select_row(5, sg)
295
+ script_grid.select_row(5)
286
296
  expect(page).to have_content "#123\n#456\n"
287
- expect(validate_row_values(2, tg, comment: 'ABCD')).to be_truthy
297
+ tag_grid.validate_row_values(2, comment: 'ABCD')
288
298
  end
289
299
  end
290
300
 
@@ -292,14 +302,17 @@ feature 'under Applications menu, Scripting workflows', js: true do
292
302
  log_in_as('dev1')
293
303
  go_to_scripting
294
304
 
305
+ script_grid = netzke_find('script_grid')
306
+ tag_grid = netzke_find('tag_grid')
307
+
295
308
  by 'select DEV tag' do
296
309
  wait_for_ajax
297
- select_row(1, tg)
310
+ tag_grid.select_row(1)
298
311
  end
299
312
 
300
313
  and_by 'select script row 1' do
301
314
  wait_for_ajax
302
- select_row(1, sg)
315
+ script_grid.select_row(1)
303
316
  end
304
317
 
305
318
  and_by 'save without changes' do
@@ -312,20 +325,23 @@ feature 'under Applications menu, Scripting workflows', js: true do
312
325
  log_in_as('dev1')
313
326
  go_to_scripting
314
327
 
328
+ script_grid = netzke_find('script_grid')
329
+ tag_grid = netzke_find('tag_grid')
330
+
315
331
  by 'select DEV tag' do
316
332
  wait_for_ajax
317
- select_row(1, tg)
333
+ tag_grid.select_row(1)
318
334
  end
319
335
 
320
336
  and_by 'delete script' do
321
- select_row(1, sg)
337
+ script_grid.select_row(1)
322
338
  press('Delete Script')
323
339
  find(:xpath, "//div[text()='Confirmation']", wait: 5)
324
340
  press('Yes')
325
341
  end
326
342
 
327
343
  and_by 'script is gone' do
328
- expect(row_count(sg)).to eq 4
344
+ expect(script_grid.row_count).to eq 4
329
345
  end
330
346
  end
331
347
 
@@ -333,13 +349,16 @@ feature 'under Applications menu, Scripting workflows', js: true do
333
349
  log_in_as('dev1')
334
350
  go_to_scripting
335
351
 
352
+ script_grid = netzke_find('script_grid')
353
+ tag_grid = netzke_find('tag_grid')
354
+
336
355
  by 'select not DEV tag' do
337
356
  wait_for_ajax
338
- select_row(2, tg)
357
+ tag_grid.select_row(2)
339
358
  end
340
359
 
341
360
  and_by 'delete script' do
342
- select_row(1, sg)
361
+ script_grid.select_row(1)
343
362
  press('Delete Script')
344
363
  find(:xpath, "//div[text()='Confirmation']", wait: 5)
345
364
  press('Yes')