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

Perform action on 1px elements hangs until it timeout #2020

Closed
dfleury opened this issue Dec 21, 2017 · 2 comments · May be fixed by marcusrc/testcafe#6, marcusrc/testcafe#7, marcusrc/testcafe#8 or marcusrc/testcafe#34
Assignees
Labels
AREA: client 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

@dfleury
Copy link

dfleury commented Dec 21, 2017

Are you requesting a feature or reporting a bug?

bug

What is the current behavior?

TestCafé is waiting the whole action timeout after perform an action on an element when one of yours dimensions (width or width) is equal to 1px.

What is the expected behavior?

When an action is performed on a element with one of your dimensions being equal to 1px, it should proceed to the next step without waiting the entire action timeout

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

Render an element with height or width as 1px and perform an action like hover or click

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

Tested page URL:
https://jsfiddle.net/b27vwh7r/

Test code

<style>
        #failing {
            display: block;
            height: 1px;
            background: red;
        }
        #allgood {
            display: block;
            height: 2px;
            background: green;
        }
</style>
<div id="failing"></div>
<br /><br /><br /><br />
<div id="allgood"></div>
import { Selector as $ } from 'testcafe'

fixture `bug`
	.page `http://localhost:8000/test.html`

test('Perform action on 1px elements hangs until it timeout', async (t) => {
	await t
		.hover($('#failing')) // slow
		.click($('#allgood')) // fast
})

Specify your

  • operating system: macOS 10.12.6 (Sierra)
  • testcafe version: 0.18.5
  • node.js version: 9.3.0
@AlexanderMoskovkin AlexanderMoskovkin added AREA: client TYPE: bug The described behavior is considered as wrong (bug). labels Dec 22, 2017
@AlexanderMoskovkin
Copy link
Contributor

Hi @dfleury,

Thanks for you report, I've reproduced it and we'll investigate it.
As a workaround you can add the timeout option to the selector:

    await t
        .click(Selector('#failing', { timeout: 500 }))
        .click(Selector('#allgood'));

@miherlosev miherlosev added this to the Planned milestone May 8, 2018
@AndreyBelym AndreyBelym modified the milestones: Planned, Sprint #12 May 15, 2018
@AlexKamaev AlexKamaev self-assigned this Jun 1, 2018
AlexKamaev added a commit to AlexKamaev/testcafe that referenced this issue Jun 1, 2018
@lock
Copy link

lock bot commented Mar 28, 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 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 28, 2019
kirovboris pushed a commit to kirovboris/testcafe-phoenix that referenced this issue Dec 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.