zombocom/wicked

Is there a way to get the wizard_path helper to use slash instead of dot for the step path?

Closed this issue · 4 comments

Right now it seems like do something like verifications_helper(:step1) returns /verifications.step1 rather than /verifications/step1, which is what I want. /verifications/step1 is the path as it appears in the browser when the controller renders the page.

Mostly interested in this because I'd like to do some integration testing with Capybara, and will occasionally have places where I'd like to test the redirect path to a Wicked Controller step. Currently I've written a small helper to output the path with a / instead of a . but wondering if there's a more canonical way of doing this.

You shouldn't be getting a dot. I remember seeing this before, but I don't remember the specific cause. I think maybe you have to explicitly pass id: to the path helper, but I don't totally remember. DId you ever get this figured out?

No, I didn't. I'll have to try the id: key later, though I feel like either a) the default behavior should be the same or b) it should be documented this way in the README.

I ended up writing myself a small helper function to stick the / in for me.

Can confirm that the id: key works as described.

Any where in the docs we could make this better or clearer? I would take a doc pr.