cuke_master 0.1.12 → 0.1.13

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: 1f2e8ff127cde47995c9573bc5dcca1a509b724c
4
- data.tar.gz: c1faf7735e4afa8361dd1086a2feda300297abdf
3
+ metadata.gz: 83adc6b12650c551b1a3e70f77e5416855823947
4
+ data.tar.gz: 4a68e78276fdccf695de5478a3f5d52db66c8878
5
5
  SHA512:
6
- metadata.gz: f1c05e6e566132b843729396fa87f0ec7f8b524fb033c506690ba818bebf66841a29e279a1c0ea9dea1c151ecbb71c98d24eeb21cb4f8b9b0e8078868efe7844
7
- data.tar.gz: 1640c5ef5af1952d32a1ba384b6bdbdd72d667f408f200cc56651942a9e875975438c3534279981048ccecf85312e5a60cf90a31c33f4980f19f83c356cdfa80
6
+ metadata.gz: 0ce80f3e8f86852be6e46aedecbfcb6c13c56ed31775b246a2b5811a5011f5c4313ed336e022cec1c4f768d693b53894c1eb3e8117b6021cdda11c1aefbb46de
7
+ data.tar.gz: e31a4daa51c017c3297bdc43bf5f93d4912b073bd5d175573078a983804cd3336c2408de6633618f6b9e59ec208e00539449455f499782c9751b15f004e37789
@@ -307,7 +307,7 @@ Then(/^I should see tag "([^"]*)" with content "([^"]*)"$/) do |tag, content|
307
307
  assert page.has_selector?(tag, text: content, visible: true)
308
308
  end
309
309
 
310
- # 4.3 Check checkbox checked value
310
+ # 4.3 Check for attribute name vs value
311
311
  # I should see tag "div" with attribute "id" filled in "james"
312
312
  Then(/^I should see tag "([^"]*)" with attribute "([^"]*)" \
313
313
  filled with "([^"]*)" has attribute "([^"]*)" filled with "([^"]*)"$/) \
@@ -320,6 +320,19 @@ do |tag, attr_name, attr_value, attr2_name, attr2_value|
320
320
  assert el[attr2_name] == attr2_value
321
321
  end
322
322
 
323
+ # 4.3 Check for checked checkbox
324
+ # I should see tag "div" with attribute "id" filled in "james"
325
+ Then(/^I should see checkbox with attribute "([^"]*)" \
326
+ filled with "([^"]*)" "([^"]*)"$/) \
327
+ do |attr_name, attr_value, checked_cond|
328
+ Capybara.ignore_hidden_elements = false
329
+ el = first(:xpath, ".//input[@#{attr_name}='#{attr_value}']")
330
+ Capybara.ignore_hidden_elements = true
331
+ assert !el.nil?
332
+
333
+ assert el.checked? == (checked_cond == 'checked')
334
+ end
335
+
323
336
  # 5. ========= MISC ACTIONS ===========
324
337
  # 5.1 Pause
325
338
  Then(/^pause for ([^"]*) seconds$/) do |duration|
@@ -1,3 +1,3 @@
1
1
  module CukeMaster
2
- VERSION = '0.1.12'.freeze
2
+ VERSION = '0.1.13'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cuke_master
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12
4
+ version: 0.1.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Huynh