Граф коммитов

33 коммитов

Автор SHA1 Сообщение Дата
Softonik
4e3e82b79e Добавлено godog_and_gomega + сопутствующие обновления модулей и кода 2025-06-04 23:20:51 +03:00
Softonik
26dafa0117 +Для русских сценариев генерируются русские функции 2025-06-04 22:53:47 +03:00
Softonik
3b25e9eb02 Сокращён вывод результатов 2025-06-04 22:29:13 +03:00
Softonik
78bab577c5 Добавлен формат AST 2025-06-03 05:03:20 +03:00
Softonik
0c030e0a6c Модуль переименован для публикации 2025-06-03 04:16:23 +03:00
Viacheslav Poturaev
e55eab64f7
Add details to "step is undefined" error (#669)
* Add details to "step is undefined" error

* Update changelog
2024-12-10 16:54:49 +01:00
Tighearnán Carroll
c5a88f62c2
fix(formatter): On concurrent execution, execute formatter at end of Scenario (#645)
* fix(formatter): add onflush logger only print output at end of scenario when running concurrently

* add to changelog

* fix tests

* fix scenario outline output for the Pretty formatter

* fix casing for linter

* add coverage for new storage function

* relate suite back to where it was originally

* better type assertion on flush log

* var name for asserted formatter that doesn't clash with stdlib's fmt

* add coverage to summary

* only defer flush func when running concurrently

* much more concise way of deferring the flush

---------

Co-authored-by: Viacheslav Poturaev <vearutop@gmail.com>
2024-11-08 17:05:40 +01:00
John Lonergan
ecd2dfebbd
Ambiguous step detection - add support to all formatters (#648)
* added the missing impl of json/events/junit/pretty - still need 'progress' and 'junit,pretty'

* added tests for "progress formatter"

* switched from tabs to spaces in the ambiguous steps error message

* rename some_scenarions_including_failing
to     some_scenarios_including_failing

* changelog
2024-10-16 15:41:47 +01:00
John Lonergan
223efc3b14
Fix some type checks on the signatures of nested step handlers (#647)
* at some point someone changed the return type for nested steps from []string to godog.Steps but they forgot to adjust the type checks. The existing type checks were lax and unable to distinguish  []string from godog.Steps but in a couple of places in the code the value is coerced to godog.Steps and so if someone returned []string then the code would blow up. Additionally there were some tests aroudn these types but they also had not been updated but the test was passing for the wrong reason - the particular test expected an error but the cause of the error wasn't the one the code expected.

* CHANGELOG.md

* use chatgpt to regen the top of the code based on the new tests

* use chatgpt to regen the top of the code based on the new tests

* corrected the error messages of the param checks to indicate that the problem is the function signature and not the args being passed to the function, also added numerous extra assertions on the precise error messages returned. Now that the precise error is being verified in the test I have improved certain error messages to that more accurate detail is included in the errors

* added further constraints to the step arg mapping tests

* removed redundant test

* include a step error result in the reported error even when the ctx is nil
2024-10-15 13:25:13 +01:00
John Lonergan
8edde7f30c
Bugfix afterscenario attachments (#646)
* Minor doc and comment corrections

* Fixed bug where it was impossible to make attachments from 'after scenario' hook, also removed some dud comments.

* typo
2024-10-06 02:12:56 +01:00
John Lonergan
901da7fa3d
fixed a bug where the attachments are extracted from the context too early, this prevented AfterStep from making attachments (#637)
* fixed a bug where the attachments are extracted from the context too early, this prevented AfterStep from making attachments
2024-07-23 17:22:51 +01:00
John Lonergan
bcf6bce793
ambiguous step def detection akin to cucumber jvm (#636)
* added basic detection for ambiguous steps, but causes an error and not yet recorded in the reports as 'Ambiguous', and no test cases figured out yet

* added initial support for detection of ambiguous steps - further work take a look at how cuke jvm report ambiguous steps and sets the step status to 'ambiguous' rather than my current solution which just blows the test up as a regular step error

* added suite_context_test and also introduced missing 'ambiguous' status to make cucumber jvm'

* update CHANGELOG for ambiguous step defs

* missed file from commit

* added internal/formatters/fmt_multi_test.go

* add tests for other peoples code

* added "ambigous" to the help text

* tests

* added some more tests for attachments

* Update internal/flags/flags.go

Co-authored-by: Viacheslav Poturaev <nanopeni@gmail.com>

---------

Co-authored-by: Viacheslav Poturaev <nanopeni@gmail.com>
2024-07-01 10:28:39 +01:00
John Lonergan
3abb346b28
provisional: Attachments now uses base64 padding not raw mode (#629)
* corrected base64 encoding of attachments to use padding as that's what cuke JVM does
2024-05-31 21:33:57 +01:00
John Lonergan
9558224cce
Additional code review observations on Attach() functionality from https://github.com/cucumber/godog/pull/623 (#628)
* support multiple calls to the Attach() function from a single step

* run_progress_test.go changed so it's not sensitive to the name of the clone target directory

* applied code review comments also added _example/attachments

* applied code review comments also added _example/attachments

* applied code review comments also added _example/attachments
2024-05-30 02:29:14 +00:00
John Lonergan
201e526078
added support for Attachments (aka Embedddings) (#623)
* added support for attachments in the cucumber json and events output formats - done by sneaking the attachment into the context.Context object.
2024-05-29 00:02:08 +01:00
Glib Briia
250d69ab63
Fixes #604 - remove line overwriting for scenario outlines in cucumber formatter (#605) 2024-01-31 07:04:29 +00:00
Viacheslav Poturaev
888fe3f294
Improve ErrSkip handling, add test for Summary and operations order (#584) 2023-10-29 22:59:14 +01:00
Kirubel Adamu
25274b0291
updated base formatter to set a scenario as passed unless there exist… (#582) 2023-10-27 19:28:41 +02:00
Viacheslav Poturaev
ea50e4bdfc
Use staticcheck GitHub Action (#563) 2023-06-06 16:52:06 +02:00
Viacheslav Poturaev
35820ff9fe Reduce deps, fix CI for go1.16, format imports 2023-05-26 16:38:51 +02:00
Alexandru Chitu
2264a0037b
chore(*): BREAKING CHANGE, use new repos for cucumber and messages (#515)
* chore(*): use new repos for cucumber and messages

* chore(*): go mod tidy _examples

Co-authored-by: otrava7 <alexandru.chit@gmail.com>
2023-01-05 12:41:56 +01:00
Brian Hnat
5d705e5b8e
Pretty Print when using rules (#440) (#480)
* Pretty Print when using rules (#440)

* Pretty Print when using rules (#440)

* fix a few formatting mistakes (#440)

* added test with rule and scenario outline (#440)
2022-06-17 07:32:07 -07:00
Levi Noecker
c6c2a0885b
Export internal formatters (#372) 2021-08-10 11:27:17 +02:00
Viacheslav Poturaev
09d7d85abf
Fix execution of scenarios provided as a list of path:line (#414) 2021-08-07 22:37:31 +02:00
Viacheslav Poturaev
f34f37dfd2 Upgrade MultiFormatter to use messages-go/v16 2021-07-07 19:47:46 +02:00
Aslak Hellesøy
7cadaeffdb
Merge pull request #392 from vearutop/multi
Use multiple formatters in the same test run
2021-07-07 16:32:58 +01:00
MBow
5414f3c5da update gherkin-go to v19.0.3
update messages-go to v16.0.1
bump gomod version
comment on log line in std os.Stderr
examples to non rc version
go mod tidy
update circle (tbd)
2021-06-28 17:19:43 +01:00
Viacheslav Poturaev
707025de28 Add test for multi formatter 2021-05-30 22:32:34 +02:00
Viacheslav Poturaev
9d4b221f7a Use multiple formatters in the same test run 2021-05-30 22:11:44 +02:00
Hiram Chirino
5ac22c454c feat: generate simpler snippets that use *godog.DocString and *godog.Table 2021-03-16 09:42:22 +01:00
Fredrik Lönnblad
7014a10e2f
Fixed the undefined step definitions help (#350) 2020-10-14 08:39:14 +02:00
Fredrik Lönnblad
2fa3b9f08c Moved StepDefinition to the formatters pkg 2020-07-11 10:49:36 +02:00
Fredrik Lönnblad
150c400163 Created internal packages for formatters, storage and models 2020-07-02 08:51:31 +02:00