wist 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/wist.rb +4 -3
- data/test/tests/wist_test.rb +7 -2
- data/wist.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d195a4bc3c7ceee9e2b0b0d91dc8fe3642c9c7e
|
4
|
+
data.tar.gz: 5af4f9f8dbfc22155e2454e39c5fb95b95b6f666
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 241d428a2a7c00b862aa43e75fc25f88d41c3f47a38a76ee480fb03aaca1d50035414c47d2004356888d7242f133f741b5a3b416d1ad50adbabfeb514f6ea924
|
7
|
+
data.tar.gz: 17c9b4dfde7c3c26e6fc9df2ad4fc304d88dbfd310719bc8b661495d195d07eadf819bbc00160f872a0a6b1119bc050410c75616561965763450ffbf99ee1dde
|
data/Gemfile.lock
CHANGED
data/lib/wist.rb
CHANGED
@@ -27,8 +27,8 @@ module Wist
|
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
30
|
-
def click(
|
31
|
-
find(
|
30
|
+
def click(*args)
|
31
|
+
find(*args).click
|
32
32
|
end
|
33
33
|
|
34
34
|
def set_cookie(k, v)
|
@@ -40,7 +40,7 @@ module Wist
|
|
40
40
|
|
41
41
|
def set_value_and_trigger_evts(selector, val)
|
42
42
|
find(selector).set(val)
|
43
|
-
page.execute_script("$('#{selector}').focusout().change().trigger('input')")
|
43
|
+
page.execute_script("$('#{selector}').focusout().blur().change().trigger('input')")
|
44
44
|
end
|
45
45
|
|
46
46
|
def verify_tweet_button(text)
|
@@ -96,6 +96,7 @@ module Wist
|
|
96
96
|
if element_to_click.nil?
|
97
97
|
yield
|
98
98
|
else
|
99
|
+
element_to_click = find(element_to_click, visible: true) if element_to_click.is_a?(String)
|
99
100
|
element_to_click.click
|
100
101
|
end
|
101
102
|
|
data/test/tests/wist_test.rb
CHANGED
@@ -19,8 +19,8 @@ class WistTest < CapybaraTestCase
|
|
19
19
|
|
20
20
|
# tests
|
21
21
|
def test_click
|
22
|
-
click
|
23
|
-
assert_equal
|
22
|
+
click('#click_test', visible: true)
|
23
|
+
assert_equal('clicked', find('#click_test').text)
|
24
24
|
end
|
25
25
|
|
26
26
|
def test_wait_until_nested
|
@@ -88,6 +88,11 @@ class WistTest < CapybaraTestCase
|
|
88
88
|
verify_test_page(1)
|
89
89
|
end
|
90
90
|
|
91
|
+
def test_wait_for_new_url_with_string
|
92
|
+
wait_for_new_url('#wait_for_new_url_test')
|
93
|
+
verify_test_page(1)
|
94
|
+
end
|
95
|
+
|
91
96
|
def test_wait_for_new_url_with_block
|
92
97
|
wait_for_new_url { click('#wait_for_new_url_test') }
|
93
98
|
verify_test_page(1)
|
data/wist.gemspec
CHANGED
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.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lihan Li
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|