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 page is using, in my case oauth (or in other cases any redirection targeting tested service), request for authentication in identity manager is redirected from service asking for authentication.
User is logged in in identity manager and such redirected reques should respond with ok, when user has valid session.
Session cookie is httpOnly: true, secure: true.
Everything works as expected when test is executed on https domain (e.g. prod env).
However when I try to run it against http localhost on dev server it fails because cookie is not attached.
Page is written in angular 11 and dev server is started using angular's option to proxy traffic to the backend service,
with termination of ssl and translation of host name.
When using dev server manually, everything works fine as localhost is treated by the browser as safe location
and secure cookies are working correctly.
What is the Current behavior?
fill data & click login ---------- /login ---------> Identity Manager
<---- OK, session cookie----
auth in backend service ---------- /auth ---------> Backend service
using Identity Manager
<---- 302, /verify ---------
---------- /verify --------> Identity Manager
without cookie!
<--------- 401 -------------
What is the Expected behavior?
fill data & click login ---------- /login ---------> Identity Manager
<---- OK, session cookie----
auth in backend service ---------- /auth ---------> Backend service
using Identity Manager
<---- 302, /verify ---------
- /verify, session cookie -> Identity Manager
<--------- 200 -------------
What is your public website URL? (or attach your complete example)
at (/home/ac/web/e2e/test.e2e.ts:15:38)
at (/home/ac/web/e2e/test.e2e.ts:8:71)
at __awaiter (/home/ac/web/e2e/test.e2e.ts:4:12)
at (/home/ac/web/e2e/test.e2e.ts:6:48)
1/1 failed (6s)
Screenshots
N/A
Steps to Reproduce
1.Run example server
2.Test manually - press login, press auth, both gave ok result
3.Run test, test fails
TestCafe version
1.17.1
Node.js version
v14.17.5
Command-line arguments
npx testcafe firefox e2e/test.e2e.ts
Browser name(s) and version(s)
Firefox 94.0, Chrome 95.0.4638.69
Platform(s) and version(s)
Linux Manjaro 21.1.6
Other
No response
The text was updated successfully, but these errors were encountered:
@qualityshepherd Thank you for your feedback. Please make sure that the problem you encountered is the same as the one we are discussing in this thread. Otherwise, please create a separate issue for it.
What is your Scenario?
When page is using, in my case oauth (or in other cases any redirection targeting tested service), request for authentication in identity manager is redirected from service asking for authentication.
User is logged in in identity manager and such redirected reques should respond with ok, when user has valid session.
Session cookie is httpOnly: true, secure: true.
Everything works as expected when test is executed on https domain (e.g. prod env).
However when I try to run it against http localhost on dev server it fails because cookie is not attached.
Page is written in angular 11 and dev server is started using angular's option to proxy traffic to the backend service,
with termination of ssl and translation of host name.
When using dev server manually, everything works fine as localhost is treated by the browser as safe location
and secure cookies are working correctly.
What is the Current behavior?
What is the Expected behavior?
What is your public website URL? (or attach your complete example)
What is your TestCafe test code?
Your complete configuration file
default configuration without any changes
Your complete test report
Running tests in:
Login Page
✖ can login with valid account
AssertionError: expected false to be truthy
Browser: Firefox 94.0 / Linux 0.0
10 |
11 | .expect(Selector('#ok').visible).ok()
12 |
13 | .click('button#auth')
14 |
> 15 | .expect(Selector('#ok').visible).ok();
16 |});
17 |
at (/home/ac/web/e2e/test.e2e.ts:15:38)
at (/home/ac/web/e2e/test.e2e.ts:8:71)
at __awaiter (/home/ac/web/e2e/test.e2e.ts:4:12)
at (/home/ac/web/e2e/test.e2e.ts:6:48)
1/1 failed (6s)
Screenshots
N/A
Steps to Reproduce
1.Run example server
2.Test manually - press login, press auth, both gave ok result
3.Run test, test fails
TestCafe version
1.17.1
Node.js version
v14.17.5
Command-line arguments
npx testcafe firefox e2e/test.e2e.ts
Browser name(s) and version(s)
Firefox 94.0, Chrome 95.0.4638.69
Platform(s) and version(s)
Linux Manjaro 21.1.6
Other
No response
The text was updated successfully, but these errors were encountered: