Comments (7)
Are you suggesting this code as a fix?
from cucumber-rails.
Err... yes! It certainly works on my project where I have paths with query strings and both relative and absolute URIs turning up in current_url; I can't admit to having done any more testing. Let me know if there's anything you'd need me to do to get this accepted.
from cucumber-rails.
Bugfix: Handle all types of URIs in "I should be on ..." steps. Closed by f13b014.
from cucumber-rails.
Awesome! :-)
from cucumber-rails.
Maybe I don't understand, but I don't see why you want the query string used in this comparison. In theory what page you're on ("Then I should be on ...") should be independent of the query string.
This change broke me because I have a "I should be on the login page" and sometimes my app redirects to the login page with a query string like "?return_to=foo" that I don't care about. It's still the login page whether or not the query string is there.
from cucumber-rails.
Hmmm. I'd not considered this. I have a "page" that uses a query string parameter to distinguish between... err... pages; it's basically a search page and I wanted to assert I was on the right results page. But I see entirely where you're coming from and I could change my routing. If you want to ask Aslak to reverse this then I won't object.
from cucumber-rails.
I would suggest you add a new "Then I should see results for ..." or something like that instead of using the built-in "Then I should be on ..." rule.
I've got a suitable workaround so I don't really care one way or the other.
from cucumber-rails.
Related Issues (20)
- Upgrade to 4.1.0 breaks javascript version of a feature test HOT 10
- Breaks with database_cleaner 2.0 HOT 8
- Migrate to GitHub Actions HOT 3
- undefined method `new' for BigDecimal:Class (NoMethodError) HOT 3
- Please release a new version HOT 4
- Rubocop legacy fix: Erroneous Auto Inheritance of ActionDispatch::IntegrationTest in the World HOT 5
- `rails notes` does not find TODOs in `features/` directory in Rails 6+
- Bug on 2.3.0 and MacOS BigSur message formatter not found HOT 14
- handling of @javascript tag is confusing HOT 11
- Support for Rails 7 HOT 13
- Rails transactional database cleanup HOT 4
- Date input support in Rails 7 HOT 3
- Cucumber::Rails::Database.javascript_strategy is too simple HOT 12
- `cucumber-rails` incompatible with latest `cucumber-ruby` HOT 10
- Use Github Actions release automation HOT 1
- CI Failures - often Bundler/RubyGems, not setup-ruby HOT 1
- Simplify the default, generated Cucumber config HOT 1
- Update v3 changelogs
- Support for Cucumber 9 HOT 4
- CodeClimate maintainability badge is not working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cucumber-rails.