gherkin_system 0.3.0 → 0.4.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 +7 -0
- data/README.md +19 -0
- data/lib/generators/gherkin/gherkin_generator.rb +12 -0
- data/lib/gherkin_system/version.rb +1 -1
- data/skills/gherkin-system/SKILL.md +19 -0
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fe2f737790d08aa61ad7a5ae85b770725144c2c1fd9f0beed703742097e06efb
|
|
4
|
+
data.tar.gz: 0ae13e39a441aaec9dd0aa3d23eef69799881fa45f423da1327f428095a1dd1c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 482ec736ed840dc67fde03134e8c05bccf5d120b27c1585712c62d81f222d21f5f6f452d215e91363af2d31b028e2da17dee4212c9071629e8d95cbb8d7a11cf
|
|
7
|
+
data.tar.gz: d5db2a103d97563f0a65e06f76e4be9312ea38822440c34e6b3b226dbaf09b2e709d2739563cd862aad77f3842fc99030ca436792186356d4998639cc9ae5261
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.4.0] - 2026-10-04
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- `rails g gherkin` runs the install generator, matching `rails g gherkin:install`
|
|
15
|
+
- README and application skill document how to wait for navigation before URL assertions in step definitions
|
|
16
|
+
|
|
10
17
|
## [0.3.0] - 2026-10-04
|
|
11
18
|
|
|
12
19
|
### Changed
|
data/README.md
CHANGED
|
@@ -98,6 +98,25 @@ end
|
|
|
98
98
|
|
|
99
99
|
`Given`, `When`, `Then`, `And`, and `But` share one registry. Blocks run with `instance_exec` on the system test, so instance variables set in one step are visible in the next.
|
|
100
100
|
|
|
101
|
+
## Wait for navigation
|
|
102
|
+
|
|
103
|
+
After a step triggers navigation, assert visible page content or use a Capybara waiting assertion. Do not compare `current_path` directly. A direct comparison does not wait for navigation.
|
|
104
|
+
|
|
105
|
+
```ruby
|
|
106
|
+
When("I open an order") do
|
|
107
|
+
click_on "Order details"
|
|
108
|
+
assert_current_path(/\/orders\/\d+/, url: true)
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
When("I stay on the orders page") do
|
|
112
|
+
click_on "Refresh orders"
|
|
113
|
+
assert_selector "h1", text: "Orders"
|
|
114
|
+
refute_current_path(/\/orders\/\d+\/details/)
|
|
115
|
+
end
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
For a negative URL check, first assert content that only the destination page shows. This prevents a check from passing before the browser navigates.
|
|
119
|
+
|
|
101
120
|
## Hooks
|
|
102
121
|
|
|
103
122
|
```ruby
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "generators/gherkin/install/install_generator"
|
|
4
|
+
|
|
5
|
+
module Gherkin
|
|
6
|
+
module Generators
|
|
7
|
+
# Runs the install generator for the bare gherkin command.
|
|
8
|
+
class GherkinGenerator < InstallGenerator
|
|
9
|
+
source_root InstallGenerator.source_root
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -87,6 +87,25 @@ end
|
|
|
87
87
|
- Prefer Cucumber Expressions (`{string}`, `{int}`). Use a regex only to match an existing definition.
|
|
88
88
|
- Data tables arrive as an object with `#hashes` (string keys) and `#raw`. Doc strings arrive as the content string.
|
|
89
89
|
|
|
90
|
+
## Wait for navigation
|
|
91
|
+
|
|
92
|
+
After a step triggers navigation, assert visible page content or use a Capybara waiting assertion. Do not compare `current_path` directly. A direct comparison does not wait for navigation.
|
|
93
|
+
|
|
94
|
+
```ruby
|
|
95
|
+
When("I open an order") do
|
|
96
|
+
click_on "Order details"
|
|
97
|
+
assert_current_path(/\/orders\/\d+/, url: true)
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
When("I stay on the orders page") do
|
|
101
|
+
click_on "Refresh orders"
|
|
102
|
+
assert_selector "h1", text: "Orders"
|
|
103
|
+
refute_current_path(/\/orders\/\d+\/details/)
|
|
104
|
+
end
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
For a negative URL check, first assert content that only the destination page shows. This prevents a check from passing before the browser navigates.
|
|
108
|
+
|
|
90
109
|
## Hooks
|
|
91
110
|
|
|
92
111
|
```ruby
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gherkin_system
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Paluy
|
|
@@ -100,6 +100,7 @@ files:
|
|
|
100
100
|
- README.md
|
|
101
101
|
- lib/generators/gherkin/feature/feature_generator.rb
|
|
102
102
|
- lib/generators/gherkin/feature/templates/feature.feature.tt
|
|
103
|
+
- lib/generators/gherkin/gherkin_generator.rb
|
|
103
104
|
- lib/generators/gherkin/install/install_generator.rb
|
|
104
105
|
- lib/generators/gherkin/install/templates/gherkin_test.rb
|
|
105
106
|
- lib/generators/gherkin/steps/steps_generator.rb
|