masteryconnect-automation-utils 1.1.0 → 1.1.1
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 +4 -4
- data/lib/implicit-wait-manager.rb +29 -0
- 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: 879b0d25e40272446fdbdfe27719a839c89a54e8
|
4
|
+
data.tar.gz: a2ba324f01ab4506e28b706e3a6bfaef358d1e6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c44eff21bc411ad8a1c3e6bc28855adaea5dd7b427c6a7a7715d8b7bd0297c3294632cd4e451407578e3319e799bf0d555f04da70e0759640f6f8e10b5f73c18
|
7
|
+
data.tar.gz: df30f7b31c915074a20d0b94cb6aff0cdf9070c70ff0b707995276c757bf90ffbdb61f933c47fad5864f79fc8779f16aa028a0e0cc1c8c4df14cce70d6444430
|
@@ -35,4 +35,33 @@ module ImplicitWaitManager
|
|
35
35
|
end
|
36
36
|
end
|
37
37
|
end
|
38
|
+
|
39
|
+
def finished_jquery_requests?
|
40
|
+
evaluate_script('(typeof jQuery === "undefined") || (jQuery.active == 0)')
|
41
|
+
end
|
42
|
+
|
43
|
+
def finished_angular_requests?
|
44
|
+
evaluate_script('(typeof angular === "undefined") || (angular.element(".ng-scope").injector().get("$http").pendingRequests.length == 0)')
|
45
|
+
end
|
46
|
+
|
47
|
+
def no_animations?
|
48
|
+
evaluate_script('(typeof $ === "undefined") || ($(":animated").length == 0)')
|
49
|
+
end
|
50
|
+
|
51
|
+
def no_overlays?
|
52
|
+
evaluate_script('(typeof jQuery === "undefined") || (jQuery(".blockUI").length == 0)')
|
53
|
+
end
|
54
|
+
|
55
|
+
def all_ajax_is_loaded?
|
56
|
+
if no_overlays? && no_animations? && finished_angular_requests? && finished_jquery_requests?
|
57
|
+
true
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
def wait_for_ajax
|
62
|
+
Timeout.timeout(Capybara.default_max_wait_time) do
|
63
|
+
loop until all_ajax_is_loaded?
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
38
67
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: masteryconnect-automation-utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Redmond
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Provides util methods available to all RSpec test automation projects.
|
14
14
|
Util methods include additional Ruby functionality, along with RSpec helper methods.
|