Incorrect redirect to malformed url within AUT - adding `_/` in url
See original GitHub issueCurrent behavior:
When I instruct cypress to login to an Oracle APEX application, the authentication re-directs cypress to a ‘404 not found’ page because the authenticated URL is malformed. The malformed URL is the only issue and can simply corrected programmatically (with a find and replace command).
However - it is very important to note that the cypress login correctly returns:
- a valid cookie
- a valid session
which is everything you need for authentication.
Desired behavior:
Cypress, ideally, should be able to follow the same authentication redirect that a user would in a regular browser.
Steps to reproduce: (app code and test code)
I created a dummy application with dummy credentials hosted by apex.oracle.com to demonstrate:
it('Login demo', function() {
cy.visit('https://apex.oracle.com/pls/apex/f?p=54707:LOGIN_DESKTOP')
cy.get('#P9999_USERNAME').type('ApexUser')
cy.get('#P9999_PASSWORD').type('Oradoc_db1')
cy.get('.t-Button').click()
})
The above code (which should work until the application expires in many months) will redirect to a 404 not found page with a url in the format: https://apex.oracle.com/__/f?p=54707:1:[session_id]::::: Outside of cypress the url will have the format: https://apex.oracle.com/pls/apex/f?p=54707:1:[session_id]:::::
Versions
I have tested this across 4 instances of Oracle APEX (APEX 5.0, 5.1, 18.1 and 19) and this behavior is consistent.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:53 (22 by maintainers)
Top GitHub Comments
I am also facing this issue with all browsers including Electron :
Cypress 4.7.0 Node v8.11.3
Same after upgrading to latest versions: Cypress 5.1.0 Node v12.18.3
I’m redirected to https://tstapex.myhost.ch/__/f?p=119:1:28275213605974:::::
Then of course get:
Setting
experimentalSourceRewriting
totrue
does not help.There is an open PR meant to fix this here: https://github.com/cypress-io/cypress/pull/5273 It’s complicated and is still a work in progress.