percy-appium-app 0.0.7 → 1.0.0
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/.github/ISSUE_TEMPLATE/bug_report.md +2 -2
- data/README.md +1 -1
- data/percy/lib/app_percy.rb +18 -0
- data/percy/lib/cli_wrapper.rb +9 -4
- data/percy/providers/generic_provider.rb +22 -4
- data/percy/version.rb +1 -1
- data/specs/cli_wrapper.rb +12 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bdb1ff6892c099d297d97844d8dd24985e6be0361e78da39e274d844945ea869
|
4
|
+
data.tar.gz: ba73fd618e623111852a73900165ae0a9315fe5a8ebb768ca4d3eb8d86928db5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e94a5a62b0a3c82630b63ba011a423978c924bfd31c2ad4de7ea92c1f1a5ce532530a5fcbd2de72f8c89908c404ef353b1ac3c415abb3d3806e6f5eaac125875
|
7
|
+
data.tar.gz: 68fbb5b42c1df5e5b8d39f75debe939d7e76408ff8370e7998f04f60adec7fe37a875504e13b93b9876a39595b67195299d4f4a348407e4064770a5a20e6610d
|
@@ -11,7 +11,7 @@ assignees: ''
|
|
11
11
|
|
12
12
|
There are common setup gotchas that happen with Percy's SDKs, it would be worth reading
|
13
13
|
the debugging document, which might already answer your question:
|
14
|
-
https://
|
14
|
+
https://www.browserstack.com/docs/percy/integrate/percy-sdk-workflow#debugging-sdks
|
15
15
|
|
16
16
|
## Reach out to Percy support instead?
|
17
17
|
|
@@ -43,7 +43,7 @@ If necessary, describe the problem you have been experiencing in more detail.
|
|
43
43
|
## Debug logs
|
44
44
|
|
45
45
|
If you are reporting a bug, _always_ include logs! [Give the "Debugging SDKs"
|
46
|
-
document a quick read for how to gather logs](https://
|
46
|
+
document a quick read for how to gather logs](https://www.browserstack.com/docs/percy/integrate/percy-sdk-workflow#debugging-sdks)
|
47
47
|
|
48
48
|
Please do not trim or edit these logs, often times there are hints in the full
|
49
49
|
logs that help debug what is going on.
|
data/README.md
CHANGED
@@ -181,7 +181,7 @@ $ percy exec -- [ruby test command]
|
|
181
181
|
[percy] Done!
|
182
182
|
```
|
183
183
|
|
184
|
-
Refer to docs here: [Percy on Automate](https://
|
184
|
+
Refer to docs here: [Percy on Automate](https://www.browserstack.com/docs/percy/integrate/functional-and-visual)
|
185
185
|
|
186
186
|
### Migrating Config
|
187
187
|
|
data/percy/lib/app_percy.rb
CHANGED
@@ -48,6 +48,24 @@ module Percy
|
|
48
48
|
'Argument orientation should be a String and portrait/landscape'
|
49
49
|
end
|
50
50
|
|
51
|
+
test_case = kwargs[:test_case]
|
52
|
+
if test_case && !test_case.is_a?(String)
|
53
|
+
raise TypeError,
|
54
|
+
'Argument test_case should be a String'
|
55
|
+
end
|
56
|
+
|
57
|
+
labels = kwargs[:labels]
|
58
|
+
if labels && !labels.is_a?(String)
|
59
|
+
raise TypeError,
|
60
|
+
'Argument labels should be a String'
|
61
|
+
end
|
62
|
+
|
63
|
+
th_test_case_execution_id = kwargs[:th_test_case_execution_id]
|
64
|
+
if th_test_case_execution_id && !th_test_case_execution_id.is_a?(String)
|
65
|
+
raise TypeError,
|
66
|
+
'Argument th_test_case_execution_id should be a String'
|
67
|
+
end
|
68
|
+
|
51
69
|
@provider.screenshot(name, **kwargs)
|
52
70
|
end
|
53
71
|
|
data/percy/lib/cli_wrapper.rb
CHANGED
@@ -49,8 +49,9 @@ module Percy
|
|
49
49
|
end
|
50
50
|
|
51
51
|
def post_screenshots(name, tag, tiles, external_debug_url = nil, ignored_elements_data = nil,
|
52
|
-
|
53
|
-
body = request_body(name, tag, tiles, external_debug_url, ignored_elements_data,
|
52
|
+
considered_elements_data = nil, sync = nil, test_case = nil, labels = nil, th_test_case_execution_id = nil)
|
53
|
+
body = request_body(name, tag, tiles, external_debug_url, ignored_elements_data,
|
54
|
+
considered_elements_data, sync, test_case, labels, th_test_case_execution_id)
|
54
55
|
body['client_info'] = Percy::Environment.get_client_info
|
55
56
|
body['environment_info'] = Percy::Environment.get_env_info
|
56
57
|
|
@@ -124,7 +125,8 @@ module Percy
|
|
124
125
|
data
|
125
126
|
end
|
126
127
|
|
127
|
-
def request_body(name, tag, tiles, external_debug_url, ignored_elements_data, considered_elements_data, sync
|
128
|
+
def request_body(name, tag, tiles, external_debug_url, ignored_elements_data, considered_elements_data, sync,
|
129
|
+
test_case, labels, th_test_case_execution_id)
|
128
130
|
tiles = tiles.map(&:to_h)
|
129
131
|
{
|
130
132
|
'name' => name,
|
@@ -133,7 +135,10 @@ module Percy
|
|
133
135
|
'ignored_elements_data' => ignored_elements_data,
|
134
136
|
'external_debug_url' => external_debug_url,
|
135
137
|
'considered_elements_data' => considered_elements_data,
|
136
|
-
'sync' => sync
|
138
|
+
'sync' => sync,
|
139
|
+
'test_case' => test_case,
|
140
|
+
'labels' => labels,
|
141
|
+
'th_test_case_execution_id' => th_test_case_execution_id
|
137
142
|
}
|
138
143
|
end
|
139
144
|
end
|
@@ -43,8 +43,12 @@ module Percy
|
|
43
43
|
)
|
44
44
|
}
|
45
45
|
sync = kwargs.fetch(:sync, nil)
|
46
|
+
test_case = kwargs.fetch(:test_case, nil)
|
47
|
+
labels = kwargs.fetch(:labels, nil)
|
48
|
+
th_test_case_execution_id = kwargs.fetch(:th_test_case_execution_id, nil)
|
46
49
|
|
47
|
-
_post_screenshots(name, tag, tiles, get_debug_url, ignore_regions, consider_regions,
|
50
|
+
_post_screenshots(name, tag, tiles, get_debug_url, ignore_regions, consider_regions,
|
51
|
+
sync, test_case, labels, th_test_case_execution_id)
|
48
52
|
end
|
49
53
|
|
50
54
|
def _get_tag(**kwargs)
|
@@ -81,7 +85,8 @@ module Percy
|
|
81
85
|
header_height = 0
|
82
86
|
footer_height = 0
|
83
87
|
[
|
84
|
-
Percy::Tile.new(status_bar_height, nav_bar_height, header_height, footer_height, filepath: path,
|
88
|
+
Percy::Tile.new(status_bar_height, nav_bar_height, header_height, footer_height, filepath: path,
|
89
|
+
fullscreen: fullscreen)
|
85
90
|
]
|
86
91
|
end
|
87
92
|
|
@@ -94,8 +99,21 @@ module Percy
|
|
94
99
|
elements_array
|
95
100
|
end
|
96
101
|
|
97
|
-
def _post_screenshots(
|
98
|
-
|
102
|
+
def _post_screenshots(
|
103
|
+
name,
|
104
|
+
tag,
|
105
|
+
tiles,
|
106
|
+
debug_url,
|
107
|
+
ignored_regions,
|
108
|
+
considered_regions,
|
109
|
+
sync,
|
110
|
+
test_case,
|
111
|
+
labels,
|
112
|
+
th_test_case_execution_id
|
113
|
+
)
|
114
|
+
Percy::CLIWrapper.new.post_screenshots(
|
115
|
+
name, tag, tiles, debug_url, ignored_regions, considered_regions, sync, test_case, labels, th_test_case_execution_id
|
116
|
+
)
|
99
117
|
end
|
100
118
|
|
101
119
|
def _write_screenshot(png_bytes, directory)
|
data/percy/version.rb
CHANGED
data/specs/cli_wrapper.rb
CHANGED
@@ -105,8 +105,11 @@ class TestCLIWrapper < Minitest::Test
|
|
105
105
|
name = 'some-name'
|
106
106
|
debug_url = 'debug-url'
|
107
107
|
sync = false
|
108
|
+
test_case = 'test-case-1'
|
109
|
+
labels = 'app;testing'
|
110
|
+
th_test_case_execution_id = 'uuid-1231231'
|
108
111
|
response = @cli_wrapper.request_body(name, tag, [tile], debug_url, @ignored_elements_data,
|
109
|
-
@considered_elements_data, sync)
|
112
|
+
@considered_elements_data, sync, test_case, labels, th_test_case_execution_id)
|
110
113
|
assert_equal response['name'], name
|
111
114
|
assert_equal response['external_debug_url'], debug_url
|
112
115
|
assert_equal response['tag'], tag
|
@@ -114,6 +117,9 @@ class TestCLIWrapper < Minitest::Test
|
|
114
117
|
assert_equal response['ignored_elements_data'], @ignored_elements_data
|
115
118
|
assert_equal response['considered_elements_data'], @considered_elements_data
|
116
119
|
assert_equal response['sync'], sync
|
120
|
+
assert_equal response['test_case'], test_case
|
121
|
+
assert_equal response['labels'], labels
|
122
|
+
assert_equal response['th_test_case_execution_id'], th_test_case_execution_id
|
117
123
|
end
|
118
124
|
|
119
125
|
def test_request_body_when_optional_values_are_null
|
@@ -125,13 +131,16 @@ class TestCLIWrapper < Minitest::Test
|
|
125
131
|
considered_elements_data = nil
|
126
132
|
sync = nil
|
127
133
|
response = @cli_wrapper.send(:request_body, name, tag, [tile], debug_url, ignored_elements_data,
|
128
|
-
considered_elements_data, sync)
|
134
|
+
considered_elements_data, sync, nil, nil, nil)
|
129
135
|
assert_equal response['name'], name
|
130
|
-
|
136
|
+
assert_nil response['external_debug_url']
|
131
137
|
assert_equal response['tag'], tag
|
132
138
|
assert_equal response['tiles'], [tile.to_h]
|
133
139
|
assert_nil response['ignored_elements_data']
|
134
140
|
assert_nil response['considered_elements_data']
|
135
141
|
assert_nil response['sync']
|
142
|
+
assert_nil response['test_case']
|
143
|
+
assert_nil response['labels']
|
144
|
+
assert_nil response['th_test_case_execution_id']
|
136
145
|
end
|
137
146
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: percy-appium-app
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BroswerStack
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: appium_lib
|
@@ -202,7 +202,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
202
202
|
- !ruby/object:Gem::Version
|
203
203
|
version: '0'
|
204
204
|
requirements: []
|
205
|
-
rubygems_version: 3.1.
|
205
|
+
rubygems_version: 3.1.4
|
206
206
|
signing_key:
|
207
207
|
specification_version: 4
|
208
208
|
summary: Percy visual testing for Ruby Appium Mobile Apps
|