bauxite 0.6.11 → 0.6.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/doc/Bauxite/Action.html +6 -4
- data/doc/created.rid +2 -2
- data/lib/bauxite/actions/assertm.rb +6 -4
- data/lib/bauxite.rb +1 -1
- data/test/alert/page.html +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: eb916454c3e4239c530ddce67a507d4998d1cc07
|
4
|
+
data.tar.gz: 434e8e4d01021369e9833296b975d8b335b32a48
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a5dfc1018b7af61bcd662887a18e8c8e9fee8aa2f49582d188e094bc92c073bd3bb1b2fc41575abe6d71060001099822e1a7b6f6a955ada79d64127d292aa1c
|
7
|
+
data.tar.gz: 82e1061d14f13e91d855c57c6b2e22967f3bb068ea49e73e4c582c7828f4f3989647e5d7e92407a306ed92361be411249fd1db7a8133ff7ff4cf45b1f17176ec
|
data/doc/Bauxite/Action.html
CHANGED
@@ -537,11 +537,13 @@ the popup. Alternatively, the action specified could be to
|
|
537
537
|
<div class="method-source-code" id="assertm-source">
|
538
538
|
<pre><span class="ruby-comment"># File lib/bauxite/actions/assertm.rb, line 40</span>
|
539
539
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">assertm</span>(<span class="ruby-identifier">text</span>, <span class="ruby-identifier">action</span> = <span class="ruby-string">'accept'</span>)
|
540
|
-
<span class="ruby-identifier">
|
541
|
-
|
542
|
-
<span class="ruby-
|
540
|
+
<span class="ruby-identifier">ctx</span>.<span class="ruby-identifier">with_timeout</span> <span class="ruby-constant">Selenium</span><span class="ruby-operator">::</span><span class="ruby-constant">WebDriver</span><span class="ruby-operator">::</span><span class="ruby-constant">Error</span><span class="ruby-operator">::</span><span class="ruby-constant">NoAlertPresentError</span> <span class="ruby-keyword">do</span>
|
541
|
+
<span class="ruby-identifier">a</span> = <span class="ruby-ivar">@ctx</span>.<span class="ruby-identifier">driver</span>.<span class="ruby-identifier">switch_to</span>.<span class="ruby-identifier">alert</span>
|
542
|
+
<span class="ruby-keyword">unless</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">text</span> <span class="ruby-operator">=~</span> <span class="ruby-identifier">_pattern</span>(<span class="ruby-identifier">text</span>)
|
543
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">Bauxite</span><span class="ruby-operator">::</span><span class="ruby-constant">Errors</span><span class="ruby-operator">::</span><span class="ruby-constant">AssertionError</span>, <span class="ruby-node">"Assertion failed: expected '#{text}', got '#{a.text}'"</span>
|
544
|
+
<span class="ruby-keyword">end</span>
|
545
|
+
<span class="ruby-identifier">a</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">action</span>.<span class="ruby-identifier">to_sym</span>)
|
543
546
|
<span class="ruby-keyword">end</span>
|
544
|
-
<span class="ruby-identifier">a</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">action</span>.<span class="ruby-identifier">to_sym</span>)
|
545
547
|
<span class="ruby-keyword">end</span></pre>
|
546
548
|
</div>
|
547
549
|
|
data/doc/created.rid
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
Mon, 05 May 2014 11:34:05 -0300
|
2
2
|
README.md Wed, 26 Mar 2014 13:39:30 -0300
|
3
3
|
lib/bauxite/selectors/smart.rb Wed, 26 Mar 2014 13:39:30 -0300
|
4
4
|
lib/bauxite/selectors/attr.rb Wed, 26 Mar 2014 13:39:30 -0300
|
@@ -34,7 +34,7 @@ lib/bauxite/actions/asserth.rb Wed, 26 Mar 2014 13:39:30 -0300
|
|
34
34
|
lib/bauxite/actions/click.rb Wed, 26 Mar 2014 13:39:30 -0300
|
35
35
|
lib/bauxite/actions/js.rb Wed, 26 Mar 2014 13:39:30 -0300
|
36
36
|
lib/bauxite/actions/capture.rb Wed, 26 Mar 2014 13:39:30 -0300
|
37
|
-
lib/bauxite/actions/assertm.rb
|
37
|
+
lib/bauxite/actions/assertm.rb Mon, 05 May 2014 11:29:04 -0300
|
38
38
|
lib/bauxite/actions/params.rb Wed, 26 Mar 2014 13:39:30 -0300
|
39
39
|
lib/bauxite/actions/assert.rb Wed, 26 Mar 2014 13:39:30 -0300
|
40
40
|
lib/bauxite/actions/open.rb Wed, 26 Mar 2014 13:39:30 -0300
|
@@ -38,10 +38,12 @@ class Bauxite::Action
|
|
38
38
|
#
|
39
39
|
# :category: Action Methods
|
40
40
|
def assertm(text, action = 'accept')
|
41
|
-
|
42
|
-
|
43
|
-
|
41
|
+
ctx.with_timeout Selenium::WebDriver::Error::NoAlertPresentError do
|
42
|
+
a = @ctx.driver.switch_to.alert
|
43
|
+
unless a.text =~ _pattern(text)
|
44
|
+
raise Bauxite::Errors::AssertionError, "Assertion failed: expected '#{text}', got '#{a.text}'"
|
45
|
+
end
|
46
|
+
a.send(action.to_sym)
|
44
47
|
end
|
45
|
-
a.send(action.to_sym)
|
46
48
|
end
|
47
49
|
end
|
data/lib/bauxite.rb
CHANGED
data/test/alert/page.html
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bauxite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patricio Zavolinsky
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: selenium-webdriver
|