question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mootools errors from testcafe seem to cause a button to not function after clicking it

See original GitHub issue

Are you requesting a feature or reporting a bug?

Bug

What is the current behavior?

I am unable to click a button, even if I pause the test and manually click the button. The test doesn’t say the button can’t be clicked but I can’t progress in the application b/c clicking the button doesn’t actually do anything. There are various mootools errors popping up in the console log that do not happen when you access the page without testcafe

This button gets clicked but doesn’t actually function how it’s supposed to. It would normally bring up a dialogue modal asking if you’re sure you want to finish the practice test.

What is the expected behavior?

The button should be able to be clickable and execute Its purpose and there shouldn’t be any errors in the console log about mootools.

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

Execute the test I have provided and try clicking the finish practice button at the end and notice that it will not do anything

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

Tested page URL:

Note this url can’t be directly accessed you would have to run the test or manually do what the test is doing to get here

https://placeu.net/placementtest/take/1300/practice/5b85be7390b313f018ecf88e/1

Test code (I included a debug at the end so you can manually try to click and inspect the errors)

import { Selector }      from 'testcafe';

fixture `testcafe canvas`
    .page `https://webassign.instructure.com/login/canvas`;

const medwait            = 5000
const longwait           = 15000;
const course             = Selector('.ic-DashboardCard__header-title');
const ltiLink            = Selector('.item_link');
const loadBtn            = Selector('.btn[type="submit"]');
const startPracticeBtn   = Selector('button[wa-qa="placement-practice-button"]')
const confirmPracticeBtn = Selector('start-practice-confirmation button.wa-button-primary');
const finishPracticeBtn  = Selector('wa-button[on-click="$ctrl.finishPractice()"] button.wa-submit-test-btn');
const spinner            = Selector('.md-spinner-wrapper');

test('Instructor', async t => {
    await t
        .typeText(Selector('#pseudonym_session_unique_id'), 'testcafestudent01@testing123.com')
        .typeText(Selector('#pseudonym_session_password'), 'Password1')
        .click(Selector('#login_form .Button--login'))
        .expect(course.exists).ok({timeout: medwait})
        .click(course)
        .expect(ltiLink.exists).ok({timeout: medwait})
        .click(ltiLink)
        .expect(loadBtn.exists).ok({timeout: medwait})
        .click(loadBtn)
        .expect(startPracticeBtn.exists).ok({timeout: medwait})
        .click(startPracticeBtn)
        .expect(confirmPracticeBtn.exists).ok({timeout: medwait})
        .click(confirmPracticeBtn)
        .expect(spinner.exists).notOk({ timeout: longwait })
        .expect(finishPracticeBtn.exists).ok({timeout: medwait})
        .click(finishPracticeBtn).debug();
});

Specify your

  • operating system: Mac Osx Sierra
  • testcafe version: 0.21.1
  • node.js version: 8.2.1

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
barretvasilchikcommented, Nov 29, 2018

sorry for the late follow up. I am thrilled to report that the fix worked on my end. Thank you so much for fixing this. This will enable my team to move forward

1reaction
LavrovArtemcommented, Nov 22, 2018

@barretvasilchik The fix was published in testcafe@0.23.3-alpha.1.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problem on CLICK action · Issue #4146 · DevExpress/testcafe
I want to perform a "CLICK" on a button. What is the Current behavior? The Button is visible but the CLICK action is...
Read more >
testcafe: Check for something after every click - Stack Overflow
This injects a script onto the page I am testing. After every click, it uses jQuery to see if an error class exists....
Read more >
InternalError: too much recursion - JavaScript - MDN Web Docs
When there are too many function calls, or a function is missing a base case, JavaScript will throw this error. Examples. This recursive...
Read more >
How do I fix this validator error? - The element a must not ...
Issue. I am getting the following error. Error: The element a must not appear as a descendant of the button element.
Read more >
[SOLVED] Sveltekit: Importing ESM package produces errors ...
Named export 'setAssetPath' not found. The requested module '@esri/calcite-components/dist/components/index.js' is a CommonJS module, which may ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found