Skip to content

Commit a1a3f09

Browse files
committed
tweak skiping opencv4nodejs
1 parent 5fcba56 commit a1a3f09

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

test/functional/android/android/image_comparison_test.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def teardown
1616
end
1717

1818
def test_image_comparison_match_result
19-
skip 'Requres `npm install -g appium opencv4nodejs`' if `which opencv4nodejs`.empty?
19+
skip 'Requres `npm install -g appium opencv4nodejs`' unless `npm list -g opencv4nodejs`.include? 'opencv4nodejs'
2020

2121
image1 = File.read AppiumLibCoreTest.path_of('test/functional/data/test_normal.png')
2222
image2 = File.read AppiumLibCoreTest.path_of('test/functional/data/test_has_blue.png')
@@ -33,7 +33,7 @@ def test_image_comparison_match_result
3333
end
3434

3535
def test_image_comparison_find_result
36-
skip 'Requres `npm install -g appium opencv4nodejs`' if `which opencv4nodejs`.empty?
36+
skip 'Requres `npm install -g appium opencv4nodejs`' unless `npm list -g opencv4nodejs`.include? 'opencv4nodejs'
3737

3838
image1 = File.read AppiumLibCoreTest.path_of('test/functional/data/test_normal.png')
3939
image2 = File.read AppiumLibCoreTest.path_of('test/functional/data/test_has_blue.png')
@@ -50,7 +50,7 @@ def test_image_comparison_find_result
5050
end
5151

5252
def test_image_comparison_get_images_result
53-
skip 'Requres `npm install -g appium opencv4nodejs`' if `which opencv4nodejs`.empty?
53+
skip 'Requres `npm install -g appium opencv4nodejs`' unless `npm list -g opencv4nodejs`.include? 'opencv4nodejs'
5454

5555
image1 = File.read AppiumLibCoreTest.path_of('test/functional/data/test_normal.png')
5656
image2 = File.read AppiumLibCoreTest.path_of('test/functional/data/test_has_blue.png')

test/functional/ios/ios/device_test.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def setup
1212
end
1313

1414
def test_image_element
15-
skip 'Requres `npm install -g appium opencv4nodejs`' if `which opencv4nodejs`.empty?
15+
skip 'Requres `npm install -g appium opencv4nodejs`' unless `npm list -g opencv4nodejs`.include? 'opencv4nodejs'
1616

1717
@@driver.update_settings({ fixImageFindScreenshotDims: false,
1818
fixImageTemplateSize: true,
@@ -35,7 +35,7 @@ def test_image_element
3535
end
3636

3737
def test_image_elements
38-
skip 'Requres `npm install -g appium opencv4nodejs`' if `which opencv4nodejs`.empty?
38+
skip 'Requres `npm install -g appium opencv4nodejs`' unless `npm list -g opencv4nodejs`.include? 'opencv4nodejs'
3939

4040
@@driver.update_settings({ fixImageTemplateSize: true,
4141
autoUpdateImageElementPosition: true })

test/functional/ios/ios/image_comparison_test.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def setup
1414
end
1515

1616
def test_image_comparison_match_result
17-
skip 'Requres `npm install -g appium opencv4nodejs`' if `which opencv4nodejs`.empty?
17+
skip 'Requres `npm install -g appium opencv4nodejs`' unless `npm list -g opencv4nodejs`.include? 'opencv4nodejs'
1818

1919
image1 = File.read './test/functional/data/test_normal.png'
2020
image2 = File.read './test/functional/data/test_has_blue.png'
@@ -31,7 +31,7 @@ def test_image_comparison_match_result
3131
end
3232

3333
def test_image_comparison_find_result
34-
skip 'Requres `npm install -g appium opencv4nodejs`' if `which opencv4nodejs`.empty?
34+
skip 'Requres `npm install -g appium opencv4nodejs`' unless `npm list -g opencv4nodejs`.include? 'opencv4nodejs'
3535

3636
image1 = File.read './test/functional/data/test_normal.png'
3737
image2 = File.read './test/functional/data/test_has_blue.png'
@@ -48,7 +48,7 @@ def test_image_comparison_find_result
4848
end
4949

5050
def test_image_comparison_get_images_result
51-
skip 'Requres `npm install -g appium opencv4nodejs`' if `which opencv4nodejs`.empty?
51+
skip 'Requres `npm install -g appium opencv4nodejs`' unless `npm list -g opencv4nodejs`.include? 'opencv4nodejs'
5252

5353
image1 = File.read './test/functional/data/test_normal.png'
5454
image2 = File.read './test/functional/data/test_has_blue.png'

0 commit comments

Comments
 (0)