soda 1.0.11 → 1.0.12

Sign up to get free protection for your applications and to get access to all the features.
@@ -1075,7 +1075,7 @@ class Soda
1075
1075
  tmp_org_str = tmp_org_str.gsub("\n", '\n')
1076
1076
  tmp_str = "#{str}"
1077
1077
  tmp_str = tmp_str.gsub("\n", '\n')
1078
- PrintDebug("Replacing string '#{tmp_org_str}' with '#{tmp_str}'")
1078
+ PrintDebug("Replacing string '#{tmp_org_str}' with '#{tmp_str}'\n")
1079
1079
  end
1080
1080
 
1081
1081
  return str
@@ -1402,6 +1402,8 @@ class Soda
1402
1402
  if (result < 1)
1403
1403
  @rep.ReportFailure("Failed trying to close browser: '#{result}'!\n")
1404
1404
  end
1405
+
1406
+ @browser = nil
1405
1407
  end
1406
1408
 
1407
1409
  ###############################################################################
@@ -2722,6 +2724,10 @@ JSCode
2722
2724
  @exceptionExit = false
2723
2725
  @fileStack.push(file)
2724
2726
 
2727
+ if (@browser == nil)
2728
+ NewBrowser()
2729
+ end
2730
+
2725
2731
  @rep = SodaReporter.new(file, @saveHtml, resultsdir, 0, nil, rerun);
2726
2732
  SetGlobalVars()
2727
2733
 
@@ -2892,6 +2898,12 @@ JSCode
2892
2898
 
2893
2899
  if (tmp_result['Test Failure Count'].to_i != 0)
2894
2900
  tmp_result['result'] = -1
2901
+ elsif (tmp_result['Test JavaScript Error Count'].to_i != 0)
2902
+ tmp_result['result'] = -1
2903
+ elsif (tmp_result['Test Assert Failures'].to_i != 0)
2904
+ tmp_result['result'] = -1
2905
+ elsif (tmp_result['Test Exceptions'].to_i != 0)
2906
+ tmp_result['result'] = -1
2895
2907
  end
2896
2908
 
2897
2909
  tmp_result['Real_Test_Name'] = test
@@ -49,6 +49,14 @@ class SodaCSV
49
49
  def initialize(file)
50
50
  @csvdata = CSV.open(file, 'r')
51
51
  @fieldMap = @csvdata.shift
52
+ len = @fieldMap.length() -1
53
+
54
+ # this is to deal with badly writen CSV files #
55
+ for i in 0..len do
56
+ if (@fieldMap[i] == nil)
57
+ @fieldMap[i] = ""
58
+ end
59
+ end
52
60
  end
53
61
 
54
62
  ###############################################################################
@@ -682,8 +682,7 @@ class SodaReporter
682
682
  "--Test Event Count:#{@total}" +
683
683
  "--Test Assert Count:#{@asserts_count}" +
684
684
  "--Test Exceptions:#{@exception_count}\n"
685
- log(msg)
685
+ log(msg)
686
686
  end
687
-
688
687
  end
689
688
 
@@ -1121,7 +1121,7 @@ HTML
1121
1121
  tr_css = "onMouseOver=\"this.className='highlight'\""+
1122
1122
  " onMouseOut=\"this.className='tr_normal'\" class=\"tr_normal\""
1123
1123
 
1124
- suite_hash['tests'].sort_by { |h| h['Test Log File'] }.each do |test|
1124
+ suite_hash['tests'].sort_by { |h| h['Test Order'] }.each do |test|
1125
1125
  id += 1
1126
1126
  test_report = test['Test Log File']
1127
1127
  test_report = File.basename(test_report, ".log")
@@ -41,8 +41,10 @@ require 'FieldUtils'
41
41
  ###############################################################################
42
42
  def self.assert(field, value)
43
43
  comp = (!field.value.empty?)? field.value: field.text
44
+
44
45
  $curSoda.rep.log("Field Value: #{field.value}\n")
45
- if value.kind_of? Regexp
46
+
47
+ if (value.kind_of?(Regexp))
46
48
  return value.match(comp)
47
49
  end
48
50
  return value == comp
@@ -1,4 +1,4 @@
1
1
  require 'Soda'
2
2
 
3
- SODA_GEM_VERSION = "1.0.11"
3
+ SODA_GEM_VERSION = "1.0.12"
4
4
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soda
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 11
10
- version: 1.0.11
9
+ - 12
10
+ version: 1.0.12
11
11
  platform: ruby
12
12
  authors:
13
13
  - Trampus Richmond
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-15 00:00:00 -08:00
18
+ date: 2011-02-16 00:00:00 -08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency