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

onChange event not fired on Controlled input in Angular 5 #2319

Closed
sommcz opened this issue Apr 16, 2018 · 3 comments
Closed

onChange event not fired on Controlled input in Angular 5 #2319

sommcz opened this issue Apr 16, 2018 · 3 comments
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

@sommcz
Copy link

sommcz commented Apr 16, 2018

Are you requesting a feature or reporting a bug?

Bug

What is the current behavior?

Using action.type not fire onChange event when used on controlled input in Angular5

What is the expected behavior?

onChange resp. "(change)" event is fired no matter if it is controlled or non-controlled (with binded [value] property) input

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

Create input with binded value which updates its value in onInput event. See example at:
https://stackblitz.com/edit/testcafe-and-angular-controlled-componenet-issue

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

Tested page URL:
https://testcafe-and-angular-controlled-componenet-issue.stackblitz.io

Test code

"@fixture test input change event";
"@page https://testcafe-and-angular-controlled-componenet-issue.stackblitz.io/";


"@test"["test1"] = {
    '1.Type in input "A"': function() {
        act.type("input[name='A']", "10");
    },
    '2.Type in input "B"': function() {
        act.type("input[name='B']", "11");
    },
    '3.Type in input "C"': function() {
        act.type("input[name='C']", "12");
    },
    '4.Type in input "D"': function() {
        act.type("input[name='D']", "13");
    },
    "5.Click body": function() {
        act.click("body");
    },
    "6.Assert": function() {
        eq($("#testChangeResult").text(), '{\n  "a": true,\n  "b": true,\n  "c": true,\n  "d": true\n}', "Change events fired");
    }
};

Specify your

  • operating system: & browser: Chrome 65.0.3325 / Windows 10 0.0.0
  • testcafe version: 0.19.2
  • node.js version: v8.9.4
@sommcz sommcz changed the title onChange event not firred on Controlled input in Angular 5 onChange event not fired on Controlled input in Angular 5 Apr 16, 2018
@AlexKamaev
Copy link
Contributor

Hi, I was able to reproduce the issue. I'll investigate it

@AlexKamaev
Copy link
Contributor

fixed in DevExpress/testcafe-hammerhead#1580

@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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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).
Projects
None yet
Development

No branches or pull requests

2 participants