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
{{ message }}
This repository has been archived by the owner on Apr 20, 2021. It is now read-only.
I wanted to update from 2.7.1 to 3.0.1 today, and by doing so, I am facing fail in my test suite.
I have a suite of scenario that are doing GET/POST request and I check the responses status and responses body.
In 2.8.0, you introduce the resetHttpHeaders between requests which seems to be quite natural.
However, this methods cleans all the headers (except the HTTP_USER_AGENT which is hard setted by BrowserKit/Client), even the SCRIPT_FILENAME header added from the base_url option in the BrowserKitDriver of Mink.
My first request hit without problem and this scenario passes, but my next one fails as it does not have the header "SCRIPT_FILENAME" => "/app_test.php".
I tried to re-add the header before the request via the context: I add :name header equal to :value, but it forces the HTTP_ prefix, so I can not add the SCRIPT_FILENAME header anymore.
I may be missing something there, as I can not found a workaround on this except maybe split my scenarios into multiple features which I would like to avoid.
The text was updated successfully, but these errors were encountered:
I have the same behaviour when upgrading from 2.7.1 to 2.8.0 or 2.8.1 and I diagnose the same thing (a call to resetHttpHeaders introduced by 4cc6cfc ).
The impacted header for me is Authorization, which is quite annoying to reset on every http call as you can imagine :p .
As I understand the purpose of the fix, maybe we can find an issue to allow user to set temporary or "permanent headers ?
Maybe two different command:
Given I add the foo header equal to bar # if you think headers should be temporaryGiven I add the foo permanent header equal to bar
or
Given I add the foo header equal to bar # if you think headers should be permanentGiven I add the foo temporary header equal to bar
Thank you
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
I wanted to update from 2.7.1 to 3.0.1 today, and by doing so, I am facing fail in my test suite.
I have a suite of scenario that are doing GET/POST request and I check the responses status and responses body.
In 2.8.0, you introduce the resetHttpHeaders between requests which seems to be quite natural.
However, this methods cleans all the headers (except the
HTTP_USER_AGENT
which is hard setted by BrowserKit/Client), even theSCRIPT_FILENAME
header added from thebase_url
option in the BrowserKitDriver of Mink.My first request hit without problem and this scenario passes, but my next one fails as it does not have the header
"SCRIPT_FILENAME" => "/app_test.php"
.I tried to re-add the header before the request via the context:
I add :name header equal to :value
, but it forces theHTTP_
prefix, so I can not add theSCRIPT_FILENAME
header anymore.I may be missing something there, as I can not found a workaround on this except maybe split my scenarios into multiple features which I would like to avoid.
The text was updated successfully, but these errors were encountered: