percy-appium-app 0.0.8 → 1.0.0

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: 3b46a8c2b5a23c5a4171481451b2769eb6c60954ba7a9f1d43ad8d7ac72dc47a
4
- data.tar.gz: 0e3480e5bebad1e1d3354792d818709f43b9040e8aee7b52ecb3f80af688db82
3
+ metadata.gz: bdb1ff6892c099d297d97844d8dd24985e6be0361e78da39e274d844945ea869
4
+ data.tar.gz: ba73fd618e623111852a73900165ae0a9315fe5a8ebb768ca4d3eb8d86928db5
5
5
  SHA512:
6
- metadata.gz: e139e6eac3e362ddeeadb9a36653e2a17dd2c2a85acdbb73e2f486afea8ee098b35db88127d35d95882beda8a825392f87ab1462e75da81709fb1f01824df974
7
- data.tar.gz: 199703de73702fb3125607f6588a1abbeb146af01993d4d63b66b8dcc5fcf7607a5db18ee31d0008c18269c44db198dbf1fd6170a62c98bdcd972b7b3f66eefd
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://docs.percy.io/docs/debugging-sdk
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://docs.percy.io/docs/debugging-sdks#debugging-sdks)
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://docs.percy.io/docs/integrate-functional-testing-with-visual-testing)
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
 
@@ -54,6 +54,12 @@ module Percy
54
54
  'Argument test_case should be a String'
55
55
  end
56
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
+
57
63
  th_test_case_execution_id = kwargs[:th_test_case_execution_id]
58
64
  if th_test_case_execution_id && !th_test_case_execution_id.is_a?(String)
59
65
  raise TypeError,
@@ -49,9 +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
- considered_elements_data = nil, sync = nil, test_case = nil, th_test_case_execution_id = nil)
52
+ considered_elements_data = nil, sync = nil, test_case = nil, labels = nil, th_test_case_execution_id = nil)
53
53
  body = request_body(name, tag, tiles, external_debug_url, ignored_elements_data,
54
- considered_elements_data, sync, test_case, th_test_case_execution_id)
54
+ considered_elements_data, sync, test_case, labels, th_test_case_execution_id)
55
55
  body['client_info'] = Percy::Environment.get_client_info
56
56
  body['environment_info'] = Percy::Environment.get_env_info
57
57
 
@@ -126,7 +126,7 @@ module Percy
126
126
  end
127
127
 
128
128
  def request_body(name, tag, tiles, external_debug_url, ignored_elements_data, considered_elements_data, sync,
129
- test_case, th_test_case_execution_id)
129
+ test_case, labels, th_test_case_execution_id)
130
130
  tiles = tiles.map(&:to_h)
131
131
  {
132
132
  'name' => name,
@@ -137,6 +137,7 @@ module Percy
137
137
  'considered_elements_data' => considered_elements_data,
138
138
  'sync' => sync,
139
139
  'test_case' => test_case,
140
+ 'labels' => labels,
140
141
  'th_test_case_execution_id' => th_test_case_execution_id
141
142
  }
142
143
  end
@@ -44,10 +44,11 @@ module Percy
44
44
  }
45
45
  sync = kwargs.fetch(:sync, nil)
46
46
  test_case = kwargs.fetch(:test_case, nil)
47
+ labels = kwargs.fetch(:labels, nil)
47
48
  th_test_case_execution_id = kwargs.fetch(:th_test_case_execution_id, nil)
48
49
 
49
50
  _post_screenshots(name, tag, tiles, get_debug_url, ignore_regions, consider_regions,
50
- sync, test_case, th_test_case_execution_id)
51
+ sync, test_case, labels, th_test_case_execution_id)
51
52
  end
52
53
 
53
54
  def _get_tag(**kwargs)
@@ -107,10 +108,11 @@ module Percy
107
108
  considered_regions,
108
109
  sync,
109
110
  test_case,
111
+ labels,
110
112
  th_test_case_execution_id
111
113
  )
112
114
  Percy::CLIWrapper.new.post_screenshots(
113
- name, tag, tiles, debug_url, ignored_regions, considered_regions, sync, test_case, th_test_case_execution_id
115
+ name, tag, tiles, debug_url, ignored_regions, considered_regions, sync, test_case, labels, th_test_case_execution_id
114
116
  )
115
117
  end
116
118
 
data/percy/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Percy
4
- VERSION = '0.0.8'.freeze
4
+ VERSION = '1.0.0'.freeze
5
5
  end
data/specs/cli_wrapper.rb CHANGED
@@ -106,9 +106,10 @@ class TestCLIWrapper < Minitest::Test
106
106
  debug_url = 'debug-url'
107
107
  sync = false
108
108
  test_case = 'test-case-1'
109
+ labels = 'app;testing'
109
110
  th_test_case_execution_id = 'uuid-1231231'
110
111
  response = @cli_wrapper.request_body(name, tag, [tile], debug_url, @ignored_elements_data,
111
- @considered_elements_data, sync, test_case, th_test_case_execution_id)
112
+ @considered_elements_data, sync, test_case, labels, th_test_case_execution_id)
112
113
  assert_equal response['name'], name
113
114
  assert_equal response['external_debug_url'], debug_url
114
115
  assert_equal response['tag'], tag
@@ -117,6 +118,7 @@ class TestCLIWrapper < Minitest::Test
117
118
  assert_equal response['considered_elements_data'], @considered_elements_data
118
119
  assert_equal response['sync'], sync
119
120
  assert_equal response['test_case'], test_case
121
+ assert_equal response['labels'], labels
120
122
  assert_equal response['th_test_case_execution_id'], th_test_case_execution_id
121
123
  end
122
124
 
@@ -129,7 +131,7 @@ class TestCLIWrapper < Minitest::Test
129
131
  considered_elements_data = nil
130
132
  sync = nil
131
133
  response = @cli_wrapper.send(:request_body, name, tag, [tile], debug_url, ignored_elements_data,
132
- considered_elements_data, sync, nil, nil)
134
+ considered_elements_data, sync, nil, nil, nil)
133
135
  assert_equal response['name'], name
134
136
  assert_nil response['external_debug_url']
135
137
  assert_equal response['tag'], tag
@@ -138,6 +140,7 @@ class TestCLIWrapper < Minitest::Test
138
140
  assert_nil response['considered_elements_data']
139
141
  assert_nil response['sync']
140
142
  assert_nil response['test_case']
143
+ assert_nil response['labels']
141
144
  assert_nil response['th_test_case_execution_id']
142
145
  end
143
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.8
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-03-28 00:00:00.000000000 Z
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.6
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