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

The typeText action does not work with the DevExtreme Lookup search field #4472

Closed
Dmitry-Ostashev opened this issue Nov 11, 2019 · 3 comments
Assignees
Labels
AREA: testing FREQUENCY: level 2 Support Center An issue created/received from the Support Center ticket. SYSTEM: hammerhead TYPE: bug The described behavior is considered as wrong (bug).
Milestone

Comments

@Dmitry-Ostashev
Copy link
Contributor

Dmitry-Ostashev commented Nov 11, 2019

What is your Test Scenario?

I need to type text into the dxLookup search field to find a particular item.

What is the Current behavior?

The search field loses focus and stays empty.
This happens because TestCafe emulates the 'blur' event after the 'focus' event when the event target is not focusable.

What is the Expected behavior?

The required text should be entered into the search field.

What is your web application and your TestCafe test code?

Your website URL (or attach your complete example):
https://js.devexpress.com/Demos/WidgetsGallery/Demo/Lookup/Basics/jQuery/Light/

Your complete test code (or attach your test files):
 import { Selector } from 'testcafe';

fixture `Devextreme`
    .page `https://js.devexpress.com/Demos/WidgetsGallery/Demo/Lookup/Basics/jQuery/Light/`;

test('Test 1', async t => {
    await t
        .switchToIframe(Selector('#demoFrame'))
        .expect(Selector('.dx-lookup-field-wrapper').exists).ok({
            timeout: 30000
        })
        .click(Selector('.dx-lookup-field-wrapper').find('div').withText('John Heart'))
        .click(Selector('.dx-texteditor-input'))
        .typeText(Selector('.dx-texteditor-input'), 'Billy')
        .expect(Selector('.dx-lookup-field-wrapper').find('div').withText('Billy').visible).ok();
});

Steps to Reproduce:

Run the test

Your Environment details:

  • testcafe version: 1.6.1
  • node.js version: v10.16.0
  • command-line arguments: testcafe chrome test3.js
  • browser name and version: Chrome 78
  • platform and version: Win10
  • other:
@Dmitry-Ostashev Dmitry-Ostashev added the TYPE: bug The described behavior is considered as wrong (bug). label Nov 11, 2019
@Dmitry-Ostashev Dmitry-Ostashev added this to the Planned milestone Nov 11, 2019
@Dmitry-Ostashev
Copy link
Contributor Author

I reproduced this issue with the testcafe-hammerhead playground:
dxtreme-lookup-hammerhead

@Dmitry-Ostashev
Copy link
Contributor Author

@wentwrong
Copy link
Contributor

Fixed in DevExpress/testcafe-hammerhead#2635

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

No branches or pull requests

2 participants