bug
TestCafe does not work with Turbolinks enabled applications.
Many Ruby on Rails application have turbolinks enabled. It would be great to see if there is something that could be done to allow e2e testing of RoR with TestCafe
https://github.com/turbolinks/turbolinks
Pages should load normally but don't
Removing Turbolinks makes testcafe work as expected where pages load normally as expected
Tested page URL:
Test code
Hi @irobayna,
It seems there is some conflict between Turbolink and our proxy, we'll investigate why it happens and how we can deal with it.
I've reproduced the problem on a site that uses Turbolink https://github.com/DevExpress/testcafe-hammerhead/issues/1133
fixed in [email protected]
@AlexanderMoskovkin I upgraded to the latest version of testcafe, even removed 'node_modules' to be sure I pull all new packages and still appears not to work for me.
testcafe -v
Using locally installed version of TestCafe.
0.16.0-alpha3
/cc @LavrovArtem
@AlexanderMoskovkin @LavrovArtem Thanks! Don't hesitate to reach back if you need further details, etc
@irobayna Initially we've reproduced the issue on our example and we've fixed it. But it seems there is some other problem with your page. Could you please provide us your page or a simple example where we can reproduce the problem.
@LavrovArtem I cannot share the current app but I will create a bare bones application that shows the same behavior.
I am using rails 5, with latest TurboLink + webpack.
Will ping you once the app is ready.
@LavrovArtem Almost done with the sample application.
Also, wanted to let you know that the first page using turbolinks does work, the issue comes in once you navigate to another page, basically the javascript for the second page does not load correctly (I can see components do not get initialize correctly: select2, datatables, etc) just FYI
On my sample app, I keep getting the following testcafe error as I navigate to a different page:
SecurityError (DOM Exception 18): The operation is insecure.
Any ideas as to why?
here is my test:
fixture `[testcafe] turbolinks`
.page `http://localhost:3000/`;
test('test issue', async t => {
await t
.takeScreenshot()
.navigateTo('http://localhost:3000/dashboards/test')
.takeScreenshot();
});
@irobayna Thanks for your information but we can't make any conclusions from it. We need to debug your example to find the cause of the problem.
Hi @irobayna!
How is your progress? Could you please try the last alpha?
npm install -g [email protected]
Hi @LavrovArtem started to test and I see this new error now
2) Failed to find a DNS-record for the resource at "http://localhost:3000/user/sign_in".
Almost done with the sample application.
@irobayna, It would be great if you provide us with it. It'll help us to find the cause of the problem and fix it.
@LavrovArtem @AlexanderMoskovkin -- great news:
Ignore my earlier comment today I forgot to run the application server (yes, I am idiot) !!!
And guess what, with the latest release testcafe (0.16.0-alpha4) now works as expected with turbolinks on a rails application (plus webpack)
Thank you very much!
Great news! 馃榾馃榾
This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests. We recommend you ask TestCafe API, usage and configuration inquiries on StackOverflow.
Most helpful comment
@LavrovArtem @AlexanderMoskovkin -- great news:
Ignore my earlier comment today I forgot to run the application server (yes, I am idiot) !!!
And guess what, with the latest release testcafe (0.16.0-alpha4) now works as expected with turbolinks on a rails application (plus webpack)
Thank you very much!