qat-cucumber 6.0.1 → 7.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,58 @@
1
+
2
+ module QAT
3
+ module Formatter
4
+ # Helper for Formatters , most of the main methods are done to reduce code duplication
5
+ module UtilityFuction
6
+
7
+
8
+
9
+ def background(background)
10
+ @background_hash = {
11
+ keyword: background.keyword,
12
+ name: background.name,
13
+ description: background.description.nil? ? '' : background.description,
14
+ line: background.location.line,
15
+ type: 'background'
16
+ }
17
+ end
18
+
19
+ def create_feature_hash feature,uri
20
+ @feature_hash = {
21
+ id: feature.name,
22
+ uri: uri,
23
+ keyword: feature.keyword,
24
+ name: feature.name,
25
+ description: feature.description.nil? ? '' : feature.description,
26
+ line: feature.location.line
27
+ }
28
+ end
29
+
30
+ def get_lines_from_scenario(scenario_source, test_case)
31
+ if scenario_source.type == :Scenario
32
+ test_case.location.lines.max
33
+ else
34
+ test_case.location.lines.min
35
+ end
36
+ end
37
+
38
+ def calculate_row_number(scenario_source)
39
+ scenario_source.examples.table_body.each_with_index do |row, index|
40
+ return index + 1 if row == scenario_source.row
41
+ end
42
+ end
43
+
44
+ def get_example_values(scenario_source)
45
+ scenario_source.examples.table_body.each do |row|
46
+ if row == scenario_source.row
47
+ add_values_to_examples row[:cells]
48
+ end
49
+ end
50
+ end
51
+
52
+ def features?(test_step)
53
+ test_step.location.file.include?('.feature')
54
+ end
55
+
56
+ end
57
+ end
58
+ end
@@ -1,10 +1,4 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  # QAT is a Cucumber-based toolkit for automating tests. (https://github.com/readiness-it/qat-cucumber)
4
- gem 'qat-cucumber', '~> 6.0',
5
-
6
- # QAT-Web is a browser controller for Web testing (https://github.com/readiness-it/qat-web)
7
- #gem 'qat-web', '~> 6.0'
8
-
9
- # The next generation developer focused tool for automated testing of webapps (https://github.com/seleniumhq/selenium)
10
- #gem 'selenium-webdriver'
4
+ gem 'qat-cucumber'
@@ -1,5 +1,5 @@
1
1
  sync:
2
- host: 'sync.host.com'
2
+ host: 'pool.ntp.org'
3
3
  kill_if_failed: false
4
4
  method: 'ntp' #or 'ssh' or user defined method
5
5
  #opts: #option for sync methods
@@ -13,7 +13,7 @@
13
13
  # Around do |scenario, block|
14
14
  # # Your code here
15
15
  #
16
- # #DON'T FORGET TO CALL THE SCENARIO'S BLOCK!!!!
16
+ # #DON'T FORGET TO CALL THE SCENARIO'S BLOCK!!!!!!
17
17
  # block.call
18
18
 
19
19
  # # Your code here
@@ -15,7 +15,7 @@ module TestIds
15
15
 
16
16
  update_test_ids(files, max_test_id)
17
17
  else
18
- puts "There are no scenarios without test id. Last test id given was '@test##{max_test_id}'."
18
+ Kernel.puts "There are no scenarios without test id. Last test id given was '@test##{max_test_id}'."
19
19
  end
20
20
  end
21
21
 
@@ -39,8 +39,8 @@ module TestIds
39
39
  #@param files [Array] list of files to change
40
40
  #@see TestIds::Helpers#map_untaged
41
41
  def announce_changes(files)
42
- puts "Giving test ids to scenarios:"
43
- puts files.to_json({
42
+ Kernel.puts "Giving test ids to scenarios:"
43
+ Kernel.puts files.to_json({
44
44
  indent: ' ',
45
45
  space: ' ',
46
46
  object_nl: "\n"
@@ -57,7 +57,7 @@ module TestIds
57
57
  files.each { |file, lines| max_test_id = rewrite_file(file, lines, max_test_id) }
58
58
  rescue
59
59
  path = File.join(Dir.pwd, 'public', 'test_ids_failed.feature')
60
- puts "Tag attribution failed! Check '#{path}' for more information!"
60
+ Kernel.puts "Tag attribution failed! Check '#{path}' for more information!"
61
61
  File.write(path, file_lines.join)
62
62
  end
63
63
  end
@@ -75,7 +75,7 @@ module TestIds
75
75
 
76
76
  norm_lines.size.times do
77
77
  line = norm_lines.shift
78
- puts "Editing file #{file} @ line #{line}."
78
+ Kernel.puts "Editing file #{file} @ line #{line}."
79
79
  max_test_id = add_tags(file_lines, line, max_test_id)
80
80
  end
81
81
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qat-cucumber
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.1
4
+ version: 7.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - QAT
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-23 00:00:00.000000000 Z
11
+ date: 2021-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 2.4.0
19
+ version: 5.2.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 2.4.0
26
+ version: 5.2.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -72,28 +72,28 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '6.0'
75
+ version: '8.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
- version: '6.0'
82
+ version: '8.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: qat-devel
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '6.0'
89
+ version: '8.0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '6.0'
96
+ version: '8.0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: httparty
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -138,14 +138,17 @@ files:
138
138
  - lib/qat/cucumber/time.rb
139
139
  - lib/qat/cucumber/version.rb
140
140
  - lib/qat/cucumber/world.rb
141
+ - lib/qat/formatter/builder.rb
141
142
  - lib/qat/formatter/console.rb
142
143
  - lib/qat/formatter/dashboard.rb
144
+ - lib/qat/formatter/helper.rb
143
145
  - lib/qat/formatter/loggable.rb
144
146
  - lib/qat/formatter/loggable/mdc.rb
145
147
  - lib/qat/formatter/loggable/scenario_info.rb
146
148
  - lib/qat/formatter/scenario/name.rb
147
149
  - lib/qat/formatter/tags.rb
148
150
  - lib/qat/formatter/test_ids.rb
151
+ - lib/qat/formatter/utility_function.rb
149
152
  - lib/qat/jenkins.rb
150
153
  - lib/qat/project/Gemfile
151
154
  - lib/qat/project/Rakefile
@@ -180,14 +183,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
180
183
  requirements:
181
184
  - - "~>"
182
185
  - !ruby/object:Gem::Version
183
- version: '2.3'
186
+ version: '2.5'
184
187
  required_rubygems_version: !ruby/object:Gem::Requirement
185
188
  requirements:
186
189
  - - ">="
187
190
  - !ruby/object:Gem::Version
188
191
  version: '0'
189
192
  requirements: []
190
- rubygems_version: 3.0.6
193
+ rubygems_version: 3.0.8
191
194
  signing_key:
192
195
  specification_version: 4
193
196
  summary: QAT is a Cucumber-based toolkit for automating tests.