capybara-angular 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/lib/capybara/angular/version.rb +1 -1
- data/lib/capybara/angular/waiter.rb +2 -1
- data/spec/capybara/angular_spec.rb +9 -0
- data/spec/public/ng-app-not-on-body.html +11 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 693dad6d8c4ff820c47a41b26d0c680179148256
|
4
|
+
data.tar.gz: 72e6b43dbe008965532ddc18b864476c37f50d60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2960689f9869d6a45f269a49d60e8b6d3c42e98740b5e64a14acc029b2bdebe2dea0b5c25e9f2cf311ca5391ea71d500ea14a3364dee66ba311f4c490d3b814
|
7
|
+
data.tar.gz: 325b2b29a1741e706cd361bc8235bff5d1cd8f8cf2dd3accbf2c8a43ad83e58fa0968400cec6fb4431862c9d6062b35bd5dbae1ede3f9b166fdec3704256991d
|
@@ -47,7 +47,8 @@ module Capybara
|
|
47
47
|
|
48
48
|
def setup_ready
|
49
49
|
page.execute_script <<-JS
|
50
|
-
var el = document.querySelector('body');
|
50
|
+
var el = document.querySelector('[ng-app], [data-ng-app]') || document.querySelector('body');
|
51
|
+
|
51
52
|
window.angularReady = false;
|
52
53
|
|
53
54
|
if (angular.getTestability) {
|
@@ -22,6 +22,11 @@ feature 'Waiting for angular' do
|
|
22
22
|
timeout_page_should_have_waited
|
23
23
|
end
|
24
24
|
|
25
|
+
scenario 'when using ng-app not on the body tag to bootstrap an application' do
|
26
|
+
open_ng_app_not_on_body_bootstrap_page
|
27
|
+
timeout_page_should_have_waited
|
28
|
+
end
|
29
|
+
|
25
30
|
def open_manual_bootstrap_page
|
26
31
|
visit '/manual.html'
|
27
32
|
end
|
@@ -30,6 +35,10 @@ feature 'Waiting for angular' do
|
|
30
35
|
visit '/ng-app.html'
|
31
36
|
end
|
32
37
|
|
38
|
+
def open_ng_app_not_on_body_bootstrap_page
|
39
|
+
visit '/ng-app-not-on-body.html'
|
40
|
+
end
|
41
|
+
|
33
42
|
def timeout_page_should_have_waited
|
34
43
|
expect(page).to have_content('waited')
|
35
44
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capybara-angular
|
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
|
- Pawel Pierzchala
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|
@@ -102,6 +102,7 @@ files:
|
|
102
102
|
- spec/public/js/angular-1.5.8.js
|
103
103
|
- spec/public/js/app.js
|
104
104
|
- spec/public/manual.html
|
105
|
+
- spec/public/ng-app-not-on-body.html
|
105
106
|
- spec/public/ng-app.html
|
106
107
|
homepage: ''
|
107
108
|
licenses:
|
@@ -132,4 +133,5 @@ test_files:
|
|
132
133
|
- spec/public/js/angular-1.5.8.js
|
133
134
|
- spec/public/js/app.js
|
134
135
|
- spec/public/manual.html
|
136
|
+
- spec/public/ng-app-not-on-body.html
|
135
137
|
- spec/public/ng-app.html
|