air_test 0.1.4.9 → 0.1.5.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 41ee1020896ed0182621576cb1573609558918eaf4c85d9ab8db7b614e8712ec
4
- data.tar.gz: ef767755f30717379d16dabbe6d02be580dc7eddbed31ff57d4836b869bd3743
3
+ metadata.gz: 4b19be078019395eb0f510f9f96d0acb563f45dddfce668d27ed1194d1c2302e
4
+ data.tar.gz: 1fb2a90ce3c6581dc5a77fdf23e71d2f0474fec361faf999960a41e92a31c77a
5
5
  SHA512:
6
- metadata.gz: 9f48ef1eb88057ab4d8bb8d000238b30d315e3eb10f3e28a7e7659c97a080fd9ddd9d0435adab7db69fa1ce33cfd48668fa0ddbf559ae088f7261f14820059fe
7
- data.tar.gz: 91e87b167e18552769891b65c1a2f004a8a9ea332a3a3b1591cc26ca8d4e697aab1b3f7e34930ce4d90d128c9d7e228ca5d1d11c90c527dbfe663a32c0ea2dbe
6
+ metadata.gz: 2cc0278ea9d903ce627c1afb64cc052c535900ab371d3b97a3e69e684135b4fbd52adde2e86c33750bc66377b2c8d3c9f63186d77f5eab478c14b42c3838ed5f
7
+ data.tar.gz: dfd2c4ad5a70b20c981b961c28e6f09506c6e4ce1176ab6a7296bd52dffa33a01a165e8b38f16724d4c0709753452f5cc7f2751344bc5f381575d47a1a3fef3e
@@ -19,7 +19,7 @@ module AirTest
19
19
  end
20
20
  # Set git user to bot
21
21
  system('git config user.name "air-test-bot"')
22
- system('git config user.email "jbarbedienne3@gmail.com"')
22
+ system('git config user.email "airtest.bot@gmail.com"')
23
23
  # Set remote to use bot token if available
24
24
  if @github_token
25
25
  repo_url = "github.com/#{@repo}.git"
@@ -81,7 +81,8 @@ module AirTest
81
81
  current_scenario = nil
82
82
  in_feature_block = false
83
83
  in_scenario_block = false
84
- blocks.each do |block|
84
+ last_block_type = nil
85
+ blocks.each_with_index do |block, idx|
85
86
  case block["type"]
86
87
  when "heading_1", "heading_2", "heading_3"
87
88
  heading_text = extract_text(block[block["type"]]["rich_text"])
@@ -131,6 +132,33 @@ module AirTest
131
132
  parsed_data[:meta][:assignee] = extract_assignee(text)
132
133
  end
133
134
  end
135
+ last_block_type = block["type"]
136
+ end
137
+ # Handle case where there is only one scenario and no explicit scenario heading
138
+ if parsed_data[:scenarios].empty?
139
+ # Try to find steps after the feature heading
140
+ steps = []
141
+ in_steps = false
142
+ blocks.each do |block|
143
+ case block["type"]
144
+ when "heading_1", "heading_2", "heading_3"
145
+ heading_text = extract_text(block[block["type"]]["rich_text"])
146
+ if heading_text.downcase.include?("feature")
147
+ in_steps = true
148
+ elsif heading_text.downcase.include?("scenario")
149
+ in_steps = true
150
+ else
151
+ in_steps = false
152
+ end
153
+ when "paragraph", "bulleted_list_item", "numbered_list_item"
154
+ text = extract_text(block[block["type"]]["rich_text"] || block["paragraph"]["rich_text"])
155
+ next if text.empty?
156
+ steps << text if in_steps
157
+ end
158
+ end
159
+ if steps.any?
160
+ parsed_data[:scenarios] << { title: "Scenario", steps: steps }
161
+ end
134
162
  end
135
163
  parsed_data[:feature] = parsed_data[:feature].strip
136
164
  parsed_data[:meta][:tags] = parsed_data[:meta][:tags].uniq
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AirTest
4
- VERSION = "0.1.4.9"
4
+ VERSION = "0.1.5.0"
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: air_test
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4.9
4
+ version: 0.1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - julien bouland
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-07-21 00:00:00.000000000 Z
10
+ date: 2025-07-23 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rails