percy-appium-app 0.0.4 → 0.0.5.pre.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Gemfile +1 -1
- data/percy/lib/cache.rb +5 -0
- data/percy/metadata/ios_metadata.rb +1 -1
- data/percy/version.rb +1 -1
- data/percy-appium-app.gemspec +1 -1
- data/specs/cli_wrapper.rb +6 -2
- data/specs/generic_providers.rb +4 -1
- data/specs/ios_metadata.rb +4 -3
- metadata +9 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95d930f3f4b90c28a7e8af3101514fe4036a802444958fbb782681b2cae72a27
|
4
|
+
data.tar.gz: 24422fc182be9e140a616a5278d15eb0a72aef54afc70149539a8fcf1ea77710
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95b945769e577c60b2aef7bb4fd41760d1a59190eeba35cefd3c26c1007e27a33023d0d46e5e4ff85380edc3da6dfb9eb002f037a292eb7bd44d9cd06bfce288
|
7
|
+
data.tar.gz: 6fd233b31b4d5947160a45bae6ad41224b93a94fb87896856e090530ebd95eaca9db8b0311ed0263d0749533258a1891abcb7154e6b81b4a0600ad47fc3825f3
|
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Gemfile.lock
|
data/Gemfile
CHANGED
data/percy/lib/cache.rb
CHANGED
@@ -45,7 +45,7 @@ module Percy
|
|
45
45
|
def get_window_size
|
46
46
|
@_window_size = Percy::Cache.get_cache(session_id, Percy::Cache::WINDOW_SIZE)
|
47
47
|
unless @_window_size
|
48
|
-
@_window_size = driver.
|
48
|
+
@_window_size = driver.window_size
|
49
49
|
Percy::Cache.set_cache(session_id, Percy::Cache::WINDOW_SIZE, @_window_size)
|
50
50
|
end
|
51
51
|
@_window_size
|
data/percy/version.rb
CHANGED
data/percy-appium-app.gemspec
CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
26
26
|
spec.require_paths = ['percy']
|
27
27
|
|
28
|
-
spec.add_runtime_dependency 'appium_lib', '
|
28
|
+
spec.add_runtime_dependency 'appium_lib', '>= 11.2.0'
|
29
29
|
spec.add_runtime_dependency 'dotenv', '~> 2.8'
|
30
30
|
|
31
31
|
spec.add_development_dependency 'bundler', '~> 2.4'
|
data/specs/cli_wrapper.rb
CHANGED
@@ -104,14 +104,16 @@ class TestCLIWrapper < Minitest::Test
|
|
104
104
|
tag = { 'name' => 'Tag' }
|
105
105
|
name = 'some-name'
|
106
106
|
debug_url = 'debug-url'
|
107
|
+
sync = false
|
107
108
|
response = @cli_wrapper.request_body(name, tag, [tile], debug_url, @ignored_elements_data,
|
108
|
-
@considered_elements_data)
|
109
|
+
@considered_elements_data, sync)
|
109
110
|
assert_equal response['name'], name
|
110
111
|
assert_equal response['external_debug_url'], debug_url
|
111
112
|
assert_equal response['tag'], tag
|
112
113
|
assert_equal response['tiles'], [tile.to_h]
|
113
114
|
assert_equal response['ignored_elements_data'], @ignored_elements_data
|
114
115
|
assert_equal response['considered_elements_data'], @considered_elements_data
|
116
|
+
assert_equal response['sync'], sync
|
115
117
|
end
|
116
118
|
|
117
119
|
def test_request_body_when_optional_values_are_null
|
@@ -121,13 +123,15 @@ class TestCLIWrapper < Minitest::Test
|
|
121
123
|
debug_url = nil
|
122
124
|
ignored_elements_data = nil
|
123
125
|
considered_elements_data = nil
|
126
|
+
sync = nil
|
124
127
|
response = @cli_wrapper.send(:request_body, name, tag, [tile], debug_url, ignored_elements_data,
|
125
|
-
considered_elements_data)
|
128
|
+
considered_elements_data, sync)
|
126
129
|
assert_equal response['name'], name
|
127
130
|
assert_equal response['external_debug_url'], debug_url
|
128
131
|
assert_equal response['tag'], tag
|
129
132
|
assert_equal response['tiles'], [tile.to_h]
|
130
133
|
assert_nil response['ignored_elements_data']
|
131
134
|
assert_nil response['considered_elements_data']
|
135
|
+
assert_nil response['sync']
|
132
136
|
end
|
133
137
|
end
|
data/specs/generic_providers.rb
CHANGED
@@ -15,6 +15,7 @@ class TestGenericProvider < Minitest::Test
|
|
15
15
|
|
16
16
|
def setup
|
17
17
|
@existing_dir = 'existing-dir'
|
18
|
+
teardown
|
18
19
|
Dir.mkdir(@existing_dir)
|
19
20
|
|
20
21
|
@mock_webdriver = Minitest::Mock.new
|
@@ -33,7 +34,9 @@ class TestGenericProvider < Minitest::Test
|
|
33
34
|
end
|
34
35
|
|
35
36
|
def teardown
|
36
|
-
|
37
|
+
if Dir.exist?(@existing_dir)
|
38
|
+
FileUtils.remove_dir(@existing_dir, force: true)
|
39
|
+
end
|
37
40
|
end
|
38
41
|
|
39
42
|
def test_get_dir_without_env_variable
|
data/specs/ios_metadata.rb
CHANGED
@@ -37,7 +37,7 @@ class TestIOSMetadata < Minitest::Test
|
|
37
37
|
height = 100
|
38
38
|
width = 100
|
39
39
|
window_size = { 'height' => height, 'width' => width }
|
40
|
-
@mock_webdriver.expect(:
|
40
|
+
@mock_webdriver.expect(:window_size, window_size)
|
41
41
|
session_id = 'session_id_123'
|
42
42
|
@mock_webdriver.expect(:session_id, session_id)
|
43
43
|
@mock_webdriver.expect(:session_id, session_id)
|
@@ -48,12 +48,13 @@ class TestIOSMetadata < Minitest::Test
|
|
48
48
|
end
|
49
49
|
|
50
50
|
def test_device_screen_size
|
51
|
+
Percy::Cache.force_cleanup_cache
|
51
52
|
session_id = 'session_id_123'
|
52
53
|
5.times do
|
53
54
|
@mock_webdriver.expect(:session_id, session_id)
|
54
55
|
end
|
55
56
|
@mock_webdriver.expect(:capabilities, { 'deviceName' => 'iPhone 6' })
|
56
|
-
@mock_webdriver.expect(:
|
57
|
+
@mock_webdriver.expect(:window_size, { 'height' => 100, 'width' => 100 })
|
57
58
|
device_screen_size = @ios_metadata.device_screen_size
|
58
59
|
assert_equal({ 'height' => 200, 'width' => 200 }, device_screen_size)
|
59
60
|
end
|
@@ -80,7 +81,7 @@ class TestIOSMetadata < Minitest::Test
|
|
80
81
|
@mock_webdriver.expect(:session_id, session_id)
|
81
82
|
end
|
82
83
|
@mock_webdriver.expect(:capabilities, { 'deviceName' => 'iPhone 14' })
|
83
|
-
@mock_webdriver.expect(:
|
84
|
+
@mock_webdriver.expect(:window_size, window_size)
|
84
85
|
@mock_webdriver.expect(:execute_script, { 'height' => 100, 'width' => 200 }, ['mobile: viewportRect'])
|
85
86
|
|
86
87
|
assert_equal(2, @ios_metadata.scale_factor)
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
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: 0.0.5.pre.beta.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BroswerStack
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-02-
|
11
|
+
date: 2024-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: appium_lib
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 11.2.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 11.2.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: dotenv
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -137,6 +137,7 @@ files:
|
|
137
137
|
- ".github/workflows/release.yml"
|
138
138
|
- ".github/workflows/stale.yml"
|
139
139
|
- ".github/workflows/test.yml"
|
140
|
+
- ".gitignore"
|
140
141
|
- Gemfile
|
141
142
|
- LICENSE
|
142
143
|
- Makefile
|
@@ -197,9 +198,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
197
198
|
version: 2.6.0
|
198
199
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
199
200
|
requirements:
|
200
|
-
- - "
|
201
|
+
- - ">"
|
201
202
|
- !ruby/object:Gem::Version
|
202
|
-
version:
|
203
|
+
version: 1.3.1
|
203
204
|
requirements: []
|
204
205
|
rubygems_version: 3.1.6
|
205
206
|
signing_key:
|