Skip to content

Incorrect redirect to malformed url within AUT - adding _/ in url #3975

@hhudson

Description

@hhudson

Current 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).
Screen Shot 2019-04-15 at 10 14 48 PM

However - it is very important to note that the cypress login correctly returns:

  1. a valid cookie
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions