cornucopia 0.1.19 → 0.1.20
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 38c170b2d71c1c3175246f92d3c5c50897420be5
|
4
|
+
data.tar.gz: 69bf621ca28be4ef849ae7119af8ec11400bac56
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f44990328b4b86fa801836ed300369ca1759fd3f313de82ec47b8427ec615ae5adf120d12379e77db1a0ddb8b898bfa2802f2ac6b8362154e9e32dbdee73a5e
|
7
|
+
data.tar.gz: cfd8f828be669a1f230fd2430448409d06d22ef376014cb6121845cb03675a832f9852380ddccbab8c6e3998a22112287cd0574e02624dee63c9379a03384967
|
@@ -16,7 +16,7 @@ module Cornucopia
|
|
16
16
|
new_args = args.dup
|
17
17
|
options = (new_args.pop if new_args.length > 1 && new_args[-1].is_a?(Hash)) || {}
|
18
18
|
|
19
|
-
if Cornucopia::Util::Configuration.
|
19
|
+
if Cornucopia::Util::Configuration.ignore_has_selector_errors
|
20
20
|
options = { __cornucopia_no_analysis: true }.merge options
|
21
21
|
end
|
22
22
|
|
@@ -27,7 +27,7 @@ module Cornucopia
|
|
27
27
|
new_args = args.dup
|
28
28
|
options = (new_args.pop if new_args.length > 1 && new_args[-1].is_a?(Hash)) || {}
|
29
29
|
|
30
|
-
if Cornucopia::Util::Configuration.
|
30
|
+
if Cornucopia::Util::Configuration.ignore_has_selector_errors
|
31
31
|
options = { __cornucopia_no_analysis: true }.merge options
|
32
32
|
end
|
33
33
|
__cornucopia_assert_selector_function(:has_no_selector?, *new_args, options)
|
data/lib/cornucopia/version.rb
CHANGED
@@ -516,7 +516,6 @@ describe Cornucopia::Capybara::FinderDiagnostics, type: :feature do
|
|
516
516
|
end
|
517
517
|
|
518
518
|
it "works with assert_selector" do
|
519
|
-
# TODO: figure out why this test appears to be flakey sometimes.
|
520
519
|
begin
|
521
520
|
Cornucopia::Util::Configuration.retry_match_with_found = true
|
522
521
|
|
@@ -539,11 +538,11 @@ describe Cornucopia::Capybara::FinderDiagnostics, type: :feature do
|
|
539
538
|
report_page.tests[0].click
|
540
539
|
report_page.displayed_test do |test_page|
|
541
540
|
test_page.contents do |contents_frame|
|
542
|
-
contents_frame.errors[
|
543
|
-
expect(contents_frame.errors.length).to be ==
|
544
|
-
expect(contents_frame.errors[
|
545
|
-
expect(contents_frame.errors[
|
546
|
-
expect(contents_frame.errors[
|
541
|
+
contents_frame.errors[0].more_details.show_hide.click
|
542
|
+
expect(contents_frame.errors.length).to be == 1
|
543
|
+
expect(contents_frame.errors[0].tables[0].rows.last.labels[0].text).not_to be == "Retrying action:"
|
544
|
+
expect(contents_frame.errors[0].more_details.details.rows.last.labels[0].text).to be == "Retrying action:"
|
545
|
+
expect(contents_frame.errors[0].more_details.details.rows.last.values[0].text).to be == "Found"
|
547
546
|
end
|
548
547
|
end
|
549
548
|
ensure
|
@@ -351,24 +351,64 @@ describe Cornucopia::Capybara::MatcherExtensions, type: :feature do
|
|
351
351
|
::Capybara.current_session.visit("/sample_report/sample_file.html")
|
352
352
|
end
|
353
353
|
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
354
|
+
describe "ignore_has_selector_errors = false" do
|
355
|
+
before(:example) do
|
356
|
+
Cornucopia::Util::Configuration.ignore_has_selector_errors = true
|
357
|
+
end
|
358
358
|
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
359
|
+
after(:example) do
|
360
|
+
Cornucopia::Util::Configuration.ignore_has_selector_errors = true
|
361
|
+
end
|
362
|
+
|
363
|
+
it "finds a has_selector? item and does not create a report" do
|
364
|
+
expect(::Capybara.current_session.has_selector?("\#select-box")).to be_truthy
|
365
|
+
expect(File.directory?(Rails.root.join("cornucopia_report/"))).to be_falsey
|
366
|
+
end
|
363
367
|
|
364
|
-
|
365
|
-
|
366
|
-
|
368
|
+
it "does not find a has_selector? item and does not create a report" do
|
369
|
+
expect(::Capybara.current_session.has_selector?("\#select-box-not-there")).to be_falsey
|
370
|
+
expect(File.directory?(Rails.root.join("cornucopia_report/"))).to be_falsey
|
371
|
+
end
|
372
|
+
|
373
|
+
it "finds a has_no_selector? item and does not create a report" do
|
374
|
+
expect(::Capybara.current_session.has_no_selector?("\#select-box-not-there")).to be_truthy
|
375
|
+
expect(File.directory?(Rails.root.join("cornucopia_report/"))).to be_falsey
|
376
|
+
end
|
377
|
+
|
378
|
+
it "does not find a has_no_selector? item and does not create a report" do
|
379
|
+
expect(::Capybara.current_session.has_no_selector?("\#select-box")).to be_falsey
|
380
|
+
expect(File.directory?(Rails.root.join("cornucopia_report/"))).to be_falsey
|
381
|
+
end
|
367
382
|
end
|
368
383
|
|
369
|
-
|
370
|
-
|
371
|
-
|
384
|
+
describe "ignore_has_selector_errors = false" do
|
385
|
+
before(:example) do
|
386
|
+
Cornucopia::Util::Configuration.ignore_has_selector_errors = false
|
387
|
+
end
|
388
|
+
|
389
|
+
after(:example) do
|
390
|
+
Cornucopia::Util::Configuration.ignore_has_selector_errors = true
|
391
|
+
end
|
392
|
+
|
393
|
+
it "finds a has_selector? item and does not create a report" do
|
394
|
+
expect(::Capybara.current_session.has_selector?("\#select-box")).to be_truthy
|
395
|
+
expect(File.directory?(Rails.root.join("cornucopia_report/"))).to be_falsey
|
396
|
+
end
|
397
|
+
|
398
|
+
it "does not find a has_selector? item and does not create a report" do
|
399
|
+
expect(::Capybara.current_session.has_selector?("\#select-box-not-there")).to be_falsey
|
400
|
+
expect(File.directory?(Rails.root.join("cornucopia_report/"))).to be_truthy
|
401
|
+
end
|
402
|
+
|
403
|
+
it "finds a has_no_selector? item and does not create a report" do
|
404
|
+
expect(::Capybara.current_session.has_no_selector?("\#select-box-not-there")).to be_truthy
|
405
|
+
expect(File.directory?(Rails.root.join("cornucopia_report/"))).to be_falsey
|
406
|
+
end
|
407
|
+
|
408
|
+
it "does not find a has_no_selector? item and does not create a report" do
|
409
|
+
expect(::Capybara.current_session.has_no_selector?("\#select-box")).to be_falsey
|
410
|
+
expect(File.directory?(Rails.root.join("cornucopia_report/"))).to be_truthy
|
411
|
+
end
|
372
412
|
end
|
373
413
|
end
|
374
414
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cornucopia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- RealNobody
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|