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

Emulate HTML 5 Validation API #2576

Closed
kafeterio opened this issue Jun 29, 2018 · 3 comments
Closed

Emulate HTML 5 Validation API #2576

kafeterio opened this issue Jun 29, 2018 · 3 comments
Labels
STATE: Stale An outdated issue that will be automatically closed by the Stale bot. SYSTEM: automations TYPE: enhancement The accepted proposal for future implementation. TYPE: Web API support

Comments

@kafeterio
Copy link

kafeterio commented Jun 29, 2018

Are you requesting a feature or reporting a bug?

Bug

What is the current behavior?

calls to checkValidity() for input with value < minlength return true

What is the expected behavior?

should return false

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

<form>
	<label> label: </label><input minlength="4" maxlength="10"></input>
</form>
import { ClientFunction } from "testcafe";

fixture `Test native validity`
.page `http://localhost:3939`

const getValid = ClientFunction(()=>{
	return document.getElementsByTagName('input')[0].checkValidity()
})

test('not valid when length < 4', async t => {
	await t
	.typeText('input', 'aaa')
	.expect(getValid()).eql(false)
})

Error

image

  • operating system: linux
  • testcafe version: 0.20.4
  • node.js version: 9.11.1
@miherlosev miherlosev self-assigned this Jul 2, 2018
@miherlosev miherlosev added TYPE: bug The described behavior is considered as wrong (bug). SYSTEM: automations labels Jul 2, 2018
@miherlosev
Copy link
Collaborator

Hi @kafeterio

It's a restriction of the current 'Event emulation' subsystem implementation.
Actually, we type via programmatic event creation.
The problem will be fixed once we implement Automations using browser-specific API.

@AndreyBelym AndreyBelym added TYPE: enhancement The accepted proposal for future implementation. and removed TYPE: bug The described behavior is considered as wrong (bug). labels Aug 1, 2018
@AndreyBelym AndreyBelym changed the title checkValidity() not working for minlength Emulate HTML 5 Validation API Aug 1, 2018
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had any activity for a long period. It will be closed and archived if no further activity occurs. However, we may return to this issue in the future. If it still affects you or you have any additional information regarding it, please leave a comment and we will keep it open.

@github-actions github-actions bot added the STATE: Stale An outdated issue that will be automatically closed by the Stale bot. label Nov 26, 2020
@github-actions
Copy link

github-actions bot commented Dec 6, 2020

We're closing this issue after a prolonged period of inactivity. If it still affects you, please create a new issue with up-to-date information. Thank you.

@github-actions github-actions bot closed this as completed Dec 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
STATE: Stale An outdated issue that will be automatically closed by the Stale bot. SYSTEM: automations TYPE: enhancement The accepted proposal for future implementation. TYPE: Web API support
Projects
None yet
Development

No branches or pull requests

3 participants