wist 0.1.2 → 0.1.3

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: 9c192acd0d89e49e0336d0225fc15b66c32ab82a
4
- data.tar.gz: a84a7e169f92e5d61c4dd912d4d7dc675543f2f7
3
+ metadata.gz: 7439a5bcb03e1a2577707a5e76bbee40ef06fbd6
4
+ data.tar.gz: ed8c0b5063c2e6a20eb8e0efb5a614dca719df09
5
5
  SHA512:
6
- metadata.gz: 62ce97f8ea34acc5bf4eb314f49e373a6faeba1003eb910be607aab4d275a591f7a5ee78e9758491646c7bc2ec09ac520bcc5e12bf09a75458c8600ab61ab617
7
- data.tar.gz: 28d90462182499176f036e5c7d5a80c1a497cc467a8d3a852f1a5049ddf1404f6719ebdebfeaaa97f7ebf44621281c4aa808d3fa7a93e9ada28ef84b8efe9674
6
+ metadata.gz: 211881ab4f431cb26301f73ab501eecebe11e6f765b23b92c73d0b1736bbbfc6fc4c403903fb50c873fd8ed3438c102c25db06e4ed47114d8af46fe883f55177
7
+ data.tar.gz: 479620cc67965f306c964426a2011554296b5a39257f1f4d5af50fdf7473eeeb10bac8d0616672f6d0d951f5c47e26a22943a0e1adb041cb178ab7f7646e276c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- wist (0.1.1)
4
+ wist (0.1.2)
5
5
  capybara
6
6
  selenium-webdriver
7
7
 
@@ -22,12 +22,12 @@ GEM
22
22
  eventmachine (1.0.3)
23
23
  faye-websocket (0.4.7)
24
24
  eventmachine (>= 0.12.0)
25
- ffi (1.7.0)
25
+ ffi (1.9.0)
26
26
  http_parser.rb (0.5.3)
27
27
  method_source (0.8.1)
28
28
  mime-types (1.22)
29
29
  minitest (4.3.3)
30
- multi_json (1.7.2)
30
+ multi_json (1.7.7)
31
31
  nokogiri (1.5.9)
32
32
  poltergeist (1.2.0)
33
33
  capybara (~> 2.1.0)
@@ -42,7 +42,7 @@ GEM
42
42
  rack (>= 1.0)
43
43
  rake (10.0.4)
44
44
  rubyzip (0.9.9)
45
- selenium-webdriver (2.32.1)
45
+ selenium-webdriver (2.33.0)
46
46
  childprocess (>= 0.2.5)
47
47
  multi_json (~> 1.0)
48
48
  rubyzip
data/lib/wist.rb CHANGED
@@ -113,9 +113,9 @@ module Wist
113
113
  end
114
114
 
115
115
  %w(first all).each do |finder|
116
- define_method(:"#{finder}_with_wait") do |*args|
116
+ define_method("#{finder}_with_wait") do |*args|
117
117
  has_css?(*args)
118
- page.send(finder.to_sym, *args)
118
+ send(finder.to_sym, *args)
119
119
  end
120
120
  end
121
121
 
@@ -151,4 +151,10 @@ module Wist
151
151
  text_include ? el_text.include?(text) : el_text == text
152
152
  end.click
153
153
  end
154
+
155
+ %w(has has_no).each do |prefix|
156
+ define_method("assert_#{prefix}_css") do |*args|
157
+ assert_equal(true, send("#{prefix}_css?", *args))
158
+ end
159
+ end
154
160
  end
@@ -147,4 +147,9 @@ class WistTest < CapybaraTestCase
147
147
  click_by_text('button', 'click by text')
148
148
  assert_text('clicked', find('#click_by_text'))
149
149
  end
150
+
151
+ def test_assert_css
152
+ assert_has_css('#click_test', visible: true)
153
+ assert_has_no_css('#dog123')
154
+ end
150
155
  end
data/wist.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = 'wist'
3
- gem.version = '0.1.2'
3
+ gem.version = '0.1.3'
4
4
  gem.summary = 'capybara helpers'
5
5
  gem.author = 'Lihan Li'
6
6
  gem.email = 'frankieteardrop@gmail.com'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wist
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lihan Li
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-05-29 00:00:00.000000000 Z
11
+ date: 2013-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara
@@ -80,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
80
80
  version: '0'
81
81
  requirements: []
82
82
  rubyforge_project:
83
- rubygems_version: 2.0.0
83
+ rubygems_version: 2.0.3
84
84
  signing_key:
85
85
  specification_version: 4
86
86
  summary: capybara helpers