Testcafe: Pages do not load with Turbolinks enabled

Created on 17 May 2017  路  16Comments  路  Source: DevExpress/testcafe

Are you requesting a feature or reporting a bug?

bug

What is the current behavior?

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

What is the expected behavior?

Pages should load normally but don't

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

Removing Turbolinks makes testcafe work as expected where pages load normally as expected

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

Tested page URL:

Test code


Specify your

  • operating system: Mac OS X
  • testcafe version: 0.15.0
  • node.js version: 7.10.0
Auto-locked hammerhead bug

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!

All 16 comments

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

@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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

devmondo picture devmondo  路  3Comments

KaneMorgan picture KaneMorgan  路  3Comments

inikulin picture inikulin  路  3Comments

madroneropaulo picture madroneropaulo  路  3Comments

darkowic picture darkowic  路  3Comments