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

TestCafe scrolls a page to a target element incorrectly #987

Closed
georgiy-abbasov opened this issue Nov 24, 2016 · 2 comments
Closed

TestCafe scrolls a page to a target element incorrectly #987

georgiy-abbasov opened this issue Nov 24, 2016 · 2 comments
Assignees
Labels
STATE: Auto-locked An issue has been automatically locked by the Lock bot. SYSTEM: automations TYPE: bug The described behavior is considered as wrong (bug).
Milestone

Comments

@georgiy-abbasov
Copy link
Contributor

Are you requesting a feature or reporting a bug?

bug

What is the current behavior?

TestCafe doesn't scroll container to show target element fully while performing an action on it

What is the expected behavior?

TestCafe should scroll container to show element fully, when it possible (element is smaller, than container)

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

Run test

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

Tested page URL:

<html>
<head>
    <title>Index</title>
    <style>
        .row {
            height: 24px;
            width: 75px;
            background: grey;
            border: 1px solid black;
        }
    </style>
</head>
<body>
<div id="verticalContainer" style="overflow-y:scroll; left: 100px; position: absolute; height:70px; width:100px">
    <div id="targetTop" class="row"></div>
    <div class="row"></div>
    <div id="targetBottom" class="row"></div>
</div>
</body>
</html>

Test code

const verticalContainer   = Selector('#verticalContainer');

test('Scroll a vertical container to the bottom element', async t => {
    await t.click('#targetBottom');

    expect(await verticalContainer.scrollTop).to.be.least(8);
});

Specify your

  • operating system: Win10 x64
  • testcafe version: 0.11.0-alpha
  • node.js version: v6.9.1
@georgiy-abbasov georgiy-abbasov added SYSTEM: automations TYPE: bug The described behavior is considered as wrong (bug). labels Nov 24, 2016
@georgiy-abbasov georgiy-abbasov added this to the Sprint #2 milestone Nov 24, 2016
@georgiy-abbasov georgiy-abbasov self-assigned this Nov 24, 2016
@georgiy-abbasov
Copy link
Contributor Author

I'm working on this

georgiy-abbasov pushed a commit to georgiy-abbasov/testcafe-phoenix that referenced this issue Nov 24, 2016
georgiy-abbasov pushed a commit to georgiy-abbasov/testcafe-phoenix that referenced this issue Nov 24, 2016
@MarinaRukavitsyna MarinaRukavitsyna changed the title TestCafe scroll to target element incorrectly TestCafe scrolls a page to a target element incorrectly Nov 29, 2016
@lock
Copy link

lock bot commented Mar 29, 2019

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.

@lock lock bot added the STATE: Auto-locked An issue has been automatically locked by the Lock bot. label Mar 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 29, 2019
kirovboris pushed a commit to kirovboris/testcafe-phoenix that referenced this issue Dec 18, 2019
…vExpress#988)

* Fixed extra distance in scroll automation (closes DevExpress#987)

* Test names fixed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
STATE: Auto-locked An issue has been automatically locked by the Lock bot. SYSTEM: automations TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
Development

No branches or pull requests

1 participant