kontrast 0.2.1 → 0.6.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/README.md +135 -96
- data/bin/kontrast +9 -5
- data/lib/kontrast.rb +17 -5
- data/lib/kontrast/api_client.rb +56 -0
- data/lib/kontrast/api_endpoint_comparator.rb +126 -0
- data/lib/kontrast/api_endpoint_runner.rb +99 -0
- data/lib/kontrast/api_endpoint_test.rb +8 -0
- data/lib/kontrast/configuration.rb +36 -7
- data/lib/kontrast/exceptions.rb +2 -1
- data/lib/kontrast/gallery/template.erb +152 -21
- data/lib/kontrast/gallery_creator.rb +105 -47
- data/lib/kontrast/global_runner.rb +121 -0
- data/lib/kontrast/image_helper.rb +63 -0
- data/lib/kontrast/image_uploader.rb +18 -0
- data/lib/kontrast/page_comparator.rb +46 -0
- data/lib/kontrast/page_runner.rb +95 -0
- data/lib/kontrast/page_test.rb +32 -0
- data/lib/kontrast/selenium_handler.rb +18 -7
- data/lib/kontrast/spec.rb +21 -0
- data/lib/kontrast/spec_builder.rb +54 -0
- data/lib/kontrast/test.rb +27 -0
- data/lib/kontrast/test_builder.rb +25 -9
- data/lib/kontrast/test_suite.rb +42 -0
- data/lib/kontrast/thumbnail_creator.rb +18 -0
- data/lib/kontrast/version.rb +1 -1
- data/spec/api_endpoint_comparator_spec.rb +125 -0
- data/spec/configuration_spec.rb +19 -0
- data/spec/gallery_creator_spec.rb +26 -20
- data/spec/{image_handler_spec.rb → global_runner_spec.rb} +17 -12
- data/spec/page_comparator_spec.rb +31 -0
- data/spec/page_runner_spec.rb +45 -0
- data/spec/spec_builder_spec.rb +32 -0
- data/spec/support/fixtures/image.jpg +0 -0
- data/spec/support/fixtures/image_clone.jpg +0 -0
- data/spec/support/fixtures/img1.jpg +0 -0
- data/spec/support/fixtures/img2.jpg +0 -0
- data/spec/support/fixtures/other_image.jpg +0 -0
- data/spec/test_builder_spec.rb +6 -3
- data/spec/test_spec.rb +53 -0
- data/spec/test_suite_spec.rb +56 -0
- metadata +91 -30
- data/lib/kontrast/image_handler.rb +0 -119
- data/lib/kontrast/runner.rb +0 -141
- data/spec/runner_spec.rb +0 -37
@@ -5,8 +5,8 @@ describe Kontrast::GalleryCreator do
|
|
5
5
|
end
|
6
6
|
|
7
7
|
before :each do
|
8
|
-
@
|
9
|
-
@gallery_creator = Kontrast::GalleryCreator.new(@
|
8
|
+
@page_comparator = Kontrast::PageComparator.new
|
9
|
+
@gallery_creator = Kontrast::GalleryCreator.new(@page_comparator.path)
|
10
10
|
end
|
11
11
|
|
12
12
|
it "can parse manifests" do
|
@@ -27,16 +27,16 @@ describe Kontrast::GalleryCreator do
|
|
27
27
|
diffs: {}
|
28
28
|
}
|
29
29
|
|
30
|
-
File.open("#{@
|
30
|
+
File.open("#{@page_comparator.path}/manifest_0.json", 'w') do |outf|
|
31
31
|
outf.write(manifest_1.to_json)
|
32
32
|
end
|
33
|
-
File.open("#{@
|
33
|
+
File.open("#{@page_comparator.path}/manifest_1.json", 'w') do |outf|
|
34
34
|
outf.write(manifest_2.to_json)
|
35
35
|
end
|
36
36
|
|
37
37
|
# Test get_manifests while we're at it
|
38
38
|
manifests = @gallery_creator.get_manifests
|
39
|
-
expect(manifests).to include(@
|
39
|
+
expect(manifests).to include(@page_comparator.path + "/manifest_0.json", @page_comparator.path + "/manifest_1.json")
|
40
40
|
|
41
41
|
# Parse
|
42
42
|
parsed_manifests = @gallery_creator.parse_manifests(manifests)
|
@@ -84,22 +84,28 @@ describe Kontrast::GalleryCreator do
|
|
84
84
|
}
|
85
85
|
}
|
86
86
|
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
{:image=>"../1280_home/production.png", :thumb=>"../1280_home/production_thumb.png", :domain=>"production"},
|
93
|
-
{:image=>"../1280_home/diff.png", :thumb=>"../1280_home/diff_thumb.png", :domain=>"diff", :diff_amt=>0.1337}]
|
94
|
-
}
|
95
|
-
},
|
87
|
+
|
88
|
+
groups, without_diffs, with_diffs = @gallery_creator.parse_directories(files, diffs)
|
89
|
+
|
90
|
+
expect(groups).to eq(['1280', '320'])
|
91
|
+
expect(without_diffs).to eql({
|
96
92
|
"320" => {
|
97
|
-
"home" =>
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
}
|
93
|
+
"home" => [
|
94
|
+
{:image=>"../320_home/test.png", :thumb=>"../320_home/test_thumb.png", :domain=>"test", :type=>'page'},
|
95
|
+
{:image=>"../320_home/production.png", :thumb=>"../320_home/production_thumb.png", :domain=>"production", :type=>'page'},
|
96
|
+
{:image=>"../320_home/diff.png", :thumb=>"../320_home/diff_thumb.png", :domain=>"diff", :type=>'page'},
|
97
|
+
],
|
98
|
+
},
|
99
|
+
})
|
100
|
+
|
101
|
+
expect(with_diffs).to eql({
|
102
|
+
"1280" => {
|
103
|
+
"home" => [
|
104
|
+
{:image=>"../1280_home/test.png", :thumb=>"../1280_home/test_thumb.png", :domain=>"test", :type=>'page'},
|
105
|
+
{:image=>"../1280_home/production.png", :thumb=>"../1280_home/production_thumb.png", :domain=>"production", :type=>'page'},
|
106
|
+
{:image=>"../1280_home/diff.png", :thumb=>"../1280_home/diff_thumb.png", :domain=>"diff", :diff_amt=>0.1337, :type=>'page'}
|
107
|
+
],
|
108
|
+
},
|
103
109
|
})
|
104
110
|
end
|
105
111
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
describe Kontrast::
|
1
|
+
describe Kontrast::GlobalRunner do
|
2
2
|
before :all do
|
3
3
|
Kontrast.configure do |config|
|
4
4
|
# Set up some tests
|
@@ -11,32 +11,37 @@ describe Kontrast::ImageHandler do
|
|
11
11
|
page.products "/"
|
12
12
|
end
|
13
13
|
end
|
14
|
+
|
15
|
+
Kontrast.configuration.test_oauth_app_proc = proc { double('app', uid: '123', secret: 'abc') }
|
14
16
|
end
|
15
17
|
|
16
18
|
before :each do
|
17
|
-
@
|
19
|
+
@page_comparator = Kontrast::PageComparator.new
|
20
|
+
|
21
|
+
@page_runner = Kontrast::PageRunner.new
|
22
|
+
@page_runner.instance_variable_set("@page_comparator", @page_comparator)
|
23
|
+
|
24
|
+
@runner = Kontrast::GlobalRunner.new
|
25
|
+
@runner.instance_variable_set("@page_runner", @page_runner)
|
18
26
|
end
|
19
27
|
|
20
28
|
it "can create a manifest for the current node" do
|
21
29
|
# Create some files
|
22
|
-
Kontrast.
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
Dir.chdir(path)
|
27
|
-
FileUtils.touch("diff_thumb.png")
|
28
|
-
end
|
30
|
+
Kontrast.page_test_suite.tests.each do |test|
|
31
|
+
test_name = "#{test.width}_#{test.name}"
|
32
|
+
path = FileUtils.mkdir_p(@page_comparator.path + "/#{test_name}").join('')
|
33
|
+
FileUtils.touch(File.join(path, 'diff_thumb.png'))
|
29
34
|
end
|
30
35
|
|
31
36
|
# Create a diff
|
32
|
-
@
|
37
|
+
@page_runner.diffs["1280_home"] = {
|
33
38
|
width: 1280,
|
34
39
|
name: "home",
|
35
40
|
diff: 0.1337
|
36
41
|
}
|
37
42
|
|
38
43
|
# Create the manifest
|
39
|
-
contents = @
|
44
|
+
contents = @runner.create_manifest
|
40
45
|
|
41
46
|
# Expectations
|
42
47
|
expect(contents[:diffs]).to eql({
|
@@ -49,4 +54,4 @@ describe Kontrast::ImageHandler do
|
|
49
54
|
|
50
55
|
expect(contents[:files]).to include("1280_home/diff_thumb.png", "1280_products/diff_thumb.png", "320_home/diff_thumb.png", "320_products/diff_thumb.png")
|
51
56
|
end
|
52
|
-
end
|
57
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
describe Kontrast::PageComparator do
|
2
|
+
before :all do
|
3
|
+
Kontrast.configure {}
|
4
|
+
end
|
5
|
+
|
6
|
+
let(:page_comparator) { Kontrast::PageComparator.new }
|
7
|
+
let(:img1_path) { File.expand_path("./spec/support/fixtures/img1.jpg") }
|
8
|
+
let(:img2_path) { File.expand_path("./spec/support/fixtures/img2.jpg") }
|
9
|
+
let(:test) { double("Test", width: 1280, name: 'fake_test', to_s: '1280') }
|
10
|
+
|
11
|
+
before do
|
12
|
+
allow(page_comparator).to receive(:test_image_path).with(anything).and_return(img1_path)
|
13
|
+
allow(page_comparator).to receive(:production_image_path).with(anything).and_return(img2_path)
|
14
|
+
end
|
15
|
+
|
16
|
+
it "can diff images" do
|
17
|
+
|
18
|
+
page_comparator.diff(test)
|
19
|
+
|
20
|
+
# The diff might be different on other systems
|
21
|
+
diff = page_comparator.diffs['1280'].delete(:diff)
|
22
|
+
expect(page_comparator.diffs).to eq({
|
23
|
+
'1280' => {
|
24
|
+
type: 'page',
|
25
|
+
width: 1280,
|
26
|
+
name: 'fake_test',
|
27
|
+
}
|
28
|
+
})
|
29
|
+
expect(diff).to be_within(0.0001).of(0.1985086492134394)
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
describe Kontrast::PageRunner do
|
2
|
+
before :all do
|
3
|
+
Kontrast.configure do |config|
|
4
|
+
# Set up some tests
|
5
|
+
config.pages(1280) do |page|
|
6
|
+
page.home "/"
|
7
|
+
page.products "/products"
|
8
|
+
end
|
9
|
+
config.pages(320) do |page|
|
10
|
+
page.home "/"
|
11
|
+
page.products "/products"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
before :each do
|
17
|
+
@page_runner = Kontrast::PageRunner.new
|
18
|
+
end
|
19
|
+
|
20
|
+
describe "split_run" do
|
21
|
+
it "return all tests when there is only one node" do
|
22
|
+
suite = Kontrast::TestSuite.new
|
23
|
+
@page_runner.split_run(1, 0).each { |t| suite << t }
|
24
|
+
expect(suite.to_h).to eql(Kontrast.page_test_suite.to_h)
|
25
|
+
end
|
26
|
+
|
27
|
+
it "returns a subset of the tests when there are multiple nodes" do
|
28
|
+
# Expect no split to be complete but all splits should combine into the total suite
|
29
|
+
collector_hash = Hash.new
|
30
|
+
(0..3).each do |i|
|
31
|
+
tests = @page_runner.split_run(4, i)
|
32
|
+
suite = Kontrast::TestSuite.new
|
33
|
+
tests.each { |t| suite << t }
|
34
|
+
expect(suite.to_h).to_not eql(Kontrast.page_test_suite.to_h)
|
35
|
+
|
36
|
+
suite.tests.each do |test|
|
37
|
+
collector_hash[test.width] ||= {}
|
38
|
+
collector_hash[test.width][test.name] = test.path
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
expect(collector_hash).to eql(Kontrast.page_test_suite.to_h)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
describe Kontrast::SpecBuilder do
|
2
|
+
before :each do
|
3
|
+
# Reset the spec suite
|
4
|
+
Kontrast.get_spec_builder.clear!
|
5
|
+
end
|
6
|
+
|
7
|
+
context "with a spec description" do
|
8
|
+
before :each do
|
9
|
+
Kontrast.describe("test_spec") do |spec|
|
10
|
+
spec.before_screenshot do |test_driver, production_driver, test|
|
11
|
+
"before! #{test_driver} #{production_driver} #{test}"
|
12
|
+
end
|
13
|
+
spec.after_screenshot do |test_driver, production_driver, test|
|
14
|
+
"after! #{test_driver} #{production_driver} #{test}"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
it "can build a spec" do
|
20
|
+
expect(Kontrast.get_spec_builder.specs.length).to eql 1
|
21
|
+
expect(Kontrast.get_spec_builder.specs.first.name).to eql "test_spec"
|
22
|
+
end
|
23
|
+
|
24
|
+
it "can run the spec's callbacks along with arguments" do
|
25
|
+
before_response = Kontrast.get_spec_builder.specs.first.before_screenshot(1, 2, 3)
|
26
|
+
expect(before_response).to eql("before! 1 2 3")
|
27
|
+
|
28
|
+
after_response = Kontrast.get_spec_builder.specs.first.after_screenshot(1, 2, 3)
|
29
|
+
expect(after_response).to eql("after! 1 2 3")
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/spec/test_builder_spec.rb
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
describe Kontrast::TestBuilder do
|
2
2
|
before :each do
|
3
3
|
# Reset the test suite
|
4
|
-
Kontrast.
|
4
|
+
if !Kontrast.page_test_suite.nil?
|
5
|
+
Kontrast.page_test_suite.clear!
|
6
|
+
end
|
5
7
|
end
|
6
8
|
|
7
9
|
it "can build a test suite" do
|
@@ -15,7 +17,8 @@ describe Kontrast::TestBuilder do
|
|
15
17
|
page.other_stuff = "/other-stuff"
|
16
18
|
end
|
17
19
|
end
|
18
|
-
|
20
|
+
|
21
|
+
expect(Kontrast.page_test_suite.to_h).to eql({
|
19
22
|
1280 => {
|
20
23
|
"home" => "/",
|
21
24
|
"products" => "/products"
|
@@ -33,7 +36,7 @@ describe Kontrast::TestBuilder do
|
|
33
36
|
page.home "/"
|
34
37
|
end
|
35
38
|
end
|
36
|
-
expect(Kontrast.
|
39
|
+
expect(Kontrast.page_test_suite.to_h).to eql({
|
37
40
|
1280 => {
|
38
41
|
"home" => "/"
|
39
42
|
}
|
data/spec/test_spec.rb
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
describe Kontrast::Test do
|
2
|
+
before :each do
|
3
|
+
# Reset specs & tests
|
4
|
+
Kontrast.get_spec_builder.clear!
|
5
|
+
if !Kontrast.page_test_suite.nil?
|
6
|
+
Kontrast.page_test_suite.clear!
|
7
|
+
end
|
8
|
+
|
9
|
+
# Add a spec and a test
|
10
|
+
Kontrast.describe("test") do |spec|
|
11
|
+
spec.before_screenshot do |test_driver, production_driver, test|
|
12
|
+
"before! #{test_driver} #{production_driver} #{test}"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
Kontrast.configure do |config|
|
16
|
+
config.pages(1280) do |page|
|
17
|
+
page.test "/"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
Kontrast.page_test_suite.bind_specs
|
21
|
+
end
|
22
|
+
|
23
|
+
it "can run a spec's callback" do
|
24
|
+
test = Kontrast.page_test_suite.tests.first
|
25
|
+
expect(test.run_callback(:before_screenshot, 1, 2, 3)).to eql("before! 1 2 3")
|
26
|
+
end
|
27
|
+
|
28
|
+
it "doesn't run a callback if it doesn't exist" do
|
29
|
+
test = Kontrast.page_test_suite.tests.first
|
30
|
+
expect { test.run_callback(:foo, 1) }.to raise_error(NoMethodError)
|
31
|
+
end
|
32
|
+
|
33
|
+
context "with a URI query" do
|
34
|
+
before :each do
|
35
|
+
Kontrast.configure do |config|
|
36
|
+
config.pages(1280, global_key: "global_value") do |page|
|
37
|
+
page.simple_path_test "/about"
|
38
|
+
page.complex_path_test "/about?key=value"
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
it "can build a path with global URL params only" do
|
44
|
+
test = Kontrast.page_test_suite.tests.find { |t| t.name == "simple_path_test" }
|
45
|
+
expect(test.path).to eql "/about?global_key=global_value"
|
46
|
+
end
|
47
|
+
|
48
|
+
it "can build a path with global and local URL params" do
|
49
|
+
test = Kontrast.page_test_suite.tests.find { |t| t.name == "complex_path_test" }
|
50
|
+
expect(test.path).to eql "/about?global_key=global_value&key=value"
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
describe Kontrast::TestSuite do
|
2
|
+
context "with a spec description and a test suite" do
|
3
|
+
before :each do
|
4
|
+
# Reset tests & specs
|
5
|
+
Kontrast.get_spec_builder.clear!
|
6
|
+
if !Kontrast.page_test_suite.nil?
|
7
|
+
Kontrast.page_test_suite.clear!
|
8
|
+
end
|
9
|
+
|
10
|
+
Kontrast.describe("test") do |spec|
|
11
|
+
spec.before_screenshot do |test_driver, production_driver, test|
|
12
|
+
puts "before"
|
13
|
+
end
|
14
|
+
spec.after_screenshot do |test_driver, production_driver, test|
|
15
|
+
puts "after"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
Kontrast.configure do |config|
|
20
|
+
config.pages(1280) do |page|
|
21
|
+
page.test "/"
|
22
|
+
page.something_else "/foo"
|
23
|
+
end
|
24
|
+
config.pages(320) do |page|
|
25
|
+
page.test "/"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
it "can bind specs to tests" do
|
31
|
+
test_320 = Kontrast.page_test_suite.tests.find { |t| t.width == 320 }
|
32
|
+
test_1280 = Kontrast.page_test_suite.tests.find { |t| t.width == 1280 }
|
33
|
+
test_foo = Kontrast.page_test_suite.tests.find { |t| t.name == "something_else" }
|
34
|
+
|
35
|
+
Kontrast.page_test_suite.bind_specs
|
36
|
+
|
37
|
+
test_spec = Kontrast.get_spec_builder.specs.first
|
38
|
+
expect(test_320.spec).to eql(test_spec)
|
39
|
+
expect(test_1280.spec).to eql(test_spec)
|
40
|
+
expect(test_foo.spec).to be_nil
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
it "can add new tests to the suite" do
|
45
|
+
suite = Kontrast::TestSuite.new
|
46
|
+
t = Kontrast::Test.new(1280, "foo", "/")
|
47
|
+
suite << t
|
48
|
+
expect(suite.tests).to include(t)
|
49
|
+
end
|
50
|
+
|
51
|
+
it "can't add non-tests to the suite" do
|
52
|
+
suite = Kontrast::TestSuite.new
|
53
|
+
t = "foo"
|
54
|
+
expect { suite << t }.to raise_error(Kontrast::TestSuiteException)
|
55
|
+
end
|
56
|
+
end
|
metadata
CHANGED
@@ -1,111 +1,111 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kontrast
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ilya Rubnich
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '10.0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '10.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: pry
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0.10'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0.10'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '3.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - ~>
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '1.6'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - ~>
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '1.6'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: thor
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - ~>
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0.0'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - ~>
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0.0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: selenium-webdriver
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - ~>
|
87
|
+
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '2.0'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - ~>
|
94
|
+
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '2.0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: workers
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - ~>
|
101
|
+
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0.2'
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- - ~>
|
108
|
+
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0.2'
|
111
111
|
- !ruby/object:Gem::Dependency
|
@@ -123,19 +123,47 @@ dependencies:
|
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: 2.13.2
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name: fog
|
126
|
+
name: fog-aws
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- - ~>
|
129
|
+
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: '
|
131
|
+
version: '0.9'
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- - ~>
|
136
|
+
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: '
|
138
|
+
version: '0.9'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: faraday
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0.9'
|
146
|
+
type: :runtime
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0.9'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: rack
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0.4'
|
160
|
+
type: :runtime
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0.4'
|
139
167
|
description: Kontrast is a testing tool that lets you build a frontend test suite
|
140
168
|
to run against your test and production websites. It uses Selenium to take screenshots
|
141
169
|
and ImageMagick to compare them. Kontrast then produces a detailed gallery of its
|
@@ -152,22 +180,45 @@ files:
|
|
152
180
|
- Rakefile
|
153
181
|
- bin/kontrast
|
154
182
|
- lib/kontrast.rb
|
183
|
+
- lib/kontrast/api_client.rb
|
184
|
+
- lib/kontrast/api_endpoint_comparator.rb
|
185
|
+
- lib/kontrast/api_endpoint_runner.rb
|
186
|
+
- lib/kontrast/api_endpoint_test.rb
|
155
187
|
- lib/kontrast/config/template.rb
|
156
188
|
- lib/kontrast/configuration.rb
|
157
189
|
- lib/kontrast/exceptions.rb
|
158
190
|
- lib/kontrast/gallery/template.erb
|
159
191
|
- lib/kontrast/gallery_creator.rb
|
160
|
-
- lib/kontrast/
|
161
|
-
- lib/kontrast/
|
192
|
+
- lib/kontrast/global_runner.rb
|
193
|
+
- lib/kontrast/image_helper.rb
|
194
|
+
- lib/kontrast/image_uploader.rb
|
195
|
+
- lib/kontrast/page_comparator.rb
|
196
|
+
- lib/kontrast/page_runner.rb
|
197
|
+
- lib/kontrast/page_test.rb
|
162
198
|
- lib/kontrast/selenium_handler.rb
|
199
|
+
- lib/kontrast/spec.rb
|
200
|
+
- lib/kontrast/spec_builder.rb
|
201
|
+
- lib/kontrast/test.rb
|
163
202
|
- lib/kontrast/test_builder.rb
|
203
|
+
- lib/kontrast/test_suite.rb
|
204
|
+
- lib/kontrast/thumbnail_creator.rb
|
164
205
|
- lib/kontrast/version.rb
|
206
|
+
- spec/api_endpoint_comparator_spec.rb
|
165
207
|
- spec/configuration_spec.rb
|
166
208
|
- spec/gallery_creator_spec.rb
|
167
|
-
- spec/
|
168
|
-
- spec/
|
209
|
+
- spec/global_runner_spec.rb
|
210
|
+
- spec/page_comparator_spec.rb
|
211
|
+
- spec/page_runner_spec.rb
|
212
|
+
- spec/spec_builder_spec.rb
|
169
213
|
- spec/spec_helper.rb
|
214
|
+
- spec/support/fixtures/image.jpg
|
215
|
+
- spec/support/fixtures/image_clone.jpg
|
216
|
+
- spec/support/fixtures/img1.jpg
|
217
|
+
- spec/support/fixtures/img2.jpg
|
218
|
+
- spec/support/fixtures/other_image.jpg
|
170
219
|
- spec/test_builder_spec.rb
|
220
|
+
- spec/test_spec.rb
|
221
|
+
- spec/test_suite_spec.rb
|
171
222
|
homepage: https://github.com/harrystech/kontrast
|
172
223
|
licenses:
|
173
224
|
- MIT
|
@@ -178,25 +229,35 @@ require_paths:
|
|
178
229
|
- lib
|
179
230
|
required_ruby_version: !ruby/object:Gem::Requirement
|
180
231
|
requirements:
|
181
|
-
- -
|
232
|
+
- - ">="
|
182
233
|
- !ruby/object:Gem::Version
|
183
234
|
version: '0'
|
184
235
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
185
236
|
requirements:
|
186
|
-
- -
|
237
|
+
- - ">="
|
187
238
|
- !ruby/object:Gem::Version
|
188
239
|
version: '0'
|
189
240
|
requirements: []
|
190
241
|
rubyforge_project:
|
191
|
-
rubygems_version: 2.4.1
|
242
|
+
rubygems_version: 2.4.5.1
|
192
243
|
signing_key:
|
193
244
|
specification_version: 4
|
194
245
|
summary: An automated testing tool for comparing visual differences between two versions
|
195
246
|
of a website.
|
196
247
|
test_files:
|
248
|
+
- spec/api_endpoint_comparator_spec.rb
|
197
249
|
- spec/configuration_spec.rb
|
198
250
|
- spec/gallery_creator_spec.rb
|
199
|
-
- spec/
|
200
|
-
- spec/
|
251
|
+
- spec/global_runner_spec.rb
|
252
|
+
- spec/page_comparator_spec.rb
|
253
|
+
- spec/page_runner_spec.rb
|
254
|
+
- spec/spec_builder_spec.rb
|
201
255
|
- spec/spec_helper.rb
|
256
|
+
- spec/support/fixtures/image.jpg
|
257
|
+
- spec/support/fixtures/image_clone.jpg
|
258
|
+
- spec/support/fixtures/img1.jpg
|
259
|
+
- spec/support/fixtures/img2.jpg
|
260
|
+
- spec/support/fixtures/other_image.jpg
|
202
261
|
- spec/test_builder_spec.rb
|
262
|
+
- spec/test_spec.rb
|
263
|
+
- spec/test_suite_spec.rb
|