Skip to content

fix(input/testing): unable to set the value of inputs that don't respond to typing #18812

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

Merged
merged 1 commit into from
Jun 10, 2020

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Mar 12, 2020

The setValue method of the input harness is set up so that it types out the value in the input. This won't work for inputs that don't respond to typing (e.g. color). These changes add an extra call that also sets the value property of the input, on top of typing into it.

Fixes #18790.

Note: not sure whether the change to the TestElement signature needs to be made optional first.

@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: patch This PR is targeted for the next patch release labels Mar 12, 2020
@crisbeto crisbeto requested review from devversion, mmalerba and a team as code owners March 12, 2020 19:50
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Mar 12, 2020
@crisbeto crisbeto force-pushed the 18790/input-harness-value branch from 80d7670 to 34bc6de Compare March 12, 2020 19:54
@crisbeto
Copy link
Member Author

@mmalerba I've reworked this based on our discussion. I'm also bumping up the priority since the issue has come up multiple times.

@crisbeto crisbeto added P2 The issue is important to a large percentage of users, with a workaround and removed P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent labels May 11, 2020
Copy link
Member

@devversion devversion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Copy link
Contributor

@mmalerba mmalerba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mmalerba mmalerba added lgtm action: merge The PR is ready for merge by the caretaker labels May 11, 2020
@mmalerba mmalerba removed the action: merge The PR is ready for merge by the caretaker label May 11, 2020
…ond to typing

The `setValue` method of the input harness is set up so that it types out the value in the input. This won't work for input that don't respond to typing (e.g. `color`). These changes add an extra call that also sets the `value` property of the input, on top of typing into it.

Fixes angular#18790.
@crisbeto crisbeto force-pushed the 18790/input-harness-value branch from 72ef642 to ccab78c Compare May 12, 2020 06:09
@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label May 12, 2020
@andrewseguin andrewseguin merged commit 7e5802a into angular:master Jun 10, 2020
andrewseguin pushed a commit that referenced this pull request Jun 10, 2020
…ond to typing (#18812)

The `setValue` method of the input harness is set up so that it types out the value in the input. This won't work for input that don't respond to typing (e.g. `color`). These changes add an extra call that also sets the `value` property of the input, on top of typing into it.

Fixes #18790.
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jul 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement P2 The issue is important to a large percentage of users, with a workaround target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug(MatInputHarness): Does not properly set value with <input type="color">
5 participants