cukerail 0.6.0 → 0.6.1

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: 0465ce2350160b858f9a5ca0de5c45119fe19662
4
- data.tar.gz: 7949009c1da5b9d6c2aff74aa97ded446903acb2
3
+ metadata.gz: 89cc129ef2405374219790ba71227bdb5e178904
4
+ data.tar.gz: 91fe06120de5a825258e14fed46423e70ce2fda9
5
5
  SHA512:
6
- metadata.gz: 351549d3f6b305e039d508508d54a09a7bbf97bb54ecf99649b62ef64a5e1f00109072ef4aac9f3e2904dccb7902ca9f555cafc0d74ffab11d653e58602a2d76
7
- data.tar.gz: 8cb781eaf4293371ff2d208d12e363ddbd0bd7fb64564363d5338697202315351a28f9704f662771ecf90f51d9610a59b39c4472731fec1beb3fe9f9872752a5
6
+ metadata.gz: 9ef15180c2f8c5142987e98e705037d9db0379d8e10d07df25e12b677917ad15358f59c893e8a98d206467e9d7272ad3ad0782d6c11b51ebff4a8735ff4ff834
7
+ data.tar.gz: 6ca51caba884892fcc3abc6932d1f5da6258ce9efe0096c64de1ec11806883ab81bd306fcdb2c0fb5264f6a1e95d19f0275042e9dcd7115a662a59a3260c1870
@@ -1,3 +1,3 @@
1
1
  module Cukerail
2
- VERSION = "0.6.0"
2
+ VERSION = "0.6.1"
3
3
  end
data/lib/json_sender.rb CHANGED
@@ -68,8 +68,8 @@ module Cukerail
68
68
  def prepare_data(scenario,background_steps)
69
69
  steps = background_steps + "\n" + scenario['steps'].map{|s| s['keyword']+s['name']}.join("\n")
70
70
  type_ids = [1]
71
- type_ids << 7 if test_case.tags.any?{|tag| tag.name =~/manual/}
72
- type_ids << 13 if test_case.tags.any?{|tag| tag.name =~/on_hold/}
71
+ type_ids << 7 if scenario['tags'].any?{|tag| tag['name'] =~/manual/}
72
+ type_ids << 13 if scenario['tags'].any?{|tag| tag['name'] =~/on_hold/}
73
73
  #get the highest precedence type found in the tags. E.g. if it's @on_hold and @manual it selects 13 for on hold
74
74
  type_id = ([13,7,1] & type_ids).first
75
75
 
@@ -193,7 +193,8 @@ module Cukerail
193
193
  def remove_all_except_these_cases_from_suite(testcases,project_id,suite_id)
194
194
  puts '=== testcases === '
195
195
  puts testcases
196
- existing_cases = testrail_api_client.send_get("get_cases/#{project_id}&suite_id=#{suite_id}").map{|m| m['id']}
196
+ # get a list of automated tests, ignore manual or on hold tests
197
+ existing_cases = testrail_api_client.send_get("get_cases/#{project_id}&suite_id=#{suite_id}").select{|t| t['type_id']==1}.map{|m| m['id']}
197
198
  puts '===== existing_cases === '
198
199
  puts existing_cases
199
200
  (existing_cases - testcases).each do |case_to_remove|
@@ -1,4 +1,5 @@
1
1
  require_relative '../json_sender'
2
+ require 'byebug'
2
3
  desc 'load a json results file into a test suite, JSON=filename'
3
4
  task :load_to_suite do
4
5
  raise 'You must have JSON=filename on the command line' unless ENV['JSON']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cukerail
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Small