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

Native click event is not triggered by click on a disabled button #5240

Closed
Nikolaj1010 opened this issue Jun 22, 2020 · 1 comment · Fixed by #6805
Closed

Native click event is not triggered by click on a disabled button #5240

Nikolaj1010 opened this issue Jun 22, 2020 · 1 comment · Fixed by #6805
Assignees
Labels
FREQUENCY: level 2 SYSTEM: automations TYPE: bug The described behavior is considered as wrong (bug).
Milestone

Comments

@Nikolaj1010
Copy link

Nikolaj1010 commented Jun 22, 2020

What is your Test Scenario?

I need to check that native click event is triggered by click on a disabled native button

What is the Current behavior?

Native click event is not triggered by click on a disabled button

What is the Expected behavior?

Native click event should be triggered by click on a disabled button

What is your web application and your TestCafe test code?

The issue can be reproduced here: https://stackblitz.com/edit/angular-ivy-gldr6d?file=src%2Fapp%2Fapp.component.ts or https://stackblitz.com/edit/angular-ivy-gldr6d

I am able to triggered native click event by click on disabled button manually but the native click event is not triggered in TestCafe.

Steps to Reproduce:

  1. Go to https://angular-ivy-gldr6d.stackblitz.io/
  2. Click on "Disabled native button"
  3. See that the button has been native-clicked 1 time but the same steps do not trigger the event using TestCafe

Your Environment details:

  • testcafe version: 1.8.2
  • browser name and version: Chrome 83.0.4103.106
  • platform and version: Windows 10
@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Jun 22, 2020
@Nikolaj1010 Nikolaj1010 changed the title Native click event is triggered by click on a disabled native button Native click event is not triggered by click on a disabled button Jun 23, 2020
@Farfurix
Copy link
Contributor

Farfurix commented Jun 23, 2020

@Nikolaj1010

Hello,

I've reproduced the issue under Windows 10 / Chrome 83. We'll examine it and check for a suitable solution.

For the team:

import { Selector } from 'testcafe';
import { waitForAngular } from 'testcafe-angular-selectors';

fixture `Fixture`
    .beforeEach(async t => {
        await t.debug(); // Here we need to unlock the tested page and ckick the "Run this project" button

        await waitForAngular();
    });

test
    .page('https://angular-ivy-gldr6d.stackblitz.io/')
    ('test', async t => {
        const nativeBtn   = Selector('#nativeBtn');
        const clicksCount = Selector('#nativeClickBasicBtn').innerText;

        await t
            .click(nativeBtn)
            .click(nativeBtn)
            .click(nativeBtn)
            .click(nativeBtn);

        await t
            .expect(clicksCount).eql(4);
    });

Possibly related to DevExpress/testcafe-hammerhead#2346. Update: this fix doesn't resolve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FREQUENCY: level 2 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.

4 participants