nukadoko 0.1.0 → 0.3.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 +4 -4
- data/CHANGELOG.md +417 -0
- data/README.ja.md +62 -7
- data/README.md +19 -5
- data/exe/nuka +8 -0
- data/lib/nukadoko/aria_snapshot.rb +1008 -0
- data/lib/nukadoko/aria_tree.rb +150 -0
- data/lib/nukadoko/base.rb +294 -0
- data/lib/nukadoko/check.rb +669 -22
- data/lib/nukadoko/claim_check.rb +177 -0
- data/lib/nukadoko/claim_check_run.rb +293 -0
- data/lib/nukadoko/claim_line.rb +381 -0
- data/lib/nukadoko/claim_rules.rb +519 -0
- data/lib/nukadoko/claim_sides.rb +469 -0
- data/lib/nukadoko/claims.rb +576 -37
- data/lib/nukadoko/cli.rb +814 -22
- data/lib/nukadoko/codes.json +947 -0
- data/lib/nukadoko/codes.rb +19 -0
- data/lib/nukadoko/command.rb +214 -12
- data/lib/nukadoko/criteria.rb +172 -0
- data/lib/nukadoko/definition.rb +33 -41
- data/lib/nukadoko/env_check.rb +88 -0
- data/lib/nukadoko/features.rb +80 -10
- data/lib/nukadoko/fixtures.rb +329 -11
- data/lib/nukadoko/http_recording.rb +68 -0
- data/lib/nukadoko/init.rb +129 -0
- data/lib/nukadoko/js_json.rb +274 -0
- data/lib/nukadoko/js_pattern.rb +531 -0
- data/lib/nukadoko/judge.rb +221 -0
- data/lib/nukadoko/judgment_file.rb +78 -0
- data/lib/nukadoko/judgments.rb +256 -0
- data/lib/nukadoko/literal.rb +129 -0
- data/lib/nukadoko/measured.rb +105 -0
- data/lib/nukadoko/order.rb +84 -0
- data/lib/nukadoko/parts.rb +43 -22
- data/lib/nukadoko/pattern.rb +73 -3
- data/lib/nukadoko/poll.rb +21 -8
- data/lib/nukadoko/program.rb +105 -17
- data/lib/nukadoko/project_files.rb +17 -0
- data/lib/nukadoko/project_fixtures.rb +17 -2
- data/lib/nukadoko/project_program.rb +119 -0
- data/lib/nukadoko/report_allure.rb +751 -0
- data/lib/nukadoko/report_messages.rb +167 -0
- data/lib/nukadoko/report_run.rb +169 -0
- data/lib/nukadoko/run.rb +898 -91
- data/lib/nukadoko/run_record.rb +535 -0
- data/lib/nukadoko/scaffold.rb +1015 -0
- data/lib/nukadoko/schema.rb +120 -21
- data/lib/nukadoko/secrets.rb +375 -0
- data/lib/nukadoko/selection.rb +163 -0
- data/lib/nukadoko/signature.rb +4 -1
- data/lib/nukadoko/skill.rb +36 -0
- data/lib/nukadoko/spaces.rb +28 -0
- data/lib/nukadoko/step.rb +68 -21
- data/lib/nukadoko/summary.rb +662 -0
- data/lib/nukadoko/table.rb +34 -2
- data/lib/nukadoko/text_fit.rb +179 -0
- data/lib/nukadoko/trace.rb +244 -0
- data/lib/nukadoko/trace_actions.rb +116 -0
- data/lib/nukadoko/tree_passes.rb +122 -0
- data/lib/nukadoko/verdict.rb +128 -0
- data/lib/nukadoko/version.rb +2 -1
- data/lib/nukadoko/vocabulary.rb +6 -0
- data/lib/nukadoko/walk.rb +305 -0
- data/lib/nukadoko/walk_files.rb +473 -0
- data/lib/nukadoko/walk_step.rb +149 -0
- data/lib/nukadoko.rb +60 -2
- data/llms.txt +297 -0
- data/sig/generated/nukadoko/aria_snapshot.rbs +331 -0
- data/sig/generated/nukadoko/aria_tree.rbs +142 -0
- data/sig/generated/nukadoko/base.rbs +142 -0
- data/sig/generated/nukadoko/check.rbs +255 -0
- data/sig/generated/nukadoko/claim_check.rbs +118 -0
- data/sig/generated/nukadoko/claim_check_run.rbs +88 -0
- data/sig/generated/nukadoko/claim_line.rbs +158 -0
- data/sig/generated/nukadoko/claim_rules.rbs +172 -0
- data/sig/generated/nukadoko/claim_sides.rbs +207 -0
- data/sig/generated/nukadoko/claims.rbs +208 -0
- data/sig/generated/nukadoko/cli.rbs +182 -0
- data/sig/generated/nukadoko/codes.rbs +16 -0
- data/sig/generated/nukadoko/command.rbs +109 -0
- data/sig/generated/nukadoko/criteria.rbs +83 -0
- data/sig/generated/nukadoko/definition.rbs +30 -0
- data/sig/generated/nukadoko/env_check.rbs +34 -0
- data/sig/generated/nukadoko/features.rbs +101 -0
- data/sig/generated/nukadoko/fixtures.rbs +175 -0
- data/sig/generated/nukadoko/http_recording.rbs +29 -0
- data/sig/generated/nukadoko/init.rbs +64 -0
- data/sig/generated/nukadoko/js_json.rbs +109 -0
- data/sig/generated/nukadoko/js_pattern.rbs +194 -0
- data/sig/generated/nukadoko/judge.rbs +64 -0
- data/sig/generated/nukadoko/judgment_file.rbs +39 -0
- data/sig/generated/nukadoko/judgments.rbs +120 -0
- data/sig/generated/nukadoko/literal.rbs +71 -0
- data/sig/generated/nukadoko/measured.rbs +42 -0
- data/sig/generated/nukadoko/order.rbs +54 -0
- data/sig/generated/nukadoko/parts.rbs +35 -0
- data/sig/generated/nukadoko/pattern.rbs +62 -0
- data/sig/generated/nukadoko/poll.rbs +41 -0
- data/sig/generated/nukadoko/program.rbs +101 -0
- data/sig/generated/nukadoko/project_files.rbs +19 -0
- data/sig/generated/nukadoko/project_fixtures.rbs +57 -0
- data/sig/generated/nukadoko/project_program.rbs +55 -0
- data/sig/generated/nukadoko/report_allure.rbs +268 -0
- data/sig/generated/nukadoko/report_messages.rbs +68 -0
- data/sig/generated/nukadoko/report_run.rbs +102 -0
- data/sig/generated/nukadoko/run.rbs +264 -0
- data/sig/generated/nukadoko/run_record.rbs +175 -0
- data/sig/generated/nukadoko/scaffold.rbs +328 -0
- data/sig/generated/nukadoko/schema.rbs +155 -0
- data/sig/generated/nukadoko/secrets.rbs +172 -0
- data/sig/generated/nukadoko/selection.rbs +73 -0
- data/sig/generated/nukadoko/signature.rbs +17 -0
- data/sig/generated/nukadoko/skill.rbs +20 -0
- data/sig/generated/nukadoko/spaces.rbs +31 -0
- data/sig/generated/nukadoko/step.rbs +115 -0
- data/sig/generated/nukadoko/summary.rbs +204 -0
- data/sig/generated/nukadoko/table.rbs +43 -0
- data/sig/generated/nukadoko/text_fit.rbs +70 -0
- data/sig/generated/nukadoko/trace.rbs +127 -0
- data/sig/generated/nukadoko/trace_actions.rbs +40 -0
- data/sig/generated/nukadoko/tree_passes.rbs +48 -0
- data/sig/generated/nukadoko/verdict.rbs +56 -0
- data/sig/generated/nukadoko/version.rbs +5 -0
- data/sig/generated/nukadoko/vocabulary.rbs +25 -0
- data/sig/generated/nukadoko/walk.rbs +139 -0
- data/sig/generated/nukadoko/walk_files.rbs +189 -0
- data/sig/generated/nukadoko/walk_step.rbs +50 -0
- data/sig/generated/nukadoko.rbs +26 -0
- data/sig/nukadoko.rbs +5 -48
- data/skills/nukadoko/SKILL.md +120 -0
- data/skills/nukadoko/references/checking-steps.md +200 -0
- data/skills/nukadoko/references/diagnosing.md +200 -0
- data/skills/nukadoko/references/done.md +99 -0
- data/skills/nukadoko/references/evidence.md +124 -0
- data/skills/nukadoko/references/examples/cli.md +230 -0
- data/skills/nukadoko/references/examples/http-api.md +342 -0
- data/skills/nukadoko/references/examples/workflow.md +173 -0
- data/skills/nukadoko/references/exploring.md +184 -0
- data/skills/nukadoko/references/fixtures.md +198 -0
- data/skills/nukadoko/references/from-prose.md +51 -0
- data/skills/nukadoko/references/judgments.md +95 -0
- data/skills/nukadoko/references/maintenance.md +97 -0
- data/skills/nukadoko/references/merge-risk.md +74 -0
- data/skills/nukadoko/references/parts.md +152 -0
- data/skills/nukadoko/references/perturbed-worlds.md +109 -0
- data/skills/nukadoko/references/program.md +200 -0
- data/skills/nukadoko/references/reviewing.md +200 -0
- data/skills/nukadoko/references/running.md +200 -0
- data/skills/nukadoko/references/scenario-rules.md +188 -0
- data/skills/nukadoko/references/states.md +66 -0
- data/skills/nukadoko/references/step-files.md +200 -0
- data/skills/nukadoko/references/verdicts.md +200 -0
- data/skills/nukadoko/references/writing-steps.md +200 -0
- data/skills/nukadoko/references/writing-the-feature.md +165 -0
- data/skills/nukadoko/scripts/claude-code-verdict-hook.mjs +99 -0
- data/skills/nukadoko/scripts/merge-risk.jq +56 -0
- data/skills/nukadoko-verification/SKILL.md +263 -0
- metadata +133 -1
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
# Generated from lib/nukadoko/report_allure.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
# One run as Allure results, for `nuka report --format allure`, in the shape
|
|
4
|
+
# the TypeScript engine writes them (src/report/allure/): one test result
|
|
5
|
+
# per execution, with one step per line of the scenario, its hooks as
|
|
6
|
+
# fixtures in containers of their own, `categories.json`, and
|
|
7
|
+
# `environment.properties`. That engine writes through allure-js-commons;
|
|
8
|
+
# this one writes the same JSON itself, field for field, since Allure reads
|
|
9
|
+
# the files and nothing else.
|
|
10
|
+
#
|
|
11
|
+
# A file's name is derived from the run, the scenario execution, and its
|
|
12
|
+
# place in the render, never from a random id, so a second render of a run
|
|
13
|
+
# writes the same names and replaces what the first wrote. `historyId` and
|
|
14
|
+
# `testCaseId` use allure-js-commons' own formula (md5 of the full name, and
|
|
15
|
+
# of the parameters that are not excluded), so a result keeps the history
|
|
16
|
+
# the TypeScript engine's results of the same scenario built up.
|
|
17
|
+
#
|
|
18
|
+
# A failure stays as small as it can: an attachment that cannot be read
|
|
19
|
+
# costs that attachment, a step that cannot be mapped costs that step a
|
|
20
|
+
# broken entry, and a scenario that cannot be written costs its own result.
|
|
21
|
+
# Each is a problem the report names.
|
|
22
|
+
module Nukadoko
|
|
23
|
+
module Engine
|
|
24
|
+
module ReportAllure
|
|
25
|
+
# The kinds of a step's failure, in the order categories.json lists them.
|
|
26
|
+
CATEGORY_NAMES: untyped
|
|
27
|
+
|
|
28
|
+
# failed: the system under test broke the contract. broken: the
|
|
29
|
+
# contract layer did not reach a verdict.
|
|
30
|
+
FAILED_KINDS: untyped
|
|
31
|
+
|
|
32
|
+
MEDIA_TYPE_BY_EXTENSION: untyped
|
|
33
|
+
|
|
34
|
+
# allure-js-commons' extension for a media type, for an attachment
|
|
35
|
+
# whose own name has none.
|
|
36
|
+
EXTENSION_BY_MEDIA_TYPE: untyped
|
|
37
|
+
|
|
38
|
+
TRACE: ::String
|
|
39
|
+
|
|
40
|
+
ALLURE_LABEL_TAG: ::Regexp
|
|
41
|
+
|
|
42
|
+
ALLURE_ID_TAG: ::Regexp
|
|
43
|
+
|
|
44
|
+
# Writes the files of one render under names derived from the
|
|
45
|
+
# execution being written, and keeps one execution's files from
|
|
46
|
+
# landing half-written: they are kept in memory until `commit`.
|
|
47
|
+
class Writer
|
|
48
|
+
attr_reader written: Array[String]
|
|
49
|
+
|
|
50
|
+
# : (String) -> void
|
|
51
|
+
def initialize: (String) -> void
|
|
52
|
+
|
|
53
|
+
# : (String) -> void
|
|
54
|
+
def begin: (String) -> void
|
|
55
|
+
|
|
56
|
+
# The next name of the execution: the first 16 bytes of the SHA-256
|
|
57
|
+
# of the key and the place, with the version 8 and RFC 9562 variant
|
|
58
|
+
# bits set, as the TypeScript engine names it.
|
|
59
|
+
# : () -> String
|
|
60
|
+
def reserve: () -> String
|
|
61
|
+
|
|
62
|
+
# : (untyped) -> String
|
|
63
|
+
def name_of: (untyped) -> String
|
|
64
|
+
|
|
65
|
+
# : (String) -> String
|
|
66
|
+
def attachment_name: (String) -> String
|
|
67
|
+
|
|
68
|
+
# : (String, String, ?note: bool) -> void
|
|
69
|
+
def file: (String, String, ?note: bool) -> void
|
|
70
|
+
|
|
71
|
+
# : (String, String) -> void
|
|
72
|
+
def copy: (String, String) -> void
|
|
73
|
+
|
|
74
|
+
# : (Hash[Symbol, untyped]) -> void
|
|
75
|
+
def result: (Hash[Symbol, untyped]) -> void
|
|
76
|
+
|
|
77
|
+
# : (Hash[Symbol, untyped]) -> void
|
|
78
|
+
def container: (Hash[Symbol, untyped]) -> void
|
|
79
|
+
|
|
80
|
+
# : () -> void
|
|
81
|
+
def discard: () -> void
|
|
82
|
+
|
|
83
|
+
# : () -> void
|
|
84
|
+
def commit: () -> void
|
|
85
|
+
|
|
86
|
+
private
|
|
87
|
+
|
|
88
|
+
# : (String, String) -> void
|
|
89
|
+
def link_or_copy: (String, String) -> void
|
|
90
|
+
|
|
91
|
+
# : (String) { (String) -> void } -> void
|
|
92
|
+
def atomic: (String) { (String) -> void } -> void
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# : (String) -> String
|
|
96
|
+
def self?.status_for_kind: (String) -> String
|
|
97
|
+
|
|
98
|
+
# : (String) -> String
|
|
99
|
+
def self?.failure_marker: (String) -> String
|
|
100
|
+
|
|
101
|
+
# : () -> Array[Hash[Symbol, untyped]]
|
|
102
|
+
def self?.categories: () -> Array[Hash[Symbol, untyped]]
|
|
103
|
+
|
|
104
|
+
# Writes every result of `run` into `dir`, and returns the files it
|
|
105
|
+
# wrote; what it left out goes to `warn`.
|
|
106
|
+
# : (ReportRun, String, ^(String) -> void) -> Array[String]
|
|
107
|
+
def self?.write: (ReportRun, String, ^(String) -> void) -> Array[String]
|
|
108
|
+
|
|
109
|
+
# : (ReportRun, ReportRun::Scenario, Writer, ^(String) -> void) -> void
|
|
110
|
+
def self?.write_scenario: (ReportRun, ReportRun::Scenario, Writer, ^(String) -> void) -> void
|
|
111
|
+
|
|
112
|
+
# What the run directory says of one execution, in the shape the
|
|
113
|
+
# mapping reads: run.json's scenario entry, with its evidence under
|
|
114
|
+
# the run directory.
|
|
115
|
+
# : (ReportRun, Hash[Symbol, untyped]) -> Hash[Symbol, untyped]
|
|
116
|
+
def self?.scenario_record: (ReportRun, Hash[Symbol, untyped]) -> Hash[Symbol, untyped]
|
|
117
|
+
|
|
118
|
+
# : (untyped) -> Integer
|
|
119
|
+
def self?.ms: (untyped) -> Integer
|
|
120
|
+
|
|
121
|
+
# : (String?, String, String) -> Array[String]
|
|
122
|
+
def self?.title_path: (String?, String, String) -> Array[String]
|
|
123
|
+
|
|
124
|
+
# : (Writer, Hash[Symbol, untyped], String, Array[String], ^(Hash[Symbol, untyped], Hash[Symbol, untyped]) -> void) -> Hash[Symbol, untyped]
|
|
125
|
+
def self?.test_result: (Writer, Hash[Symbol, untyped], String, Array[String], ^(Hash[Symbol, untyped], Hash[Symbol, untyped]) -> void) -> Hash[Symbol, untyped]
|
|
126
|
+
|
|
127
|
+
# `ALLURE_LABEL_*` as the process rendering the report sees it: the
|
|
128
|
+
# person rendering chooses those, and the run recorded none.
|
|
129
|
+
# : () -> Array[Hash[Symbol, untyped]]
|
|
130
|
+
def self?.environment_labels: () -> Array[Hash[Symbol, untyped]]
|
|
131
|
+
|
|
132
|
+
# The parameters that join historyId, as allure-js-commons orders
|
|
133
|
+
# them: by name, then by value.
|
|
134
|
+
# : (Array[Hash[Symbol, untyped]]) -> String
|
|
135
|
+
def self?.parameters_text: (Array[Hash[Symbol, untyped]]) -> String
|
|
136
|
+
|
|
137
|
+
# A sort key near the Unicode collation JavaScript's localeCompare
|
|
138
|
+
# uses: punctuation before digits before letters, letters without
|
|
139
|
+
# case first and lowercase before uppercase on a tie.
|
|
140
|
+
# : (untyped) -> Array[untyped]
|
|
141
|
+
def self?.collation: (untyped) -> Array[untyped]
|
|
142
|
+
|
|
143
|
+
# : (untyped, String, Integer?, Integer?, ?parameters: Array[Hash[Symbol, untyped]], ?message: String?) -> Hash[Symbol, untyped]
|
|
144
|
+
def self?.step_result: (untyped, String, Integer?, Integer?, ?parameters: Array[Hash[Symbol, untyped]], ?message: String?) -> Hash[Symbol, untyped]
|
|
145
|
+
|
|
146
|
+
# : (Hash[Symbol, untyped], ^(Hash[Symbol, untyped], Hash[Symbol, untyped]) -> void) -> Hash[Symbol, untyped]
|
|
147
|
+
def self?.gwt_step: (Hash[Symbol, untyped], ^(Hash[Symbol, untyped], Hash[Symbol, untyped]) -> void) -> Hash[Symbol, untyped]
|
|
148
|
+
|
|
149
|
+
# : (Array[Hash[Symbol, untyped]]) -> Array[Hash[Symbol, untyped]]
|
|
150
|
+
def self?.child_steps: (Array[Hash[Symbol, untyped]]) -> Array[Hash[Symbol, untyped]]
|
|
151
|
+
|
|
152
|
+
# : (Hash[Symbol, untyped], ^(Hash[Symbol, untyped], Hash[Symbol, untyped]) -> void) -> [untyped, Hash[Symbol, untyped]]
|
|
153
|
+
def self?.fixture: (Hash[Symbol, untyped], ^(Hash[Symbol, untyped], Hash[Symbol, untyped]) -> void) -> [ untyped, Hash[Symbol, untyped] ]
|
|
154
|
+
|
|
155
|
+
# An attachment that cannot be read, or whose path is refused, costs
|
|
156
|
+
# that attachment only.
|
|
157
|
+
# : (ReportRun, Writer, Hash[Symbol, untyped], Hash[Symbol, untyped], ^(String) -> void) -> void
|
|
158
|
+
def self?.write_attachment: (ReportRun, Writer, Hash[Symbol, untyped], Hash[Symbol, untyped], ^(String) -> void) -> void
|
|
159
|
+
|
|
160
|
+
# A Java properties file, escaped as allure-js-commons escapes it.
|
|
161
|
+
# : (Hash[untyped, untyped]) -> String
|
|
162
|
+
def self?.properties: (Hash[untyped, untyped]) -> String
|
|
163
|
+
|
|
164
|
+
# : (String, bool, ?separators: bool) -> String
|
|
165
|
+
def self?.escape: (String, bool, ?separators: bool) -> String
|
|
166
|
+
|
|
167
|
+
# : (Hash[Symbol, untyped], ReportRun::Scenario, Hash[String, untyped], Hash[String, untyped], ^(String) -> void) -> Array[Hash[Symbol, untyped]]
|
|
168
|
+
def self?.map_steps: (Hash[Symbol, untyped], ReportRun::Scenario, Hash[String, untyped], Hash[String, untyped], ^(String) -> void) -> Array[Hash[Symbol, untyped]]
|
|
169
|
+
|
|
170
|
+
# : (Hash[String, untyped]?) -> [Integer, Integer]?
|
|
171
|
+
def self?.own_span: (Hash[String, untyped]?) -> [ Integer, Integer ]?
|
|
172
|
+
|
|
173
|
+
# : (Hash[String, untyped]) -> Array[Hash[String, untyped]]
|
|
174
|
+
def self?.scenarios_of: (Hash[String, untyped]) -> Array[Hash[String, untyped]]
|
|
175
|
+
|
|
176
|
+
# : (Hash[String, untyped]) -> Hash[String, Hash[String, untyped]]
|
|
177
|
+
def self?.gherkin_steps: (Hash[String, untyped]) -> Hash[String, Hash[String, untyped]]
|
|
178
|
+
|
|
179
|
+
# : (Hash[String, untyped], Hash[String, untyped], Integer, String) -> String
|
|
180
|
+
def self?.step_name: (Hash[String, untyped], Hash[String, untyped], Integer, String) -> String
|
|
181
|
+
|
|
182
|
+
# : (Hash[String, untyped], Hash[String, untyped]) -> untyped
|
|
183
|
+
def self?.example_row: (Hash[String, untyped], Hash[String, untyped]) -> untyped
|
|
184
|
+
|
|
185
|
+
# : (Array[Hash[String, untyped]]) -> String
|
|
186
|
+
def self?.csv_row: (Array[Hash[String, untyped]]) -> String
|
|
187
|
+
|
|
188
|
+
# : (String, String, String, String) -> Hash[Symbol, untyped]
|
|
189
|
+
def self?.buffer: (String, String, String, String) -> Hash[Symbol, untyped]
|
|
190
|
+
|
|
191
|
+
# : (String, String, String) -> Hash[Symbol, untyped]
|
|
192
|
+
def self?.path_attachment: (String, String, String) -> Hash[Symbol, untyped]
|
|
193
|
+
|
|
194
|
+
# : (untyped, String) -> String
|
|
195
|
+
def self?.join_relative: (untyped, String) -> String
|
|
196
|
+
|
|
197
|
+
# : (String) -> String
|
|
198
|
+
def self?.content_type: (String) -> String
|
|
199
|
+
|
|
200
|
+
# Attachments, log lines, links, labels, and parameters a step or a
|
|
201
|
+
# hook declared, the same shape either way.
|
|
202
|
+
# : (Hash[String, untyped]?, String?, Integer?) -> Hash[Symbol, untyped]
|
|
203
|
+
def self?.map_declared: (Hash[String, untyped]?, String?, Integer?) -> Hash[Symbol, untyped]
|
|
204
|
+
|
|
205
|
+
# : (Hash[Symbol, untyped], Hash[String, untyped]?, bool) -> Hash[Symbol, untyped]
|
|
206
|
+
def self?.step_outcome: (Hash[Symbol, untyped], Hash[String, untyped]?, bool) -> Hash[Symbol, untyped]
|
|
207
|
+
|
|
208
|
+
# : (Hash[Symbol, untyped]) -> Hash[Symbol, untyped]
|
|
209
|
+
def self?.hook_outcome: (Hash[Symbol, untyped]) -> Hash[Symbol, untyped]
|
|
210
|
+
|
|
211
|
+
# : (Hash[String, untyped]) -> String
|
|
212
|
+
def self?.action_name: (Hash[String, untyped]) -> String
|
|
213
|
+
|
|
214
|
+
# Sections, polls, and actions as one timeline in the order they
|
|
215
|
+
# began; on one instant, sections, then polls, then actions.
|
|
216
|
+
# : (Hash[String, untyped], Integer) -> Array[Hash[Symbol, untyped]]
|
|
217
|
+
def self?.timeline: (Hash[String, untyped], Integer) -> Array[Hash[Symbol, untyped]]
|
|
218
|
+
|
|
219
|
+
# : (Array[untyped]?, Integer?) -> String?
|
|
220
|
+
def self?.page_event_count: (Array[untyped]?, Integer?) -> String?
|
|
221
|
+
|
|
222
|
+
# : (Array[Hash[String, untyped]]?) -> Array[Hash[Symbol, untyped]]
|
|
223
|
+
def self?.calls: (Array[Hash[String, untyped]]?) -> Array[Hash[Symbol, untyped]]
|
|
224
|
+
|
|
225
|
+
# : (Hash[String, untyped]?) -> String
|
|
226
|
+
def self?.channel: (Hash[String, untyped]?) -> String
|
|
227
|
+
|
|
228
|
+
# A judged-as claim compared nothing: a judgment decides it outside
|
|
229
|
+
# the results, and skipped is the one status that claims neither.
|
|
230
|
+
# : (String) -> String
|
|
231
|
+
def self?.claim_status: (String) -> String
|
|
232
|
+
|
|
233
|
+
# : (Hash[String, untyped]) -> Array[Hash[Symbol, untyped]]
|
|
234
|
+
def self?.claim_parameters: (Hash[String, untyped]) -> Array[Hash[Symbol, untyped]]
|
|
235
|
+
|
|
236
|
+
# : (Array[Hash[String, untyped]]?, Integer) -> Array[Hash[Symbol, untyped]]
|
|
237
|
+
def self?.map_claims: (Array[Hash[String, untyped]]?, Integer) -> Array[Hash[Symbol, untyped]]
|
|
238
|
+
|
|
239
|
+
# JSON as JavaScript writes it: a whole-number float has no fraction.
|
|
240
|
+
# : (untyped) -> String
|
|
241
|
+
def self?.js_json: (untyped) -> String
|
|
242
|
+
|
|
243
|
+
# : (untyped) -> untyped
|
|
244
|
+
def self?.js_value: (untyped) -> untyped
|
|
245
|
+
|
|
246
|
+
# : (Hash[String, untyped]?) -> Array[[String, String, String]]
|
|
247
|
+
def self?.judged_view_attachments: (Hash[String, untyped]?) -> Array[[ String, String, String ]]
|
|
248
|
+
|
|
249
|
+
# : (Integer, Hash[Symbol, untyped], Hash[String, untyped]?, bool, Integer, Hash[String, untyped], Hash[String, untyped]) -> Hash[Symbol, untyped]
|
|
250
|
+
def self?.map_step: (Integer, Hash[Symbol, untyped], Hash[String, untyped]?, bool, Integer, Hash[String, untyped], Hash[String, untyped]) -> Hash[Symbol, untyped]
|
|
251
|
+
|
|
252
|
+
# The first classified failure, a step's before a hook's.
|
|
253
|
+
# : (Array[Hash[Symbol, untyped]], Array[untyped]) -> Hash[Symbol, untyped]?
|
|
254
|
+
def self?.first_failure: (Array[Hash[Symbol, untyped]], Array[untyped]) -> Hash[Symbol, untyped]?
|
|
255
|
+
|
|
256
|
+
# : (Hash[String, untyped]) -> Array[Hash[Symbol, untyped]]
|
|
257
|
+
def self?.tag_labels: (Hash[String, untyped]) -> Array[Hash[Symbol, untyped]]
|
|
258
|
+
|
|
259
|
+
# : (Hash[Symbol, untyped], Hash[String, untyped], Hash[String, untyped], String, String?, Array[Hash[Symbol, untyped]], Hash[Symbol, untyped]?) -> Hash[Symbol, untyped]
|
|
260
|
+
def self?.map_scenario: (Hash[Symbol, untyped], Hash[String, untyped], Hash[String, untyped], String, String?, Array[Hash[Symbol, untyped]], Hash[Symbol, untyped]?) -> Hash[Symbol, untyped]
|
|
261
|
+
|
|
262
|
+
# A hook record holds no time of its own: a before hook sits at the
|
|
263
|
+
# scenario's start and an after hook at its end, both zero-width.
|
|
264
|
+
# : (Hash[Symbol, untyped], Integer, Integer) -> Array[Hash[Symbol, untyped]]
|
|
265
|
+
def self?.map_hooks: (Hash[Symbol, untyped], Integer, Integer) -> Array[Hash[Symbol, untyped]]
|
|
266
|
+
end
|
|
267
|
+
end
|
|
268
|
+
end
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Generated from lib/nukadoko/report_messages.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
# One run as a cucumber-messages stream, for `nuka report --format
|
|
4
|
+
# messages`, in the shape the TypeScript engine writes it
|
|
5
|
+
# (src/report/messages/): one line per envelope, in the protocol's order.
|
|
6
|
+
# It is compat fidelity only, so a migrated team's formatter, JUnit step,
|
|
7
|
+
# or HTML report keeps working: step record internals never appear in the
|
|
8
|
+
# protocol's closed messages. A claim step's claims ride as an attachment
|
|
9
|
+
# of their own media type, and what the verdict table says of an
|
|
10
|
+
# execution as a test case attachment, since the protocol has no field
|
|
11
|
+
# for either.
|
|
12
|
+
#
|
|
13
|
+
# The stream leaves out every control execution: a JUnit-reading CI gates
|
|
14
|
+
# on it, and a control that failed is the proof a green run rests on,
|
|
15
|
+
# which as a test case would read as a failure.
|
|
16
|
+
#
|
|
17
|
+
# Each execution is its own test case, attempt 0: `--repeat` executions
|
|
18
|
+
# all count, and a retry's shape would let a reader fold a red first
|
|
19
|
+
# execution into a green last one. A run over more than one environment
|
|
20
|
+
# gives each (pickle, environment) a pickle of its own, named with the
|
|
21
|
+
# environment, since the protocol has no field for where a case ran.
|
|
22
|
+
module Nukadoko
|
|
23
|
+
module Engine
|
|
24
|
+
module ReportMessages
|
|
25
|
+
CLAIMS_MEDIA_TYPE: ::String
|
|
26
|
+
|
|
27
|
+
VERDICT_MEDIA_TYPE: ::String
|
|
28
|
+
|
|
29
|
+
CLAIM_BROKEN_EXCEPTION: ::String
|
|
30
|
+
|
|
31
|
+
STATUS: untyped
|
|
32
|
+
|
|
33
|
+
CLAIM_FIELDS: untyped
|
|
34
|
+
|
|
35
|
+
# The stream's text, and the problems that left part of the run out.
|
|
36
|
+
# : (ReportRun) -> String
|
|
37
|
+
def self?.render: (ReportRun) -> String
|
|
38
|
+
|
|
39
|
+
# : (String) -> Hash[Symbol, untyped]
|
|
40
|
+
def self?.meta: (String) -> Hash[Symbol, untyped]
|
|
41
|
+
|
|
42
|
+
# : (Array[ReportRun::Scenario]) -> Hash[Integer, Hash[String, Hash[String, untyped]]]
|
|
43
|
+
def self?.environment_pickles: (Array[ReportRun::Scenario]) -> Hash[Integer, Hash[String, Hash[String, untyped]]]
|
|
44
|
+
|
|
45
|
+
# : (untyped) -> Integer
|
|
46
|
+
def self?.ms_of: (untyped) -> Integer
|
|
47
|
+
|
|
48
|
+
# : (untyped) -> Hash[Symbol, Integer]
|
|
49
|
+
def self?.timestamp: (untyped) -> Hash[Symbol, Integer]
|
|
50
|
+
|
|
51
|
+
# : (Integer) -> Hash[Symbol, Integer]
|
|
52
|
+
def self?.stamp: (Integer) -> Hash[Symbol, Integer]
|
|
53
|
+
|
|
54
|
+
# : (ReportRun::Scenario, Hash[String, untyped], ^(Hash[Symbol, untyped]) -> void) -> void
|
|
55
|
+
def self?.test_case: (ReportRun::Scenario, Hash[String, untyped], ^(Hash[Symbol, untyped]) -> void) -> void
|
|
56
|
+
|
|
57
|
+
# `exception` is set for a broken claim only: its type is a fact
|
|
58
|
+
# nukadoko decided, and any other failure carries a message alone.
|
|
59
|
+
# : (Integer, Integer, String, String?, ?bool) -> Hash[Symbol, untyped]
|
|
60
|
+
def self?.result: (Integer, Integer, String, String?, ?bool) -> Hash[Symbol, untyped]
|
|
61
|
+
|
|
62
|
+
# The readings go with the claims: a value that walked toward the
|
|
63
|
+
# expected one across a poll is visible only in them.
|
|
64
|
+
# : (Hash[String, untyped], String, String) -> Array[Hash[Symbol, untyped]]
|
|
65
|
+
def self?.claims_attachment: (Hash[String, untyped], String, String) -> Array[Hash[Symbol, untyped]]
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Generated from lib/nukadoko/report_run.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
# One run directory read back into what the report writers take, as the
|
|
4
|
+
# TypeScript engine's src/report/load-run.ts reads it: each feature the run
|
|
5
|
+
# parsed, from sources.json, and each head execution of run.json with its
|
|
6
|
+
# step records, its pickle, and what the verdict table says of it. It reads
|
|
7
|
+
# only the run directory, so a directory copied off a CI machine renders
|
|
8
|
+
# the same as one in the project that ran it.
|
|
9
|
+
#
|
|
10
|
+
# A run directory copied off a machine is untrusted input: an edited
|
|
11
|
+
# record can name any path, so every path a record names is resolved,
|
|
12
|
+
# symlinks included, and refused unless it stays inside the run directory.
|
|
13
|
+
# A refused path is a problem the report names, never a file it reads.
|
|
14
|
+
#
|
|
15
|
+
# The pickles are parsed again from sources.json, so their ids differ from
|
|
16
|
+
# the run's; no output keeps a pickle id across renders.
|
|
17
|
+
module Nukadoko
|
|
18
|
+
module Engine
|
|
19
|
+
class ReportRun
|
|
20
|
+
class Feature < Data
|
|
21
|
+
attr_reader path(): String
|
|
22
|
+
|
|
23
|
+
attr_reader source(): String
|
|
24
|
+
|
|
25
|
+
attr_reader document(): Hash[String, untyped]
|
|
26
|
+
|
|
27
|
+
attr_reader pickles(): Array[Hash[String, untyped]]
|
|
28
|
+
|
|
29
|
+
def self.new: (String path, String source, Hash[String, untyped] document, Array[Hash[String, untyped]] pickles) -> instance
|
|
30
|
+
| (path: String, source: String, document: Hash[String, untyped], pickles: Array[Hash[String, untyped]]) -> instance
|
|
31
|
+
|
|
32
|
+
def self.members: () -> [ :path, :source, :document, :pickles ]
|
|
33
|
+
|
|
34
|
+
def members: () -> [ :path, :source, :document, :pickles ]
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
class Scenario < Data
|
|
38
|
+
attr_reader json(): Hash[Symbol, untyped]
|
|
39
|
+
|
|
40
|
+
attr_reader step_records(): Hash[String, Hash[String, untyped]?]
|
|
41
|
+
|
|
42
|
+
attr_reader feature(): Feature
|
|
43
|
+
|
|
44
|
+
attr_reader pickle(): Hash[String, untyped]
|
|
45
|
+
|
|
46
|
+
attr_reader verdict(): Hash[Symbol, untyped]?
|
|
47
|
+
|
|
48
|
+
def self.new: (Hash[Symbol, untyped] json, Hash[String, Hash[String, untyped]?] step_records, Feature feature, Hash[String, untyped] pickle, Hash[Symbol, untyped]? verdict) -> instance
|
|
49
|
+
| (json: Hash[Symbol, untyped], step_records: Hash[String, Hash[String, untyped]?], feature: Feature, pickle: Hash[String, untyped], verdict: Hash[Symbol, untyped]?) -> instance
|
|
50
|
+
|
|
51
|
+
def self.members: () -> [ :json, :step_records, :feature, :pickle, :verdict ]
|
|
52
|
+
|
|
53
|
+
def members: () -> [ :json, :step_records, :feature, :pickle, :verdict ]
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
attr_reader dir: String
|
|
57
|
+
|
|
58
|
+
attr_reader document: Hash[Symbol, untyped]
|
|
59
|
+
|
|
60
|
+
attr_reader project_name: String?
|
|
61
|
+
|
|
62
|
+
attr_reader features: Array[Feature]
|
|
63
|
+
|
|
64
|
+
attr_reader scenarios: Array[Scenario]
|
|
65
|
+
|
|
66
|
+
attr_reader problems: Array[String]
|
|
67
|
+
|
|
68
|
+
# The run in `dir`, or a Refusal that says why it cannot be read.
|
|
69
|
+
# : (String, ?project_root: String) -> void
|
|
70
|
+
def initialize: (String, ?project_root: String) -> void
|
|
71
|
+
|
|
72
|
+
# Where a path inside the run directory is on disk; raises for one
|
|
73
|
+
# that resolves outside it.
|
|
74
|
+
# : (String) -> String
|
|
75
|
+
def resolve: (String) -> String
|
|
76
|
+
|
|
77
|
+
# Where a path a record names is on disk: one under `runs/<run id>/`
|
|
78
|
+
# is under the run directory wherever the directory now is, and any
|
|
79
|
+
# other is under the project. Raises for one that resolves outside
|
|
80
|
+
# the run directory.
|
|
81
|
+
# : (String) -> String
|
|
82
|
+
def resolve_recorded: (String) -> String
|
|
83
|
+
|
|
84
|
+
private
|
|
85
|
+
|
|
86
|
+
# : (String) -> bool
|
|
87
|
+
def inside?: (String) -> bool
|
|
88
|
+
|
|
89
|
+
# : () -> Array[Feature]
|
|
90
|
+
def read_features: () -> Array[Feature]
|
|
91
|
+
|
|
92
|
+
# An execution of the base or the old world is a cell of the table,
|
|
93
|
+
# not a test result, so the formats render head's executions alone.
|
|
94
|
+
# : () -> Array[Scenario]
|
|
95
|
+
def read_scenarios: () -> Array[Scenario]
|
|
96
|
+
|
|
97
|
+
# What the verdict table says of an execution's row and cell.
|
|
98
|
+
# : (Hash[Symbol, untyped]) -> Hash[Symbol, untyped]?
|
|
99
|
+
def verdict_of: (Hash[Symbol, untyped]) -> Hash[Symbol, untyped]?
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
end
|