You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the clearance backdoor for testing, and using as user, when following redirects by clicking on links, it doesn't continue with the same user, making this backdoor useless, and you can't use as in follow_redirect! or click_on for example
here is a simple test that that is created by using the rails scaffold generator, and it fails because click on leads to a redirect
test"creating a Car"dovisitcars_url(as: @user)click_on"New Car"fill_in"Make",with: @car.makefill_in"Model",with: @car.modelfill_in"Year",with: @car.yearclick_on"Create Car"assert_text"Car was successfully created"click_on"Back"end
and here is a repository I created for reproducing this issue, it contains just a minimal created rails app with users and cars scaffold, you can just run the tests by ralis test:system and it would fail
The text was updated successfully, but these errors were encountered:
When using the clearance backdoor for testing, and using
as
user, when following redirects by clicking on links, it doesn't continue with the same user, making this backdoor useless, and you can't useas
infollow_redirect!
orclick_on
for examplehere is a simple test that that is created by using the rails scaffold generator, and it fails because click on leads to a redirect
and here is a repository I created for reproducing this issue, it contains just a minimal created rails app with users and cars scaffold, you can just run the tests by
ralis test:system
and it would failThe text was updated successfully, but these errors were encountered: