testcentricity_web 1.0.6 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2f494b9af6b3241d6335a6f393c9b7d0e11c7243
4
- data.tar.gz: e662186ea64b03aee0b5ec7d03dce83dcbac38f9
3
+ metadata.gz: ea03165f5b9dad1161e5f65e0e25e188e61c0ced
4
+ data.tar.gz: e8147ed4b7c791f79e19dbef1ad87f41c2914741
5
5
  SHA512:
6
- metadata.gz: 58740657c8799577dc74e5aa9b642a35481e299d3d4f029e50a08bfb6d4397964ba7a78d4ed2703532f3022763542fcd6b17f091c36ad3538cf76df4769ac63f
7
- data.tar.gz: d50fa04094bdcd160314e6c408540b9deecdf8552cc32d6d37449e034543b1fcd24b6085058ee489616ead22b3155d648cf77d0df66adc723340e9f785279abe
6
+ metadata.gz: 0e1aa067a185898e159c388952ea63d4877c36b4f773162dbbf0772b7c3d1db2cc3bed7c593d78adcd965353153e6a8bcce9cdc0cade4d6a5df00c460ee55aaa
7
+ data.tar.gz: 9b5a942e1e378002cbe0448837f58f1055afdf2f39122330dca761c940d7cda192445650f554f3df3de806e9ab8514fa8e2eee51055a664ff555aa1635544315
data/README.md CHANGED
@@ -215,6 +215,7 @@ the UI to hide implementation details, as shown below:
215
215
  label :error_message_label, 'div#statusBar.login-error'
216
216
  link :forgot_password_link, 'a.forgotPassword'
217
217
 
218
+ # log in to web app
218
219
  def login(user_id, password)
219
220
  user_id_field.set(user_id)
220
221
  password_field.set(password)
@@ -225,6 +226,7 @@ the UI to hide implementation details, as shown below:
225
226
  remember_checkbox.set_checkbox_state(state)
226
227
  end
227
228
 
229
+ # verify Login page default UI state
228
230
  def verify_page_ui
229
231
  ui = {
230
232
  login_button => { :visible => true, :value => 'LOGIN' },
@@ -261,6 +263,7 @@ the UI to hide implementation details, as shown below:
261
263
  checkbox :email_opt_in_check, 'input#marketingEmailsOptIn'
262
264
  button :sign_up_button, 'button#registrationSignUp'
263
265
 
266
+ # populate Registration page fields with profile data
264
267
  def enter_profile_data(profile)
265
268
  fields = { title_select => profile.title,
266
269
  first_name_field => profile.first_name,
@@ -316,6 +319,7 @@ You define your page section's **Traits** as shown below:
316
319
 
317
320
  class SearchForm < TestCentricity::PageSection
318
321
  trait(:section_locator) { 'form#gnav-search' }
322
+ trait(:section_name) { 'Search widget' }
319
323
  end
320
324
 
321
325
 
@@ -325,6 +329,7 @@ You define your page section's **Traits** as shown below:
325
329
 
326
330
  class SearchForm < TestCentricity::PageSection
327
331
  trait(:section_locator) { 'form#gnav-search' }
332
+ trait(:section_name) { 'Search widget' }
328
333
 
329
334
  # Search Form UI elements
330
335
  textfield :search_field, 'input#search-query'
@@ -338,6 +343,7 @@ You can add high level methods to your **PageSection** class definition, as show
338
343
 
339
344
  class SearchForm < TestCentricity::PageSection
340
345
  trait(:section_locator) { 'form#gnav-search' }
346
+ trait(:section_name) { 'Search widget' }
341
347
 
342
348
  # Search Form UI elements
343
349
  textfield :search_field, 'input#search-query'
@@ -479,11 +485,9 @@ Include the step definitions and code below in a `page_steps.rb` or `generic_ste
479
485
 
480
486
  Then(/^I expect the ([^\"]*) page to be correctly displayed$/) do |page_name|
481
487
  target_page = page_dispatcher(page_name)
482
- if target_page
483
- target_page.verify_page_exists
484
- target_page.verify_page_ui
485
- PageManager.set_current_page(target_page)
486
- end
488
+ target_page.verify_page_exists
489
+ target_page.verify_page_ui
490
+ PageManager.set_current_page(target_page)
487
491
  end
488
492
 
489
493
 
@@ -65,11 +65,11 @@ module TestCentricity
65
65
  end
66
66
 
67
67
  def self.suppress_js_alerts
68
- page.execute_script("window.alert = function() {}")
68
+ Capybara.page.execute_script("window.alert = function() {}")
69
69
  end
70
70
 
71
71
  def self.suppress_js_leave_page_modal
72
- page.execute_script('window.onbeforeunload = null')
72
+ Capybara.page.execute_script('window.onbeforeunload = null')
73
73
  end
74
74
 
75
75
  def self.delete_all_cookies
@@ -218,10 +218,14 @@ module TestCentricity
218
218
  test_value = value.split('!', 2)
219
219
  parameter = test_value[1].split('.', 2)
220
220
  case parameter[0]
221
- when 'Address', 'Business', 'Code', 'Color', 'Commerce', 'Company', 'Crypto', 'File', 'Hacker', 'Hipster', 'Internet', 'Lorem', 'Name', 'Number', 'PhoneNumber', 'Time'
221
+ when 'Address', 'Business', 'Code', 'Color', 'Commerce', 'Company', 'Crypto', 'File', 'Hacker', 'Hipster', 'Internet', 'Lorem', 'Name', 'Number', 'PhoneNumber'
222
222
  result = eval("Faker::#{parameter[0]}.#{parameter[1]}")
223
223
  when 'Date'
224
224
  result = eval("Chronic.parse('#{parameter[1]}')")
225
+ when 'FormattedDate', 'FormatDate'
226
+ date_time_params = parameter[1].split(" format! ", 2)
227
+ date_time = eval("Chronic.parse('#{date_time_params[0].strip}')")
228
+ result = date_time.to_s.format_date_time("#{date_time_params[1].strip}")
225
229
  else
226
230
  result = eval(test_value[1])
227
231
  end
@@ -1,3 +1,3 @@
1
1
  module TestCentricityWeb
2
- VERSION = '1.0.6'
2
+ VERSION = '1.0.7'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testcentricity_web
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - A.J. Mrozinski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-30 00:00:00.000000000 Z
11
+ date: 2016-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler