site_prism-all_there 0.2.1 → 0.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec87af6636d37a39b333043f8f5e8be8f2063c968f22abef7e996d95d13d8f0c
|
4
|
+
data.tar.gz: 5e0c1cc43d5b4f3ab2e0bda50fe969d0213e5aaad0f4a0d97513275f1940e5b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '096fda4229852de2bda80d8fd3bddeb6e2c7718c5b82e08e87389719fba151bf4c345235af58afba0ca32db7c2ec8598806c7227b606c69c2b8b34047119aca4'
|
7
|
+
data.tar.gz: edfc6310c97177d776de1dc8ca47136c6a182e2efb0c9e90c77cac3552cf8f167c01e891b4cbbd28a487c13173f7320d529de1f70f34755fc7aaf7395c14e4d6
|
data/README.md
CHANGED
@@ -1,12 +1,14 @@
|
|
1
1
|
# site_prism-all_there
|
2
|
+
|
2
3
|
The breakout gem from SitePrism to perform recursion checks for `#all_there?`
|
3
4
|
|
4
|
-
This gem is
|
5
|
-
|
5
|
+
This gem is a breakout of the current `SitePrism::Page#all_there?` and `SitePrism::Section#all_there?`
|
6
|
+
methods which already exist.
|
6
7
|
|
7
|
-
|
8
|
+
At the moment, the gem is very much considered a Work in Progress and works "as is". It is
|
9
|
+
currently released as a `0.x` version meaning it is not fully API stable.
|
8
10
|
|
9
|
-
|
11
|
+
## Usage
|
10
12
|
|
11
13
|
Add the following code to either `spec_helper.rb` or `env.rb`
|
12
14
|
|
@@ -24,6 +24,26 @@ module SitePrism
|
|
24
24
|
]
|
25
25
|
end
|
26
26
|
|
27
|
+
def element
|
28
|
+
mapped_checklist_of(:element)
|
29
|
+
end
|
30
|
+
|
31
|
+
def elements
|
32
|
+
mapped_checklist_of(:elements)
|
33
|
+
end
|
34
|
+
|
35
|
+
def section
|
36
|
+
mapped_checklist_of(:section)
|
37
|
+
end
|
38
|
+
|
39
|
+
def sections
|
40
|
+
mapped_checklist_of(:sections)
|
41
|
+
end
|
42
|
+
|
43
|
+
def iframe
|
44
|
+
mapped_checklist_of(:iframe)
|
45
|
+
end
|
46
|
+
|
27
47
|
private
|
28
48
|
|
29
49
|
def mapped_checklist_of(type)
|
@@ -30,7 +30,7 @@ module SitePrism
|
|
30
30
|
# This will check all elements that are in the current scope
|
31
31
|
# This is equivalent to checking with a recursion value of +:none+
|
32
32
|
def current_class_all_there?
|
33
|
-
|
33
|
+
expected_items.array.flatten.all? { |name| there?(name) }
|
34
34
|
end
|
35
35
|
|
36
36
|
# This will check all elements that are in any of the individual
|
@@ -46,15 +46,15 @@ module SitePrism
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def section_classes_to_check
|
49
|
-
|
49
|
+
expected_items.section.map { |name| instance.send(name) }
|
50
50
|
end
|
51
51
|
|
52
52
|
def sections_classes_to_check
|
53
|
-
|
53
|
+
expected_items.sections.map { |name| instance.send(name) }
|
54
54
|
end
|
55
55
|
|
56
|
-
def
|
57
|
-
ExpectedItems.new(instance)
|
56
|
+
def expected_items
|
57
|
+
@expected_items ||= ExpectedItems.new(instance)
|
58
58
|
end
|
59
59
|
|
60
60
|
def there?(name)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: site_prism-all_there
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: '0.3'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luke Hill
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -44,28 +44,42 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.73.0
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
54
|
+
version: 0.73.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rubocop-performance
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.
|
61
|
+
version: '1.4'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 1.
|
68
|
+
version: '1.4'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rubocop-rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1.33'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '1.33'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: site_prism
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|