GithubHelp home page GithubHelp logo

Comments (7)

aslakhellesoy avatar aslakhellesoy commented on May 22, 2024

Are you suggesting this code as a fix?

from cucumber-rails.

andrewdsmith avatar andrewdsmith commented on May 22, 2024

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.

aslakhellesoy avatar aslakhellesoy commented on May 22, 2024

Bugfix: Handle all types of URIs in "I should be on ..." steps. Closed by f13b014.

from cucumber-rails.

andrewdsmith avatar andrewdsmith commented on May 22, 2024

Awesome! :-)

from cucumber-rails.

scottj97 avatar scottj97 commented on May 22, 2024

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.

andrewdsmith avatar andrewdsmith commented on May 22, 2024

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.

scottj97 avatar scottj97 commented on May 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.