Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetching an absolute CORS url is treated as relative #1629

Closed
fnlctrl opened this issue Jul 19, 2017 · 3 comments
Closed

Fetching an absolute CORS url is treated as relative #1629

fnlctrl opened this issue Jul 19, 2017 · 3 comments
Assignees
Labels
!IMPORTANT! STATE: Auto-locked An issue has been automatically locked by the Lock bot. SYSTEM: hammerhead TYPE: bug The described behavior is considered as wrong (bug).
Milestone

Comments

@fnlctrl
Copy link

fnlctrl commented Jul 19, 2017

Are you requesting a feature or reporting a bug?

Bug

What is the current behavior?

When running tests, client fetches resources from https://some.api.com/foo (cors) and the requested url becomes http://192.168.109.1:9625/Byhu2n2Hb/https://some.api.com/foo.

What is the expected behavior?

Fetching https://some.api.com/foo normally.

How would you reproduce the current behavior (if this is a bug)?

Use the following test code, open chrome devtools Networks tab before the test controller clicks 'CREATE A NEW ACCOUNT', and see a POST request made to
http://192.168.109.1:10247/Hk50pnnrW/https://api.futurenda.com/Chain
instead of https://api.futurenda.com/Chain

Provide the test code and the tested page URL (if applicable)

Tested page URL: https://app.futurenda.com

Test code

fixture `Login view`
    .page('https://app.futurenda.com')

test('Register with email', async t => {
    await t
        .expect(Selector('#loading-screen').exists).notOk('Loading screen stuck', { timeout: 10000 })
        .click(Selector('[md-button]').withText('Sign up with email'))
        .typeText(Selector('.form > [md-text-field]').nth(0), `test+test${Date.now()}@gmail.com`)
        .typeText(Selector('.form > [md-text-field]').nth(1), 'testpassword')
        .typeText(Selector('.form > [md-text-field]').nth(2), 'testpassword')
        .wait(2000) // wait before clicking submit so you can open devtools Networks tab
        .click(Selector('[md-button].login'))
        .debug()

    let location = t.eval(() => location.href)

    await t.expect(location).contains('/agenda')
})

Specify your

  • operating system: Windows 10
  • testcafe version: 0.16.2
  • node.js version: 8.1.0
  • chrome version: 59.0.3071.115
@AlexanderMoskovkin AlexanderMoskovkin added SYSTEM: hammerhead TYPE: bug The described behavior is considered as wrong (bug). labels Jul 19, 2017
@AlexanderMoskovkin AlexanderMoskovkin added this to the Sprint #8 milestone Jul 19, 2017
@AlexanderMoskovkin
Copy link
Contributor

Hi @fnlctrl,

TestCafe works via own proxy (https://github.com/DevExpress/testcafe-hammerhead). It's ok that the browser sends requests not directly to the target server but through the proxy.
It seems there is an issue in the proxy which breaks the behavior. We'll investigate it and notify you about any progress
/cc @LavrovArtem

@LavrovArtem
Copy link
Contributor

LavrovArtem commented Jul 21, 2017

fixed in [email protected]

@lock
Copy link

lock bot commented Mar 28, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs or feature requests. For TestCafe API, usage and configuration inquiries, we recommend asking them on StackOverflow.

@lock lock bot added the STATE: Auto-locked An issue has been automatically locked by the Lock bot. label Mar 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
!IMPORTANT! STATE: Auto-locked An issue has been automatically locked by the Lock bot. SYSTEM: hammerhead TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
Development

No branches or pull requests

3 participants