Just simple hover action, beginner with TestCafe
Test Fails (however in my opinion it shall be reported as Error instead of Fail ... unless this case really relates a launched page and is in fact a test failure
Work as when --skip-js-errors is launched? Unless I am too rookie to know what am I talking about :-)
Your website URL (or attach your complete example):
Test Code:
import { Selector } from 'testcafe';
fixture`Getting Started`
.page`https://poczta.interia.pl/`;
const cos = Selector('.standard-interia-logo');
test.skip('My first test', async t => {
await t
.setTestSpeed(0.1)
.typeText('input.gLFyf.gsfi', 'John Smith')
.pressKey('enter')
.expect(Selector('html').textContent).contains('John Smith')
});
test('My second test', async t => {
await t
.hover(cos)
.wait(50000)
});
Your complete test report:
Getting Started
- My first test
脳 My second test
1) A JavaScript error occurred on "https://poczta.interia.pl/".
Repeat test actions in the browser and check the console for errors.
If you see this error, it means that the tested website caused it. You can fix it or disable tracking JavaScript
errors in TestCafe. To do the latter, enable the "--skip-js-errors" option.
If this error does not occur, please write a new issue at:
"https://github.com/DevExpress/testcafe/issues/new?template=bug-report.md".
JavaScript error details:
h.indexOf is not a function:
value@https://iwa2.iplsc.com/main.iwa.js:2:94620
value/<@https://iwa2.iplsc.com/main.iwa.js:2:91166
value@https://iwa2.iplsc.com/main.iwa.js:2:91123
e@https://iwa2.iplsc.com/main.iwa.js:2:89833
e@https://iwa2.iplsc.com/main.iwa.js:2:86436
e@https://iwa2.iplsc.com/main.iwa.js:2:24501
e@https://iwa2.iplsc.com/main.iwa.js:2:81423
e@https://iwa2.iplsc.com/main.iwa.js:2:78199
@https://iwa2.iplsc.com/main.iwa.js:2:59596
i@https://iwa2.iplsc.com/main.iwa.js:2:398
@https://iwa2.iplsc.com/main.iwa.js:2:52061
i@https://iwa2.iplsc.com/main.iwa.js:2:398
@https://iwa2.iplsc.com/main.iwa.js:2:2164
@https://iwa2.iplsc.com/main.iwa.js:2:2174
Browser: Firefox 68.0.0 / Windows 10.0.0
13 | .expect(Selector('html').textContent).contains('John Smith')
14 |});
15 |
16 |test('My second test', async t => {
17 | await t
> 18 | .hover(cos)
19 | .wait(50000)
20 |});
at hover (C:\testcafe\test.js:18:10)
at test (C:\testcafe\test.js:16:1)
at <anonymous> (C:\testcafe\node_modules\testcafe\src\api\wrap-test-function.js:17:28)
at TestRun._executeTestFn (C:\testcafe\node_modules\testcafe\src\test-run\index.js:288:19)
at TestRun.start (C:\testcafe\node_modules\testcafe\src\test-run\index.js:337:24)
1/1 failed (6s)
1 skipped
Hi @Pieras2
however in my opinion it shall be reported as Error instead of Fail ... unless this case really relates a launched page and is in fact a test failure
If JavaScript errors are not caught, this can lead to web application problems, which are difficult to find. That is why it's necessary to immediately pay attention to such JavaScript errors. It allows web site developers to quickly learn about problems and fix them.
聽
I found a TestCafe problem on the web site from your example. This bug is related to our internal web proxy, so I will transfer this issue to its repository.
For team:
The problem caused by EventEmitter returned as localStorage property value. The site code expects only strings.
We need to hide from enumeration the all internal properties of StorageWrapper
Most helpful comment
Hi @Pieras2
If JavaScript errors are not caught, this can lead to web application problems, which are difficult to find. That is why it's necessary to immediately pay attention to such JavaScript errors. It allows web site developers to quickly learn about problems and fix them.
聽
I found a TestCafe problem on the web site from your example. This bug is related to our internal web proxy, so I will transfer this issue to its repository.
For team:
The problem caused by
EventEmitterreturned aslocalStorageproperty value. The site code expects only strings.We need to hide from enumeration the all internal properties of StorageWrapper