---
Test
---
This test ensures that we can enter a value for input of type 'date'.

We use a mock server running to serve the HTML defined in this page.


!define HTML { {{{
<html lang="nl-NL">
<body>
<label for="dateField">Datum</label>
<input type="date" id="dateField">
</body>
</html>}}} }


!define HTML2 { {{{
<html>
<body>
<input type="date" id="dateField" name="dateF" value="2017-10-09">
<script type="text/javascript">
    window.onload = function() {
		setTimeout(function() { document.getElementById("dateField").setAttribute("name", "dateField"); }, 2000);
    }
</script>
</body>
</html>}}} }



|script      |mock xml server setup|
|add response|${HTML}              |
|add response|${HTML2}             |
|$url=       |get mock server url  |

|script    |browser test                        |
|open      |$url                                |
|check     |value of  |id=dateField|!--!        |
|enter date|2018-09-27|as          |id=dateField|
|check     |value of  |id=dateField|2018-09-27  |
|enter date|2018-10-01|as          |Datum       |
|check     |value of  |id=dateField|2018-10-01  |
|enter date|2017-01-31|as          |id=dateField|
|check     |value of  |id=dateField|2017-01-31  |

Now check that we wait:
|script    |browser test                          |
|open      |$url                                  |
|enter date|2018-09-08|as          |name=dateField|
|check     |value of  |id=dateField|2018-09-08    |

|script|mock xml server setup|
|stop                        |


