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

99 коммитов

Автор SHA1 Сообщение Дата
Dominik Gedon
74fa488023
Replace deprecated ::set-output (#681)
As per the deprecation warning and explanation at https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
2025-03-24 11:05:30 +01:00
Tighearnán Carroll
4a4fd8ab3a
fix(errors): Fix expected Step argument count for steps with context.Context (#679)
* fix(errors): print correct number of expected steps when step has  defined

* add unit test

* remove duplicate part from unit test

* update changelog
2025-03-19 23:04:06 +00: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
Viacheslav Poturaev
dc6950b1e3 Update CHANGELOG.md 2024-10-31 19:06:21 +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
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
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
f85def32ee
Moved CHANGHELOG entry to correct location (#626) 2024-05-29 09:19:33 +02: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
Viacheslav Poturaev
095a19b85d
Update CHANGELOG.md 2024-04-29 10:49:40 +02:00
Mark Hughes
7017c73ef8
Provide a useful implementation of something compatible with testing.T (#571)
* Attempting to provide a useful implementation of something compatible with testing.T

* Handle Fail calls on the TestingT in the right place

* Provide as much of testing.T as possible + tidy up

* Add initial tests for testingT support

* Check compatibility with testing.T and friends

Co-authored-by: Piotr Bocheński <bochenski.piotr@gmail.com>

* Update assert-godogs example to show new usage. Rename 'GetTestingT(ctx)' to 'T(ctx)'

* Update changelog and readme with new usage

* Improve test coverage

* Review updates

---------

Co-authored-by: Piotr Bocheński <bochenski.piotr@gmail.com>
2024-04-29 10:26:25 +02:00
Glib Briia
757988328b
Prepare CHANGELOG.md for new release (#606) 2024-01-31 16:39:28 +00: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
6b96d47e70 Prepare CHANGELOG.md for new release 2023-08-22 14:31:19 +02:00
Viacheslav Poturaev
3e0f9026f3
Improve hooks invocation flow (#568) 2023-07-13 09:31:56 +02:00
Dragan Milic
0dcbfef9be
cancel context for each scenario (#514)
* fix(deps): update module github.com/cucumber/gherkin/go/v26 to v26.1.0 (#549)

* Update CI for go1.20 (#552)

* fix(deps): update module github.com/cucumber/gherkin/go/v26 to v26.1.0

* Tidy modules

---------

Co-authored-by: Viacheslav Poturaev <vearutop@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* cancel context for each scenario

* Update suite.go

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Viacheslav Poturaev <vearutop@gmail.com>
Co-authored-by: Viacheslav Poturaev <nanopeni@gmail.com>
2023-04-04 01:28:03 +02:00
Tighearnán Carroll
6ce2b8696b
Use fs.FS abstraction for filesystem (#550)
* compiles

* mock fs in tests

* fix parser tests

* fix run.go

* rename FeatureFS to FS

* fix docs typos

* remove debug log

* add os.DirFS("./") to default options

* reword docstring

* add fs wrapper

* updated readme and changelog

* added note

* fix changelog

* remove ./ gating from defaults

* add new storage.FS tests

* increase coverage of parser.parsePath

* increase coverage of TestSuite.RetrieveFeatures

* remove another os.Stat

---------

Co-authored-by: Tighearnán Carroll <tighearnan.carroll@gamil.com>
2023-03-27 21:52:51 +02:00
Daniel Helfand
3bd9e9ca4f
docs: prefer go test to use of godog cli in README (#548) 2023-03-24 09:19:12 +01:00
Alexandru Chitu
62d84eedbc
Implement unambiguous keywords (#509)
feat(*): create keyword functions

* chore(*): update messages and gherkin, relocate Keyword

* chore(*): update messages and gherkin, relocate Keyword

* chore(*): update messages and gherkin, relocate Keyword

* feat(*): mandate keyword type when unambiguous keyword function is used

* test(*): keyword type in feature files

* docs(*): update step-by-step walkthrough to mention the option of using keyword functions

* docs(*): update CHANGELOG.md

* test(*): keyword substeps

* chore(*): go mod
2023-01-23 14:22:19 +00:00
Viacheslav Poturaev
9007f1f26d
Update CHANGELOG.md for release v0.12.6 (#516) 2023-01-05 11:00:23 +01:00
Viacheslav Poturaev
c35ea0b236
Remove deprecation from flags, update example to use CLI flags (#498)
* Remove deprecation from flags, update example to use CLI flags

* Add comment to ShowHelp option

* Fix test

* Update CHANGELOG.md
2022-08-31 10:17:00 +02:00
Viacheslav Poturaev
202882807b
Skip undefined steps in after scenario hooks (#494) 2022-08-16 09:37:33 +02:00
Viacheslav Poturaev
6f3e792c52
Add deprecation notice to godog CLI (#489)
* Add deprecation notice to godog CLI

* Update CHANGELOG
2022-07-31 15:38:05 +02:00
Wichert Akkerman
b2672bb933
Do not discard context from substeps (#488) 2022-07-25 13:43:36 +02:00
Brian Hnat
b5400809cd
Update CHANGELOG.md (#482)
Add bug fix from PR #480 to CHANGELOG.md.
2022-06-17 21:10:11 -04:00
Viacheslav Poturaev
99655f7e7e
Update README to reflect current best practices in creating and running tests (#477)
* Update README to reflect current best practices in creating and running tests

* Update CHANGELOG and README

Co-authored-by: Matt Wynne <matt@cucumber.io>
2022-05-21 08:21:41 +02:00
Matt Wynne
5793a95e1c
Reformat CHANGELOG.md using standard changelog CLI tool (#474)
* Reformat using standard `changelog` CLI tool

See https://github.com/cucumber/changelog

* Fix missing link to username

* Tidy
2022-04-30 14:43:35 -07:00
Viacheslav Poturaev
d77238eef3 Prepare for release 2022-03-26 10:18:09 +01:00
Viacheslav Poturaev
6f877d6b03
Fix support for go1.18 (#466) 2022-03-26 10:16:17 +01:00
Ricardo García Fernández
5efecbaf10
Update tests and examples with up to date API (#460) 2022-02-18 18:26:17 +01:00
Gemini Smith
5001c4f4fe
Change cmd setup to bubble up errors over exiting (#454)
* Change cmd setup to bubble up errors over exiting

* Update main to handle execute error

* Update changelog with PR #454

* Slight cleanup tweaks
2022-01-25 16:52:57 -07:00
Viacheslav Poturaev
30de46da25
Prepare changelog for release 2022-01-12 23:43:48 +01:00
Viacheslav Poturaev
9baac0fdfa
Allow suite-level configuration of steps and hooks (#453)
* Allow suite-level configuration of steps and hooks

* Fix a few typos

* Update CHANGELOG.md

* Add test

* Run scenario in same goroutine to preserve stack when concurrency is disabled

* Remove redundant check
2022-01-12 23:40:41 +01:00
Viacheslav Poturaev
a6fef3f171
Prepare v0.12.3 (#451) 2022-01-05 23:06:58 +01:00
Viacheslav Poturaev
95278dfd39
Automate binary releases (#437)
* Add release assets automation

* Use single module with local replace for examples

* Update CHANGELOG.md

* Allow expected failure for custom formatter example test

* Set version value with ldflags

* Restore artifacts cleanup
2022-01-05 23:00:29 +01:00
Dmitry Savintsev
4d9b548d61
use 'go get' instead of 'go install' to install (#449) 2021-12-29 13:29:50 +01:00
Viacheslav Poturaev
b850b44b48
Invoke After Scenario hooks after After Step hooks (#444)
* Invoke After Scenario hooks after After Step hooks

* Update CHANGELOG.md

Co-authored-by: Matt Wynne <matt@cucumber.io>
2021-12-02 16:09:23 -08:00
Gemini Smith
82bcce7bdc
Add WSL friendly check-go-version setup (#443)
* Add WSL friendly check-go-version setup

* Add changelog entry and update my username

* Add PR link to changelog

* Stop it saying 'noting to be done for check-go-version'

* Update CHANGELOG.md

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

Co-authored-by: Matt Wynne <matt@cucumber.io>
Co-authored-by: Viacheslav Poturaev <vearutop@gmail.com>
2021-12-01 07:22:04 -08:00
Viacheslav Poturaev
86a56351ef
Fix compilation for non-modules (#436) 2021-10-14 19:25:30 +02:00
Viacheslav Poturaev
239a42468a Update CHANGELOG for release 2021-08-27 00:11:57 +02:00
Viacheslav Poturaev
7d984effb3
Run before step hooks before matching (#425)
* Run before step hooks before matching

* Add note to CHANGELOG.md

Co-authored-by: nhatthm <nt@hellofresh.com>
2021-08-24 23:02:41 +02:00
Levi Noecker
c6c2a0885b
Export internal formatters (#372) 2021-08-10 11:27:17 +02:00
Viacheslav Poturaev
ad7feb3298
Add release notes and bump version (#416) 2021-08-09 08:51:27 +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
b1728ff551
Add new contextualized API for hooks and steps (#409)
* Add new contextualized API for hooks and steps

* Make default context configurable

* Run AfterStep hooks even after failed steps, fixes #370

* Update CHANGELOG and README

* Add step result status to After hook, fixes #378

* Elaborate hooks documentation

* Add test to pass state between contextualized steps

* Update README with example of passing state between steps
2021-08-03 17:48:05 +02:00
Karsten Franke
7d343d4e35
Fix step definition output for Data Tables (#411)
* Fix step definition output for Data Tables

This fixes incorrect step definition output for Data Tables. The
PickleStepArgument_PickleTable type does not exist in the current
messages-go version.

* updated CHANGELOG.md
2021-07-29 10:27:00 +02:00
Viacheslav Poturaev
cdbb0ac3f3 Update documentation 2021-07-22 20:56:26 +02:00