Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto list not displaying when typing into the field T899095 #5322

Closed
Ogurecher opened this issue Jul 15, 2020 · 4 comments · Fixed by DevExpress/testcafe-hammerhead#2421
Closed
Assignees
Labels
AREA: client FREQUENCY: level 1 Support Center An issue created/received from the Support Center ticket. TYPE: bug The described behavior is considered as wrong (bug).
Milestone

Comments

@Ogurecher
Copy link
Contributor

Ogurecher commented Jul 15, 2020

SC Ticket

https://supportcenter.devexpress.com/internal/ticket/details/T899095

Test

import { Selector } from 'testcafe';

fixture `skillsForHealth`
    .page `https://drs.ruat.skillsforhealth.org.uk/Administration/Workpatternlist.aspx`;

test('autolist', async t => {
    await t
        .typeText(Selector('#userName'), 'LOGIN FROM SC TICKET')
        .typeText(Selector('#userPassword'), 'PASSWORD FROM SC TICKET')
        .click(Selector('#btnSubmit'))
        .typeText(Selector('#organisationsTxtSearch'), 'skills for health')
        .debug()
        .expect(Selector('#addPattern').exists).ok();
});

Error

A JavaScript error occurred on "https://drs.ruat.skillsforhealth.org.uk/Administration/Workpatternlist.aspx".
      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:
      TypeError: Cannot read property 'top' of undefined
          at init._align (https://drs.ruat.skillsforhealth.org.uk/js/kendo/kendo.all.min.js:21:13463)
          at init._position (https://drs.ruat.skillsforhealth.org.uk/js/kendo/kendo.all.min.js:21:12395)
          at init.open (https://drs.ruat.skillsforhealth.org.uk/js/kendo/kendo.all.min.js:21:9617)
          at n (http://172.27.63.129:41853/hammerhead.js:15:4487)
          at value (http://172.27.63.129:41853/hammerhead.js:6:10725)
          at init._listBound (https://drs.ruat.skillsforhealth.org.uk/js/kendo/kendo.all.min.js:23:12905)
          at init.e (https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js:3:4265)
          at init.trigger (https://drs.ruat.skillsforhealth.org.uk/js/kendo/kendo.all.min.js:10:6897)
          at init.refresh (https://drs.ruat.skillsforhealth.org.uk/js/kendo/kendo.all.min.js:22:15917)
          at init.e (https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js:3:4265)

      Browser: Chrome 83.0.4103.116 / Windows 10
@Ogurecher Ogurecher added TYPE: bug The described behavior is considered as wrong (bug). AREA: client Support Center An issue created/received from the Support Center ticket. FREQUENCY: level 1 labels Jul 15, 2020
@AndreyBelym AndreyBelym added this to the Sprint #63 milestone Aug 17, 2020
@Ogurecher Ogurecher self-assigned this Aug 18, 2020
@AndreyBelym AndreyBelym modified the milestones: Sprint #63, Sprint #64 Sep 2, 2020
@Ogurecher
Copy link
Contributor Author

Ogurecher commented Sep 3, 2020

This happens because we save the result of the first call to document.getElementsByTagName('body'), which happens before the element was added to the page. The element does not trigger element._onElementAdded which updates the DOMMutationTracker version. Thus document.getElementsByTagName('body') always returns the stored empty collection.

index.html

<!DOCTYPE html>
<html>
    <head>
        <script>
            window.savedCollectionLength = document.getElementsByTagName('body').length;
        </script>
    </head>
    <body></body>
</html>

test.js

fixture `fixture`
    .page `./page-new.html`;

test('test', async t => {
    await t
        .expect(t.eval(() => window.savedCollectionLength)).eql(0)
        .expect(t.eval(() => document.getElementsByTagName('body').length)).eql(1);
});

@MaxStroh
Copy link

MaxStroh commented Sep 8, 2020

@Ogurecher, Thank you for the fast reply on ticket #5502 ! And that the error is already known makes us hope that a fix is in sight. Is it possible to already estimate when a released fix can be roughly expected?

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Sep 8, 2020
@Ogurecher
Copy link
Contributor Author

@MaxStroh, The fix is already merged into the master branch of testcafe-hammerhead and will be included in the next TestCafe version.

We can't share a timeframe as any personal estimate may be misleading, but we usually release new versions every two-three weeks.

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label Sep 9, 2020
@AndreyBelym
Copy link
Contributor

AndreyBelym commented Sep 17, 2020

The fix was released in testcafe@1.9.3. Thank you for your patience 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AREA: client FREQUENCY: level 1 Support Center An issue created/received from the Support Center ticket. TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants