wist 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +7 -7
- data/lib/wist.rb +4 -0
- data/test/test.js +4 -0
- data/test/test0.html +1 -0
- data/test/test_helper.rb +1 -1
- data/test/tests/wist_test.rb +8 -0
- data/wist.gemspec +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 450acc6d356d059a6c0c198eb1b4127c2fb22783
|
4
|
+
data.tar.gz: 5e628c0c47dbd85e06875703cfacf2b4fe8721f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 951913b7641ab65c9dcee97dddf2c08ca63230d3f2768f287f3979a6c5207be48f5d0974b6051c919264438163e77466b439dcd8d404c52af92000c0dcdd775d
|
7
|
+
data.tar.gz: 783a628c708798679e09004dffafa52c8cc18970ddbbfcdd686533237154eaa3f78d351377eaa0fc56f7b365ee5f755cf4f785f4dc6c72b3b08d23b2bac9f428
|
data/Gemfile.lock
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
wist (0.2.
|
4
|
+
wist (0.2.5)
|
5
5
|
capybara
|
6
6
|
selenium-webdriver
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: http://rubygems.org/
|
10
10
|
specs:
|
11
|
-
ansi (1.
|
11
|
+
ansi (1.5.0)
|
12
12
|
builder (3.2.2)
|
13
13
|
capybara (2.2.1)
|
14
14
|
mime-types (>= 1.16)
|
@@ -24,8 +24,8 @@ GEM
|
|
24
24
|
method_source (0.8.2)
|
25
25
|
mime-types (2.2)
|
26
26
|
mini_portile (0.5.3)
|
27
|
-
minitest (5.
|
28
|
-
minitest-reporters (1.0.
|
27
|
+
minitest (5.5.1)
|
28
|
+
minitest-reporters (1.0.11)
|
29
29
|
ansi
|
30
30
|
builder
|
31
31
|
minitest (>= 5.0)
|
@@ -46,9 +46,9 @@ GEM
|
|
46
46
|
rack-test (0.6.2)
|
47
47
|
rack (>= 1.0)
|
48
48
|
rake (10.1.0)
|
49
|
-
ruby-progressbar (1.7.
|
50
|
-
rubyzip (1.1.
|
51
|
-
selenium-webdriver (2.
|
49
|
+
ruby-progressbar (1.7.1)
|
50
|
+
rubyzip (1.1.7)
|
51
|
+
selenium-webdriver (2.45.0)
|
52
52
|
childprocess (~> 0.5)
|
53
53
|
multi_json (~> 1.0)
|
54
54
|
rubyzip (~> 1.0)
|
data/lib/wist.rb
CHANGED
@@ -74,6 +74,10 @@ module Wist
|
|
74
74
|
end
|
75
75
|
end
|
76
76
|
|
77
|
+
def interact_with_confirm(accept = true)
|
78
|
+
page.execute_script("window.confirm = function() { return #{accept.to_json} }")
|
79
|
+
end
|
80
|
+
|
77
81
|
def alert_accept(expected_msg = false)
|
78
82
|
page.execute_script "window.alert = function(msg) { window.lastAlertMsg = msg; }"
|
79
83
|
yield
|
data/test/test.js
CHANGED
data/test/test0.html
CHANGED
@@ -7,6 +7,7 @@
|
|
7
7
|
<button id='click_test'>foo</button>
|
8
8
|
<button id='wait_test'>foo</button>
|
9
9
|
<button id='enable_tweet_button'>foo</button>
|
10
|
+
<button id='confirm_test'>confirm test</button>
|
10
11
|
<a href='https://twitter.com/share' class='twitter-share-button' data-text='check this out'></a>
|
11
12
|
<a id='switch_window_test' href='test1.html' target='_blank'>foo</a>
|
12
13
|
<input id='input_test' type='text' />
|
data/test/test_helper.rb
CHANGED
data/test/tests/wist_test.rb
CHANGED
@@ -198,4 +198,12 @@ class WistTest < CapybaraTestCase
|
|
198
198
|
assert_equal(0, new_time)
|
199
199
|
assert_equal(old_time, Capybara.default_wait_time)
|
200
200
|
end
|
201
|
+
|
202
|
+
def test_interact_with_confirm
|
203
|
+
[true, false].each do |bool|
|
204
|
+
interact_with_confirm(bool)
|
205
|
+
click('#confirm_test')
|
206
|
+
assert_equal(bool, get_js('confirmed'))
|
207
|
+
end
|
208
|
+
end
|
201
209
|
end
|
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.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lihan Li
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-03-17 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.
|
83
|
+
rubygems_version: 2.4.5
|
84
84
|
signing_key:
|
85
85
|
specification_version: 4
|
86
86
|
summary: capybara helpers
|
@@ -93,4 +93,3 @@ test_files:
|
|
93
93
|
- test/test1.html
|
94
94
|
- test/test_helper.rb
|
95
95
|
- test/tests/wist_test.rb
|
96
|
-
has_rdoc:
|