capybara-ng 0.2.4 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/angular.rb +10 -0
- data/lib/angular/version.rb +1 -1
- data/lib/angular/waiter.rb +7 -3
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e0b654b35d7e33d4dc20626194e5bb310e74108
|
4
|
+
data.tar.gz: a3acaa24d555f1980b33603d841e2445f730146a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92ec189e455673f6814fa25716384dbf445cec14510aa04e4bfd5d53043a97fc45cb42035ccbee2a440392c413653f4250a8e5e89cc39208e439bd7f27972aa6
|
7
|
+
data.tar.gz: a16b417a0006ed61bcf57f1637265ae132e67c8d27c5da87c4c2ea38ec5ffd9c802d18c2fac5f79ac89dc4ddfc9f9f366caf967a7a0161bbdc2a917563b01d04
|
data/lib/angular.rb
CHANGED
@@ -3,6 +3,8 @@ require 'capybara'
|
|
3
3
|
require 'logger'
|
4
4
|
|
5
5
|
module Angular
|
6
|
+
ANGULAR_WAIT_TIME = 2.seconds
|
7
|
+
|
6
8
|
class NotFound < StandardError
|
7
9
|
end
|
8
10
|
|
@@ -20,6 +22,14 @@ module Angular
|
|
20
22
|
@root_selector = root_selector
|
21
23
|
end
|
22
24
|
|
25
|
+
def self.wait_time
|
26
|
+
@wait_time ||= ANGULAR_WAIT_TIME
|
27
|
+
end
|
28
|
+
|
29
|
+
def self.wait_time=(seconds)
|
30
|
+
@wait_time ||= seconds
|
31
|
+
end
|
32
|
+
|
23
33
|
def self.logger
|
24
34
|
@logger ||= defined?(::Rails) ? ::Rails.logger : Logger.new('capybara-ng.log')
|
25
35
|
end
|
data/lib/angular/version.rb
CHANGED
data/lib/angular/waiter.rb
CHANGED
@@ -20,7 +20,7 @@ module Angular
|
|
20
20
|
private
|
21
21
|
|
22
22
|
def timeout?(start)
|
23
|
-
Time.now - start >
|
23
|
+
Time.now - start > Angular.wait_time
|
24
24
|
end
|
25
25
|
|
26
26
|
def timeout!
|
@@ -77,8 +77,12 @@ module Angular
|
|
77
77
|
var app = angular.element(el);
|
78
78
|
var injector = app.injector();
|
79
79
|
var callback = function() {
|
80
|
-
nglog("ready", []);
|
81
|
-
|
80
|
+
nglog("ready-callback", []);
|
81
|
+
var $timeout = injector.get('$timeout');
|
82
|
+
$timeout(function() {
|
83
|
+
nglog("ready-$timeout", []);
|
84
|
+
window.ngReady = true;
|
85
|
+
}, 0);
|
82
86
|
};
|
83
87
|
|
84
88
|
try {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capybara-ng
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kari
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -38,20 +38,6 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.3'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: awesome_print
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: 1.2.0
|
48
|
-
type: :runtime
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: 1.2.0
|
55
41
|
description: AngularJS bindings for capybara.
|
56
42
|
email:
|
57
43
|
- mr.kari.ikonen@gmail.com
|