diff options
author | Artur Signell <artur@vaadin.com> | 2013-01-10 19:38:08 +0200 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2013-01-14 14:58:27 +0200 |
commit | d8bb481a75a3b21e2652e94f2343e53e5edfdb3f (patch) | |
tree | db7299dc334c9ce41c8c61d2040473153c1dff57 /uitest | |
parent | 9b2f258bdd7ae0a83d5b08e7a41b3e1c4d34b188 (diff) | |
download | vaadin-framework-d8bb481a75a3b21e2652e94f2343e53e5edfdb3f.tar.gz vaadin-framework-d8bb481a75a3b21e2652e94f2343e53e5edfdb3f.zip |
Test for CustomField required flag (#10656, #8797)
Change-Id: I09e948a60816ab4b8b0fb28d9df7e90f36fbd30f
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/src/com/vaadin/tests/components/AddressFormExample.html | 72 | ||||
-rw-r--r-- | uitest/src/com/vaadin/tests/components/customfield/AddressFormExample.java | 4 |
2 files changed, 76 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/AddressFormExample.html b/uitest/src/com/vaadin/tests/components/AddressFormExample.html new file mode 100644 index 0000000000..5f1893a33c --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/AddressFormExample.html @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head profile="http://selenium-ide.openqa.org/profiles/test-case"> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> +<link rel="selenium.base" href="http://localhost:8888/" /> +<title>New Test</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">New Test</td></tr> +</thead><tbody> +<tr> + <td>open</td> + <td>/run/com.vaadin.tests.components.customfield.AddressFormExample?restartApplication</td> + <td></td> +</tr> +<tr> + <td>assertValue</td> + <td>vaadin=runcomvaadintestscomponentscustomfieldAddressFormExample::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VCustomComponent[0]/VForm[0]/VFormLayout[0]/VFormLayout$VFormLayoutTable[0]/VTextField[0]</td> + <td>Ruukinkatu 2-4</td> +</tr> +<tr> + <td>assertValue</td> + <td>vaadin=runcomvaadintestscomponentscustomfieldAddressFormExample::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VCustomComponent[0]/VForm[0]/VFormLayout[0]/VFormLayout$VFormLayoutTable[0]/VTextField[1]</td> + <td>20,540</td> +</tr> +<tr> + <td>assertValue</td> + <td>vaadin=runcomvaadintestscomponentscustomfieldAddressFormExample::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VCustomComponent[0]/VForm[0]/VFormLayout[0]/VFormLayout$VFormLayoutTable[0]/VTextField[2]</td> + <td>Turku</td> +</tr> +<tr> + <td>assertText</td> + <td>vaadin=runcomvaadintestscomponentscustomfieldAddressFormExample::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[1]/VButton[0]/domChild[0]/domChild[0]</td> + <td>Save</td> +</tr> +<tr> + <td>assertText</td> + <td>vaadin=runcomvaadintestscomponentscustomfieldAddressFormExample::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VCustomComponent[0]/VForm[0]/domChild[0]/domChild[0]/domChild[0]</td> + <td>Address</td> +</tr> +<tr> + <td>assertText</td> + <td>vaadin=runcomvaadintestscomponentscustomfieldAddressFormExample::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VCustomComponent[0]/VForm[0]/VFormLayout[0]/domChild[0]/domChild[1]/domChild[0]/domChild[0]/domChild[0]/domChild[0]</td> + <td>Street Address</td> +</tr> +<tr> + <td>assertText</td> + <td>vaadin=runcomvaadintestscomponentscustomfieldAddressFormExample::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VCustomComponent[0]/VForm[0]/VFormLayout[0]/domChild[0]/domChild[1]/domChild[1]/domChild[0]/domChild[0]/domChild[0]</td> + <td>Postal Code</td> +</tr> +<tr> + <td>assertText</td> + <td>vaadin=runcomvaadintestscomponentscustomfieldAddressFormExample::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VCustomComponent[0]/VForm[0]/VFormLayout[0]/domChild[0]/domChild[1]/domChild[2]/domChild[0]/domChild[0]/domChild[0]</td> + <td>City</td> +</tr> +<tr> + <td>assertText</td> + <td>vaadin=runcomvaadintestscomponentscustomfieldAddressFormExample::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/domChild[0]/domChild[1]/domChild[0]</td> + <td>exact:*</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentscustomfieldAddressFormExample::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/domChild[0]/domChild[1]/domChild[0]</td> + <td>v-required-field-indicator</td> +</tr> + +</tbody></table> +</body> +</html> diff --git a/uitest/src/com/vaadin/tests/components/customfield/AddressFormExample.java b/uitest/src/com/vaadin/tests/components/customfield/AddressFormExample.java index 693b1e11b1..e5ac67b32e 100644 --- a/uitest/src/com/vaadin/tests/components/customfield/AddressFormExample.java +++ b/uitest/src/com/vaadin/tests/components/customfield/AddressFormExample.java @@ -1,5 +1,7 @@ package com.vaadin.tests.components.customfield; +import java.util.Locale; + import com.vaadin.tests.components.TestBase; import com.vaadin.tests.util.Address; import com.vaadin.ui.Button; @@ -14,9 +16,11 @@ public class AddressFormExample extends TestBase { @Override protected void setup() { + getMainWindow().setLocale(Locale.ENGLISH); Address address = new Address("Ruukinkatu 2-4", 20540, "Turku"); final AddressField field = new AddressField(); field.setValue(address); + field.setRequired(true); addComponent(field); |