Skip to content

Commit 86aa94d

Browse files
committed
updating test image
1 parent bb2b5ef commit 86aa94d

4 files changed

Lines changed: 58 additions & 19 deletions

File tree

Gemfile.lock

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
chunky_png (1.3.6)
5+
domain_name (0.5.20190701)
6+
unf (>= 0.0.5, < 1.0.0)
7+
eyes_core (3.18.2)
8+
chunky_png (= 1.3.6)
9+
faraday
10+
faraday-cookie_jar
11+
faraday_middleware
12+
oily_png (~> 1.2)
13+
oj
14+
eyes_images (3.18.2)
15+
eyes_core (= 3.18.2)
16+
faraday (1.4.2)
17+
faraday-em_http (~> 1.0)
18+
faraday-em_synchrony (~> 1.0)
19+
faraday-excon (~> 1.1)
20+
faraday-net_http (~> 1.0)
21+
faraday-net_http_persistent (~> 1.1)
22+
multipart-post (>= 1.2, < 3)
23+
ruby2_keywords (>= 0.0.4)
24+
faraday-cookie_jar (0.0.7)
25+
faraday (>= 0.8.0)
26+
http-cookie (~> 1.0.0)
27+
faraday-em_http (1.0.0)
28+
faraday-em_synchrony (1.0.0)
29+
faraday-excon (1.1.0)
30+
faraday-net_http (1.0.1)
31+
faraday-net_http_persistent (1.1.0)
32+
faraday_middleware (1.0.0)
33+
faraday (~> 1.0)
34+
http-cookie (1.0.4)
35+
domain_name (~> 0.5)
36+
multipart-post (2.1.1)
37+
oily_png (1.2.0)
38+
chunky_png (~> 1.3.1)
39+
oj (3.11.5)
40+
ruby2_keywords (0.0.4)
41+
unf (0.1.4)
42+
unf_ext
43+
unf_ext (0.0.7.7)
44+
45+
PLATFORMS
46+
x86_64-darwin-20
47+
48+
DEPENDENCIES
49+
eyes_images
50+
51+
BUNDLED WITH
52+
2.2.17

PNG_IMG1.png

-375 KB
Binary file not shown.

applitools.png

14.4 KB
Loading

simple_test_script.rb

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
runner = Applitools::ClassicRunner.new
44
eyes = Applitools::Images::Eyes.new(runner: runner)
5-
batch = Applitools::BatchInfo.new('Applitools Screenshot example')
5+
batch = Applitools::BatchInfo.new('Demo Batch - Images - Ruby')
66

77
eyes.batch = batch
88

@@ -11,33 +11,20 @@
1111
end
1212

1313
begin
14-
file_path = './PNG_IMG1.png'
14+
file_path = './applitools.png'
1515
image_bytes = File.read(file_path)
1616
image = Applitools::Screenshot.from_datastream(image_bytes)
1717

18-
# Classic API
19-
eyes.open(app_name: 'Screenshot example app', test_name: 'Screenshot example classic api')
20-
eyes.check_image(tag: 'By file path', image_path: file_path)
21-
eyes.check_image(tag: 'By image bytes', image_bytes: image_bytes)
22-
eyes.check_image(tag: 'By Applitools Screenshot', image: image)
23-
eyes.check_region(tag: 'Check region example', image: image, region: Applitools::Region.new(200, 200, 100, 100))
24-
eyes.close
25-
26-
# Fluent API
27-
eyes.open(app_name: 'Screenshot example app', test_name: 'Screenshot example fluent api')
18+
eyes.open(app_name: 'Demo App - Images Ruby', test_name: 'Smoke Test - Images Ruby')
19+
2820
eyes.check('By file path', Applitools::Images::Target.path(file_path))
2921
eyes.check('By image bytes', Applitools::Images::Target.blob(image_bytes))
3022
eyes.check('By Applitools Screenshot', Applitools::Images::Target.screenshot(image))
31-
eyes.check(
32-
'Check region example',
33-
Applitools::Images::Target.screenshot(image).region(Applitools::Region.new(200, 200, 100, 100))
34-
)
23+
3524
eyes.close
3625
rescue => e
3726
puts e.message
3827
eyes.abort
3928
ensure
4029
puts runner.get_all_test_results
41-
end
42-
43-
30+
end

0 commit comments

Comments
 (0)