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 t.scrollIntoView method may cause the "element not visible" error #6601

Closed
Dmitry-Ostashev opened this issue Oct 11, 2021 · 1 comment · Fixed by #6937
Closed

The t.scrollIntoView method may cause the "element not visible" error #6601

Dmitry-Ostashev opened this issue Oct 11, 2021 · 1 comment · Fixed by #6937
Assignees
Labels
FREQUENCY: level 1 Support Center An issue created/received from the Support Center ticket. SYSTEM: automations TYPE: bug The described behavior is considered as wrong (bug).
Milestone

Comments

@Dmitry-Ostashev
Copy link
Contributor

What is your Test Scenario?

Scroll the DevExtreme DataGrid to make a particular row visible.

What is the Current behavior?

The t.scrollIntoView method causes the "element not visible" error.

What is the Expected behavior?

The t.scrollIntoView method should scroll the DataGrid content.

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/DataGrid/VirtualScrolling/jQuery/Light
Your complete test code (or attach your test files):
 import { Selector } from 'testcafe';
fixture `dxtreme-scroll`
    .page `https://js.devexpress.com/Demos/WidgetsGallery/Demo/DataGrid/VirtualScrolling/jQuery/Light/`;
test('New Test', async t => {
    await t
        .switchToIframe('.demo-frame').wait(10000);
    const el = Selector('[aria-rowindex="16"] [aria-colindex="2"]');
    await t
        .expect(el.visible).ok()
        .scrollIntoView(el);
});
Your complete test report:
The element that matches the specified selector is not visible.

Browser: Chrome 94.0.4606.61 / Windows 10

    9 | 
   10 |     const el = Selector('[aria-rowindex="16"] [aria-colindex="2"]');
   11 | 
   12 |     await t
   13 |         .expect(el.visible).ok()
 > 14 |         .scrollIntoView(el);

Steps to Reproduce:

Run the test.

Your Environment details:

  • testcafe version: 1.16.0
  • node.js version: 14.18.0
  • browser name and version: Chrome 94
@Dmitry-Ostashev Dmitry-Ostashev added TYPE: bug The described behavior is considered as wrong (bug). SYSTEM: automations FREQUENCY: level 1 labels Oct 11, 2021
@Dmitry-Ostashev Dmitry-Ostashev added this to the Planned milestone Oct 11, 2021
@helen-dikareva helen-dikareva added the Support Center An issue created/received from the Support Center ticket. label Jan 21, 2022
@helen-dikareva
Copy link
Collaborator

@Aleksey28 Aleksey28 self-assigned this Feb 25, 2022
AndreyBelym pushed a commit that referenced this issue Mar 30, 2022
…6937)

* refactor: simplified checking scrollability of the element

* fix: added the hidden in the SCROLLABLE_OVERFLOW_STYLE_RE

* feat: added scrolling to a hidden element into the test scroll into view
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FREQUENCY: level 1 Support Center An issue created/received from the Support Center ticket. SYSTEM: automations 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