Bug
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.
Fetching https://some.api.com/foo normally.
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
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')
})
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
fixed in [email protected]
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.
Most helpful comment
fixed in
[email protected]