capybara-bootstrap-datepicker 0.0.1 → 0.0.2

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: 181e51c051574f4ad63a68c9350bfacf64faf4fb
4
- data.tar.gz: 0b3f95c7b05a6b56ce7ed335055ca6080d3c0fcf
3
+ metadata.gz: f600d38b5c30e177d3345c1ade6bef6d00c6d616
4
+ data.tar.gz: 424644e158c742510af067a37801cf39a1ff4b77
5
5
  SHA512:
6
- metadata.gz: 609f17fa79622d789b37a8c94ea352c7af0a43f6a179cfe0bc800b0010ab012d8a95fb29033f259f45d4c5552b86e2ea851855c6380a3b36d86e11f2d3715c8f
7
- data.tar.gz: 03be4a2e72125a7faf4fdd7a18d8cc879f5581d1eadb7690bee5255d60acb957836c91d43674c028596e4b6f09b29f8456861935f8cfbe33b2c9c4ff6032e1f6
6
+ metadata.gz: 9e89bd86b7f64f3f2fc58e965bf1c8921da4134a14c4f9f339e1abad8671c52269265380ffad382a5ff326aecf781fbd32c125c5f95423cdc3c83f2ec86b95d3
7
+ data.tar.gz: 3002a31ecc1486b683805c2c90d2bf793717f57c845bd9496f5489f53ed13fca7a1cbfc6d10b39f871cb365f6778ca9ff5cdde461d29436bc252e1d9bc5c22d6
data/README.md CHANGED
@@ -12,10 +12,10 @@ Add this line to your application's Gemfile:
12
12
 
13
13
  Or, add it into your test group
14
14
 
15
- group :test do
16
- gem 'capybara-bootstrap-datepicker'
17
- ...
18
- end
15
+ group :test do
16
+ gem 'capybara-bootstrap-datepicker'
17
+ ...
18
+ end
19
19
 
20
20
  And then execute:
21
21
 
@@ -30,15 +30,20 @@ The gem automatically hook itself into rspec helper using Rspec.configure.
30
30
  ## Usage
31
31
 
32
32
  Just use this method inside your capybara test:
33
- select_date(2.weeks.ago, from: "Label of the date input")
33
+
34
+ select_date(2.weeks.ago, from: "Label of the date input")
34
35
 
35
36
  Or even:
37
+
38
+ select_date(Date.tomorrow, from: "Label of the date input", format: "%d/%m/%Y")
36
39
  select_date("2013-05-24", xpath: "//path_to//your_date_input", datepicker: :bootstrap)
37
40
 
38
41
  Available options are:
39
- from - the label of your date input
40
- xpath - the path to your date input
41
- datepicker - the way to fill your date input (:bootstrap = by clicking the popover using [bootstrap-datepicker](https://github.com/eternicode/bootstrap-datepicker) ; by default it just fill the input date)
42
+ + **from:** the label of your date input
43
+ + **xpath:** the path to your date input
44
+ + **format:** the format used to fill your date input
45
+ + **datepicker:** the way to fill your date input (:bootstrap = by clicking the popover using [bootstrap-datepicker](https://github.com/eternicode/bootstrap-datepicker))
46
+ ; by default it just fill the input date.
42
47
 
43
48
  ## Contributing
44
49
 
@@ -45,7 +45,7 @@ module Capybara
45
45
 
46
46
  datepicker_years.find('.year', text: date.year).click
47
47
  datepicker_months.find('.month', text: date.strftime("%b")).click
48
- datepicker_days.find('.day', text: date.day).click
48
+ datepicker_days.find(:xpath, ".//*[contains(concat(' ', @class, ' '), ' day ') and not(contains(concat(' ', @class, ' '), ' old ')) and not(contains(concat(' ', @class, ' '), ' new '))]", text: date.day).click
49
49
  when :jquery
50
50
  raise "jQuery UI datepicker support is not implemented."
51
51
  else
@@ -1,5 +1,5 @@
1
1
  module Capybara
2
2
  module BootstrapDatepicker
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capybara-bootstrap-datepicker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - François Vantomme
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-05-24 00:00:00.000000000 Z
11
+ date: 2013-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec