Change-Id: I49287cc38605abb75059cb553e3baed2a8359067tags/7.6.0.alpha2
@@ -1170,16 +1170,16 @@ public abstract class AbstractComponent extends AbstractClientConnector | |||
// first try the full shorthands | |||
if (widthFull && heightFull) { | |||
attributes.put("size-full", "true"); | |||
attributes.put("size-full", ""); | |||
} else if (widthAuto && heightAuto) { | |||
attributes.put("size-auto", "true"); | |||
attributes.put("size-auto", ""); | |||
} else { | |||
// handle width | |||
if (!hasEqualWidth(defaultInstance)) { | |||
if (widthFull) { | |||
attributes.put("width-full", "true"); | |||
attributes.put("width-full", ""); | |||
} else if (widthAuto) { | |||
attributes.put("width-auto", "true"); | |||
attributes.put("width-auto", ""); | |||
} else { | |||
String widthString = DesignAttributeHandler.getFormatter() | |||
.format(getWidth()) + getWidthUnits().getSymbol(); | |||
@@ -1190,9 +1190,9 @@ public abstract class AbstractComponent extends AbstractClientConnector | |||
if (!hasEqualHeight(defaultInstance)) { | |||
// handle height | |||
if (heightFull) { | |||
attributes.put("height-full", "true"); | |||
attributes.put("height-full", ""); | |||
} else if (heightAuto) { | |||
attributes.put("height-auto", "true"); | |||
attributes.put("height-auto", ""); | |||
} else { | |||
String heightString = DesignAttributeHandler.getFormatter() | |||
.format(getHeight()) + getHeightUnits().getSymbol(); |
@@ -94,7 +94,11 @@ public class DesignFormatter implements Serializable { | |||
public String convertToPresentation(Boolean value, | |||
Class<? extends String> targetType, Locale locale) | |||
throws Converter.ConversionException { | |||
return String.valueOf(value.booleanValue()); | |||
if (value.booleanValue()) { | |||
return ""; | |||
} else { | |||
return "false"; | |||
} | |||
} | |||
@Override |
@@ -38,10 +38,10 @@ public class MenuBarDeclarativeTest extends DeclarativeTestBase<MenuBar> { | |||
@Test | |||
// #16328 | |||
public void testReadWrite() throws IOException { | |||
String design = "<v-menu-bar auto-open='true' tabindex=5>" | |||
+ "<menu checkable='true'>Save</menu>" | |||
String design = "<v-menu-bar auto-open='' tabindex=5>" | |||
+ "<menu checkable=''>Save</menu>" | |||
+ "<menu description='Open a file'>Open</menu>" | |||
+ "<menu disabled='true'>Close</menu>" | |||
+ "<menu disabled=''>Close</menu>" | |||
+ "<menu icon='http://foo.bar/ico.png'>Help</menu>" | |||
+ "<menu visible='false'>About</menu>" | |||
+ "<menu>Sub<menu>Item</menu></menu>" | |||
@@ -69,19 +69,19 @@ public class MenuBarDeclarativeTest extends DeclarativeTestBase<MenuBar> { | |||
@Test | |||
// #16328 | |||
public void testTicketSpec1() throws IOException { | |||
String design = "<v-menu-bar auto-open='true' plain-text tabindex=5> " | |||
String design = "<v-menu-bar auto-open='' plain-text tabindex=5> " | |||
+ "<menu>File" | |||
+ "<menu>Save</menu>" | |||
+ "<menu icon=\"theme://../runo/icons/16/folder.png\">Open</menu>" | |||
+ "<menu separator='true' />" | |||
+ "<menu disabled='true'>Exit</menu>" | |||
+ "<menu separator='' />" | |||
+ "<menu disabled=''>Exit</menu>" | |||
+ "<menu visible='false'>Not for everybody</menu>" | |||
+ "</menu>" | |||
+ "<menu description=\"This contains many items in sub menus\">Other" | |||
+ "<menu style-name=\"fancy\">Sub" | |||
+ "<menu checkable='true' checked='true'>Option 1 - no <b>html</b></menu>" | |||
+ "<menu checkable='true'>Option 2</menu>" | |||
+ "<menu checkable='true'>Option 3</menu>" // | |||
+ "<menu checkable='' checked=''>Option 1 - no <b>html</b></menu>" | |||
+ "<menu checkable=''>Option 2</menu>" | |||
+ "<menu checkable=''>Option 3</menu>" // | |||
+ "</menu>" // | |||
+ "</menu>" // | |||
+ "<menu more icon=\"theme://icon.png\">foo</menu>" | |||
@@ -124,8 +124,7 @@ public class MenuBarDeclarativeTest extends DeclarativeTestBase<MenuBar> { | |||
+ "<menu><b>File</b>" | |||
+ "<menu><font style=\"color: red\">Save</font></menu>" | |||
+ "<menu icon=\"theme://../runo/icons/16/folder.png\">Open</menu>" | |||
+ "<menu separator='true' />" | |||
+ "<menu disabled='true'>Exit</menu>" // | |||
+ "<menu separator='' />" + "<menu disabled=''>Exit</menu>" // | |||
+ "</menu></v-menu-bar>"; | |||
MenuBar menuBar = new MenuBar(); | |||
menuBar.setHtmlContentAllowed(true); |
@@ -29,7 +29,7 @@ public class AbstractComponentSetResponsiveTest extends | |||
label.setContentMode(ContentMode.HTML); | |||
label.setResponsive(true); | |||
String design = "<v-label responsive='true' />"; | |||
String design = "<v-label responsive='' />"; | |||
testWrite(design, label); | |||
testRead(design, label); |
@@ -78,7 +78,7 @@ public class DesignFormatterTest { | |||
@Test | |||
public void testBoolean() { | |||
assertEquals("true", formatter.format(true)); | |||
assertEquals("", formatter.format(true)); | |||
assertEquals("false", formatter.format(false)); | |||
assertEquals(true, formatter.parse("true", boolean.class)); |
@@ -52,19 +52,19 @@ public abstract class DeclarativeMarginTestBase<L extends Layout & MarginHandler | |||
String s = "<" + componentTag + " "; | |||
if (left && right && top && bottom) { | |||
s += "margin='true'"; | |||
s += "margin=''"; | |||
} else { | |||
if (left) { | |||
s += "margin-left='true' "; | |||
s += "margin-left='' "; | |||
} | |||
if (right) { | |||
s += "margin-right='true' "; | |||
s += "margin-right='' "; | |||
} | |||
if (top) { | |||
s += "margin-top='true' "; | |||
s += "margin-top='' "; | |||
} | |||
if (bottom) { | |||
s += "margin-bottom='true' "; | |||
s += "margin-bottom='' "; | |||
} | |||
} | |||
return s + " />"; |
@@ -71,7 +71,7 @@ public class AbstractComponentDeclarativeTest extends | |||
public void testProperties() { | |||
String design = "<v-label id=\"testId\" primary-style-name=\"test-style\" " | |||
+ "caption=\"test-caption\" locale=\"fi_FI\" description=\"test-description\" " | |||
+ "error=\"<div>test-error</div>\" immediate=\"true\"/>"; | |||
+ "error=\"<div>test-error</div>\" immediate=\"\"/>"; | |||
component.setId("testId"); | |||
component.setPrimaryStyleName("test-style"); | |||
component.setCaption("test-caption"); | |||
@@ -139,7 +139,7 @@ public class AbstractComponentDeclarativeTest extends | |||
@Test | |||
public void testSizeFull() { | |||
String design = "<v-label size-full=\"true\"/>"; | |||
String design = "<v-label size-full=\"\"/>"; | |||
component.setSizeFull(); | |||
testRead(design, component); | |||
testWrite(design, component); | |||
@@ -147,7 +147,7 @@ public class AbstractComponentDeclarativeTest extends | |||
@Test | |||
public void testSizeAuto() { | |||
String design = "<v-label size-auto=\"true\"/>"; | |||
String design = "<v-label size-auto=\"\"/>"; | |||
component.setSizeUndefined(); | |||
testRead(design, component); | |||
testWrite(design, component); | |||
@@ -155,7 +155,7 @@ public class AbstractComponentDeclarativeTest extends | |||
@Test | |||
public void testHeightFull() { | |||
String design = "<v-label height-full=\"true\"/ width=\"20px\"/>"; | |||
String design = "<v-label height-full=\"\"/ width=\"20px\"/>"; | |||
component.setHeight("100%"); | |||
component.setWidth("20px"); | |||
testRead(design, component); | |||
@@ -164,7 +164,7 @@ public class AbstractComponentDeclarativeTest extends | |||
@Test | |||
public void testHeightAuto() { | |||
String design = "<v-horizontal-split-panel height-auto=\"true\"/ width=\"20px\" >"; | |||
String design = "<v-horizontal-split-panel height-auto=\"\"/ width=\"20px\" >"; | |||
// we need to have default height of 100% -> use split panel | |||
AbstractComponent component = new HorizontalSplitPanel(); | |||
component.setHeight(null); | |||
@@ -175,7 +175,7 @@ public class AbstractComponentDeclarativeTest extends | |||
@Test | |||
public void testWidthFull() { | |||
String design = "<v-button width-full=\"true\"/ height=\"20px\">Foo</button>"; | |||
String design = "<v-button width-full=\"\"/ height=\"20px\">Foo</button>"; | |||
AbstractComponent component = new Button(); | |||
component.setCaptionAsHtml(true); | |||
component.setCaption("Foo"); | |||
@@ -187,7 +187,7 @@ public class AbstractComponentDeclarativeTest extends | |||
@Test | |||
public void testWidthAuto() { | |||
String design = "<v-label height=\"20px\"/ width-auto=\"true\"/>"; | |||
String design = "<v-label height=\"20px\"/ width-auto=\"\"/>"; | |||
component.setCaptionAsHtml(false); | |||
component.setHeight("20px"); | |||
component.setWidth(null); | |||
@@ -197,7 +197,7 @@ public class AbstractComponentDeclarativeTest extends | |||
@Test | |||
public void testResponsive() { | |||
String design = "<v-label responsive =\"true\"/>"; | |||
String design = "<v-label responsive =\"\"/>"; | |||
Responsive.makeResponsive(component); | |||
testRead(design, component); | |||
testWrite(design, component); |
@@ -33,9 +33,9 @@ public class AbstractFieldDeclarativeTest extends | |||
@Test | |||
public void testPlainText() { | |||
String design = "<v-text-field buffered='true' validation-visible='false' invalid-committed='true'" | |||
+ " invalid-allowed='false' required='true' required-error='This is a required field'" | |||
+ " conversion-error='Input {0} cannot be parsed' tabindex=3 readonly='true'/>"; | |||
String design = "<v-text-field buffered='' validation-visible='false' invalid-committed=''" | |||
+ " invalid-allowed='false' required='' required-error='This is a required field'" | |||
+ " conversion-error='Input {0} cannot be parsed' tabindex=3 readonly=''/>"; | |||
AbstractField tf = new TextField(); | |||
tf.setBuffered(true); | |||
tf.setBuffered(true); | |||
@@ -51,7 +51,7 @@ public class AbstractFieldDeclarativeTest extends | |||
testWrite(design, tf); | |||
// Test with readonly=false | |||
design = design.replace("readonly='true'", ""); | |||
design = design.replace("readonly=''", ""); | |||
tf.setReadOnly(false); | |||
testRead(design, tf); | |||
testWrite(design, tf); |
@@ -42,7 +42,7 @@ public class AbstractSelectDeclarativeTest extends | |||
DeclarativeTestBase<AbstractSelect> { | |||
public String getDesignSingleSelectNewItemsAllowed() { | |||
return "<v-combo-box new-items-allowed='true' item-caption-mode='icon_only'" | |||
return "<v-combo-box new-items-allowed='' item-caption-mode='icon_only'" | |||
+ " null-selection-item-id='nullIid'/>"; | |||
} | |||
@@ -57,7 +57,7 @@ public class AbstractSelectDeclarativeTest extends | |||
} | |||
public String getDesignMultiSelect() { | |||
return "<v-list-select multi-select='true' null-selection-allowed='false' new-items-allowed='true' item-caption-mode='property' />"; | |||
return "<v-list-select multi-select='' null-selection-allowed='false' new-items-allowed='' item-caption-mode='property' />"; | |||
} | |||
public AbstractSelect getExpectedMultiSelect() { | |||
@@ -210,7 +210,7 @@ public class AbstractSelectDeclarativeTest extends | |||
attributes.put("item-caption-mode", "property"); | |||
attributes.put("item-caption-property-id", "name"); | |||
attributes.put("item-icon-property-id", "icon"); | |||
attributes.put("null-selection-allowed", "true"); | |||
attributes.put("null-selection-allowed", ""); | |||
attributes.put("null-selection-item-id", "No items selected"); | |||
return new Element(Tag.valueOf("v-combo-box"), "", attributes); | |||
} | |||
@@ -231,7 +231,7 @@ public class AbstractSelectDeclarativeTest extends | |||
assertEquals("Wrong caption for the combo box.", "A combo box", | |||
e.attr("caption")); | |||
Assert.assertTrue("Adding new items should be allowed.", | |||
"true".equals(e.attr("new-items-allowed"))); | |||
"".equals(e.attr("new-items-allowed"))); | |||
assertEquals("Wrong item caption mode.", "icon_only", | |||
e.attr("item-caption-mode")); | |||
assertEquals("Wrong item icon property id.", "icon", |
@@ -111,7 +111,7 @@ public class OptionGroupDeclarativeTests extends | |||
//@formatter:off | |||
String expected = | |||
"<v-option-group html-content-allowed='true'>" | |||
"<v-option-group html-content-allowed=''>" | |||
+ "<option item-id=\"foo\"><b>True</b></option>" | |||
+ "<option item-id=\"bar\"><font color='red'>False</font></option>" | |||
+ "<option>baz</option>" |
@@ -38,7 +38,7 @@ public class AbstractSplitPanelDeclarativeTest extends | |||
@Test | |||
public void testWithBothChildren() { | |||
String design = "<v-horizontal-split-panel split-position=20.5% " | |||
+ "min-split-position=20% max-split-position=50px locked=true " | |||
+ "min-split-position=20% max-split-position=50px locked='' " | |||
+ "reversed=\"\"> <v-table /> <v-vertical-layout />" | |||
+ "</v-horizontal-split-panel>"; | |||
AbstractSplitPanel sp = new HorizontalSplitPanel(); |
@@ -34,7 +34,7 @@ public class AbstractTextFieldDeclarativeTest extends | |||
@Test | |||
public void testAttributes() { | |||
String design = "<v-text-field null-representation=this-is-null " | |||
+ "null-setting-allowed=true maxlength=5 columns=3 " | |||
+ "null-setting-allowed='' maxlength=5 columns=3 " | |||
+ "input-prompt=input text-change-event-mode=eager " | |||
+ "text-change-timeout=100 />"; | |||
AbstractTextField tf = new TextField(); |
@@ -43,7 +43,7 @@ public class AudioDeclarativeTest extends DeclarativeTestBase<Audio> { | |||
@Test | |||
public void testAudioMultipleSources() { | |||
String design = "<v-audio muted='true' show-controls='false'>" | |||
String design = "<v-audio muted='' show-controls='false'>" | |||
+ "some <b>text</b>" // | |||
+ "<source href='http://foo.pl' />" | |||
+ "<source href='https://bar.pl' />" // |
@@ -36,7 +36,7 @@ public class VideoDeclarativeTest extends DeclarativeTestBase<Video> { | |||
@Test | |||
public void testVideoMultipleSources() { | |||
String design = "<v-video muted='true' show-controls='false'>" | |||
String design = "<v-video muted='' show-controls='false'>" | |||
+ "some <b>text</b>" // | |||
+ "<source href='http://foo.pl' />" | |||
+ "<source href='https://bar.pl' />" // |
@@ -38,7 +38,7 @@ public class CheckboxDeclarativeTest extends DeclarativeTestBase<CheckBox> { | |||
@Test | |||
public void testUnchecked() { | |||
String design = "<v-check-box checked='true' />"; | |||
String design = "<v-check-box checked='' />"; | |||
CheckBox checkBox = new CheckBox(); | |||
checkBox.setValue(true); | |||
testRead(design, checkBox); |
@@ -29,7 +29,7 @@ public class AbstractColorPickerDeclarativeTest extends | |||
@Test | |||
public void testAllAbstractColorPickerFeatures() { | |||
String design = "<v-color-picker color='#fafafa' default-caption-enabled='true' position='100,100'" | |||
String design = "<v-color-picker color='#fafafa' default-caption-enabled='' position='100,100'" | |||
+ " popup-style='simple' rgb-visibility='false' hsv-visibility='false'" | |||
+ " history-visibility=false textfield-visibility=false />"; | |||
ColorPicker colorPicker = new ColorPicker(); | |||
@@ -58,7 +58,7 @@ public class AbstractColorPickerDeclarativeTest extends | |||
@Test | |||
public void testAllAbstractColorPickerAreaFeatures() { | |||
String design = "<v-color-picker-area color='#fafafa' default-caption-enabled='true' position='100,100'" | |||
String design = "<v-color-picker-area color='#fafafa' default-caption-enabled='' position='100,100'" | |||
+ " popup-style='simple' rgb-visibility='false' hsv-visibility='false'" | |||
+ " history-visibility=false textfield-visibility=false />"; | |||
AbstractColorPicker colorPicker = new ColorPickerArea(); |
@@ -44,7 +44,7 @@ public class DateFieldDeclarativeTest extends DeclarativeTestBase<DateField> { | |||
} | |||
private String getTimezoneDesign() { | |||
return "<v-date-field range-start=\"2014-05-05 00:00:00+0300\" range-end=\"2014-06-05 00:00:00+0300\" date-out-of-range-message=\"Please select a sensible date\" date-format=\"yyyy-MM-dd\" lenient='true' show-iso-week-numbers='true' parse-error-message=\"You are doing it wrong\" time-zone=\"GMT+05:00\" value=\"2014-05-15 00:00:00+0300\"/>"; | |||
return "<v-date-field range-start=\"2014-05-05 00:00:00+0300\" range-end=\"2014-06-05 00:00:00+0300\" date-out-of-range-message=\"Please select a sensible date\" date-format=\"yyyy-MM-dd\" lenient='' show-iso-week-numbers='' parse-error-message=\"You are doing it wrong\" time-zone=\"GMT+05:00\" value=\"2014-05-15 00:00:00+0300\"/>"; | |||
} | |||
private DateField getTimezoneExpected() { |
@@ -25,11 +25,11 @@ public class GridColumnDeclarativeTest extends GridDeclarativeTestBase { | |||
public void testSimpleGridColumns() { | |||
String design = "<v-grid><table>"// | |||
+ "<colgroup>" | |||
+ " <col sortable=true width='100' property-id='Column1'>" | |||
+ " <col sortable='' width='100' property-id='Column1'>" | |||
+ " <col sortable=false max-width='200' expand='2' property-id='Column2'>" | |||
+ " <col sortable=true editable=false min-width='15' expand='1' property-id='Column3'>" | |||
+ " <col sortable=true hidable=true hiding-toggle-caption='col 4' property-id='Column4'>" | |||
+ " <col sortable=true hidden=true property-id='Column5'>" | |||
+ " <col sortable='' editable=false min-width='15' expand='1' property-id='Column3'>" | |||
+ " <col sortable='' hidable='' hiding-toggle-caption='col 4' property-id='Column4'>" | |||
+ " <col sortable='' hidden='' property-id='Column5'>" | |||
+ "</colgroup>" // | |||
+ "<thead />" // | |||
+ "</table></v-grid>"; |
@@ -37,8 +37,8 @@ public class GridDeclarativeAttributeTest extends DeclarativeTestBase<Grid> { | |||
@Test | |||
public void testBasicAttributes() { | |||
String design = "<v-grid editable='true' rows=20 frozen-columns=-1 " | |||
+ "editor-save-caption='Tallenna' editor-cancel-caption='Peruuta' column-reordering-allowed=true>"; | |||
String design = "<v-grid editable='' rows=20 frozen-columns=-1 " | |||
+ "editor-save-caption='Tallenna' editor-cancel-caption='Peruuta' column-reordering-allowed=''>"; | |||
Grid grid = new Grid(); | |||
grid.setEditorEnabled(true); |
@@ -30,12 +30,12 @@ public class GridHeaderFooterDeclarativeTest extends GridDeclarativeTestBase { | |||
public void testSingleDefaultHeader() { | |||
String design = "<v-grid><table>"// | |||
+ "<colgroup>" | |||
+ " <col sortable=true property-id='Column1'>" | |||
+ " <col sortable=true property-id='Column2'>" | |||
+ " <col sortable=true property-id='Column3'>" | |||
+ " <col sortable='' property-id='Column1'>" | |||
+ " <col sortable='' property-id='Column2'>" | |||
+ " <col sortable='' property-id='Column3'>" | |||
+ "</colgroup>" // | |||
+ "<thead>" // | |||
+ " <tr default='true'><th plain-text=''>Column1<th plain-text=''>Column2<th plain-text=''>Column3</tr>" // | |||
+ " <tr default=''><th plain-text=''>Column1<th plain-text=''>Column2<th plain-text=''>Column3</tr>" // | |||
+ "</thead>" // | |||
+ "</table></v-grid>"; | |||
Grid grid = new Grid(); | |||
@@ -51,12 +51,11 @@ public class GridHeaderFooterDeclarativeTest extends GridDeclarativeTestBase { | |||
public void testSingleDefaultHTMLHeader() { | |||
String design = "<v-grid><table>"// | |||
+ "<colgroup>" | |||
+ " <col sortable=true property-id='Column1'>" | |||
+ " <col sortable=true property-id='Column2'>" | |||
+ " <col sortable=true property-id='Column3'>" | |||
+ "</colgroup>" // | |||
+ " <col sortable='' property-id='Column1'>" | |||
+ " <col sortable='' property-id='Column2'>" | |||
+ " <col sortable='' property-id='Column3'>" + "</colgroup>" // | |||
+ "<thead>" // | |||
+ " <tr default='true'><th>Column1<th>Column2<th>Column3</tr>" // | |||
+ " <tr default=''><th>Column1<th>Column2<th>Column3</tr>" // | |||
+ "</thead>" // | |||
+ "</table></v-grid>"; | |||
Grid grid = new Grid(); | |||
@@ -77,7 +76,7 @@ public class GridHeaderFooterDeclarativeTest extends GridDeclarativeTestBase { | |||
public void testNoHeaderRows() { | |||
String design = "<v-grid><table>"// | |||
+ "<colgroup>" | |||
+ " <col sortable=true property-id='Column1'>" | |||
+ " <col sortable='' property-id='Column1'>" | |||
+ "</colgroup>" // | |||
+ "<thead />" // | |||
+ "</table></v-grid>"; | |||
@@ -94,13 +93,13 @@ public class GridHeaderFooterDeclarativeTest extends GridDeclarativeTestBase { | |||
public void testMultipleHeadersWithColSpans() { | |||
String design = "<v-grid><table>"// | |||
+ "<colgroup>" | |||
+ " <col sortable=true property-id='Column1'>" | |||
+ " <col sortable=true property-id='Column2'>" | |||
+ " <col sortable=true property-id='Column3'>" | |||
+ " <col sortable='' property-id='Column1'>" | |||
+ " <col sortable='' property-id='Column2'>" | |||
+ " <col sortable='' property-id='Column3'>" | |||
+ "</colgroup>" // | |||
+ "<thead>" // | |||
+ " <tr><th colspan=3>Baz</tr>" | |||
+ " <tr default='true'><th>Column1<th>Column2<th>Column3</tr>" // | |||
+ " <tr default=''><th>Column1<th>Column2<th>Column3</tr>" // | |||
+ " <tr><th>Foo<th colspan=2>Bar</tr>" // | |||
+ "</thead>" // | |||
+ "</table></v-grid>"; | |||
@@ -128,9 +127,9 @@ public class GridHeaderFooterDeclarativeTest extends GridDeclarativeTestBase { | |||
public void testSingleDefaultFooter() { | |||
String design = "<v-grid><table>"// | |||
+ "<colgroup>" | |||
+ " <col sortable=true property-id='Column1'>" | |||
+ " <col sortable=true property-id='Column2'>" | |||
+ " <col sortable=true property-id='Column3'>" | |||
+ " <col sortable='' property-id='Column1'>" | |||
+ " <col sortable='' property-id='Column2'>" | |||
+ " <col sortable='' property-id='Column3'>" | |||
+ "</colgroup>" // | |||
+ "<thead />" // No headers read or written | |||
+ "<tfoot>" // | |||
@@ -157,10 +156,9 @@ public class GridHeaderFooterDeclarativeTest extends GridDeclarativeTestBase { | |||
public void testSingleDefaultHTMLFooter() { | |||
String design = "<v-grid><table>"// | |||
+ "<colgroup>" | |||
+ " <col sortable=true property-id='Column1'>" | |||
+ " <col sortable=true property-id='Column2'>" | |||
+ " <col sortable=true property-id='Column3'>" | |||
+ "</colgroup>" // | |||
+ " <col sortable='' property-id='Column1'>" | |||
+ " <col sortable='' property-id='Column2'>" | |||
+ " <col sortable='' property-id='Column3'>" + "</colgroup>" // | |||
+ "<thead />" // No headers read or written | |||
+ "<tfoot>" // | |||
+ " <tr><td>Column1<td>Column2<td>Column3</tr>" // | |||
@@ -186,9 +184,9 @@ public class GridHeaderFooterDeclarativeTest extends GridDeclarativeTestBase { | |||
public void testMultipleFootersWithColSpans() { | |||
String design = "<v-grid><table>"// | |||
+ "<colgroup>" | |||
+ " <col sortable=true property-id='Column1'>" | |||
+ " <col sortable=true property-id='Column2'>" | |||
+ " <col sortable=true property-id='Column3'>" | |||
+ " <col sortable='' property-id='Column1'>" | |||
+ " <col sortable='' property-id='Column2'>" | |||
+ " <col sortable='' property-id='Column3'>" | |||
+ "</colgroup>" // | |||
+ "<thead />" // No headers read or written. | |||
+ "<tfoot>" // | |||
@@ -223,10 +221,10 @@ public class GridHeaderFooterDeclarativeTest extends GridDeclarativeTestBase { | |||
public void testComponentInGridHeader() { | |||
String design = "<v-grid><table>"// | |||
+ "<colgroup>" | |||
+ " <col sortable=true property-id='Column1'>" | |||
+ " <col sortable='' property-id='Column1'>" | |||
+ "</colgroup>" // | |||
+ "<thead>" // | |||
+ "<tr default=true><th><v-label><b>Foo</b></v-label></tr>" | |||
+ "<tr default=''><th><v-label><b>Foo</b></v-label></tr>" | |||
+ "</thead>"// | |||
+ "</table></v-grid>"; | |||
@@ -245,7 +243,7 @@ public class GridHeaderFooterDeclarativeTest extends GridDeclarativeTestBase { | |||
public void testComponentInGridFooter() { | |||
String design = "<v-grid><table>"// | |||
+ "<colgroup>" | |||
+ " <col sortable=true property-id='Column1'>" | |||
+ " <col sortable='' property-id='Column1'>" | |||
+ "</colgroup>" // | |||
+ "<thead />" // No headers read or written | |||
+ "<tfoot>" // |
@@ -25,7 +25,7 @@ public class GridInlineDataDeclarativeTest extends GridDeclarativeTestBase { | |||
public void testSimpleInlineData() { | |||
String design = "<v-grid><table>"// | |||
+ "<colgroup>" | |||
+ " <col sortable=true property-id='Col1' />" | |||
+ " <col sortable='' property-id='Col1' />" | |||
+ "</colgroup>" // | |||
+ "<thead />" // No headers read or written | |||
+ "<tbody>" // | |||
@@ -51,9 +51,9 @@ public class GridInlineDataDeclarativeTest extends GridDeclarativeTestBase { | |||
public void testMultipleColumnsInlineData() { | |||
String design = "<v-grid><table>"// | |||
+ "<colgroup>" | |||
+ " <col sortable=true property-id='Col1' />" | |||
+ " <col sortable=true property-id='Col2' />" | |||
+ " <col sortable=true property-id='Col3' />" // | |||
+ " <col sortable='' property-id='Col1' />" | |||
+ " <col sortable='' property-id='Col2' />" | |||
+ " <col sortable='' property-id='Col3' />" // | |||
+ "</colgroup>" // | |||
+ "<thead />" // No headers read or written | |||
+ "<tbody>" // | |||
@@ -79,9 +79,9 @@ public class GridInlineDataDeclarativeTest extends GridDeclarativeTestBase { | |||
public void testMultipleColumnsInlineDataReordered() { | |||
String design = "<v-grid><table>"// | |||
+ "<colgroup>" | |||
+ " <col sortable=true property-id='Col2' />" | |||
+ " <col sortable=true property-id='Col3' />" | |||
+ " <col sortable=true property-id='Col1' />" // | |||
+ " <col sortable='' property-id='Col2' />" | |||
+ " <col sortable='' property-id='Col3' />" | |||
+ " <col sortable='' property-id='Col1' />" // | |||
+ "</colgroup>" // | |||
+ "<thead />" // No headers read or written | |||
+ "<tbody>" // |
@@ -48,7 +48,7 @@ public class PopupViewDeclarativeTest extends DeclarativeTestBase<PopupView> { | |||
component.setHideOnMouseOut(true); | |||
component.setPopupVisible(true); | |||
// hide-on-mouse-out is true by default. not seen in design | |||
String design = "<v-popup-view popup-visible='true'>" // | |||
String design = "<v-popup-view popup-visible=''>" // | |||
+ "Click <u>here</u> to open" | |||
+ "<popup-content>" | |||
+ new DesignContext().createElement(verticalLayout) |
@@ -29,7 +29,7 @@ public class ProgressBarDeclarativeTest extends | |||
DeclarativeTestBase<ProgressBar> { | |||
public String getBasicDesign() { | |||
return "<v-progress-bar value=0.5 indeterminate='true'>"; | |||
return "<v-progress-bar value=0.5 indeterminate=''>"; | |||
} | |||
@@ -24,7 +24,7 @@ public class RichTextAreaDeclarativeTest extends | |||
DeclarativeTestBase<RichTextArea> { | |||
private String getBasicDesign() { | |||
return "<v-rich-text-area null-representation='' null-setting-allowed='true'>\n" | |||
return "<v-rich-text-area null-representation='' null-setting-allowed=''>\n" | |||
+ "\n <b>Header</b> <br/>Some text\n " | |||
+ "</v-rich-text-area>"; | |||
} |
@@ -38,10 +38,10 @@ public class TableDeclarativeTest extends TableDeclarativeTestBase { | |||
String design = "<" | |||
+ getTag() | |||
+ " page-length=30 cache-rate=3 selectable=true editable=true " | |||
+ " page-length=30 cache-rate=3 selectable='' editable='' " | |||
+ "sortable=false sort-ascending=false sort-container-property-id=foo " | |||
+ "drag-mode=row multi-select-mode=simple column-header-mode=id row-header-mode=id " | |||
+ "column-reordering-allowed=true column-collapsing-allowed=true />"; | |||
+ "column-reordering-allowed='' column-collapsing-allowed='' />"; | |||
Table table = getTable(); | |||
table.setPageLength(30); | |||
@@ -69,12 +69,12 @@ public class TableDeclarativeTest extends TableDeclarativeTestBase { | |||
public void testColumns() { | |||
String design = "<" | |||
+ getTag() | |||
+ " column-collapsing-allowed=true>" // | |||
+ " column-collapsing-allowed=''>" // | |||
+ " <table>" // | |||
+ " <colgroup>" | |||
+ " <col property-id='foo' width=300>" | |||
+ " <col property-id='bar' center expand=1 collapsible=false>" | |||
+ " <col property-id='baz' right expand=2 collapsed=true>" | |||
+ " <col property-id='baz' right expand=2 collapsed=''>" | |||
+ " </colgroup>" // | |||
+ " </table>"; | |||
@@ -36,7 +36,7 @@ public class TabSheetDeclarativeTest extends DeclarativeTestBase<TabSheet> { | |||
@Test | |||
public void testFeatures() { | |||
String design = "<v-tab-sheet tabindex=5><tab caption=test-caption " | |||
+ "visible=false closable=true enabled=false icon=http://www.vaadin.com/test.png" | |||
+ "visible=false closable='' enabled=false icon=http://www.vaadin.com/test.png" | |||
+ " icon-alt=OK description=test-desc style-name=test-style " | |||
+ "id=test-id><v-text-field/></tab></v-tab-sheet>"; | |||
TabSheet ts = new TabSheet(); | |||
@@ -59,7 +59,7 @@ public class TabSheetDeclarativeTest extends DeclarativeTestBase<TabSheet> { | |||
@Test | |||
public void testSelected() { | |||
String design = "<v-tab-sheet><tab selected=true><v-text-field/></tab></v-tab-sheet>"; | |||
String design = "<v-tab-sheet><tab selected=''><v-text-field/></tab></v-tab-sheet>"; | |||
TabSheet ts = new TabSheet(); | |||
TextField tf = new TextField(); | |||
ts.addTab(tf); | |||
@@ -71,7 +71,7 @@ public class TabSheetDeclarativeTest extends DeclarativeTestBase<TabSheet> { | |||
@Test | |||
public void tabsNotShown() { | |||
String design = "<v-tab-sheet tabs-visible=\"false\">\n" | |||
+ " <tab caption=\"My Tab\" selected=\"true\">\n" | |||
+ " <tab caption=\"My Tab\" selected=\"\">\n" | |||
+ " <v-label>My Content</v-label>\n" + " </tab>\n" | |||
+ "</v-tab-sheet>\n"; | |||
TabSheet ts = new TabSheet(); | |||
@@ -84,4 +84,4 @@ public class TabSheetDeclarativeTest extends DeclarativeTestBase<TabSheet> { | |||
testWrite(design, ts); | |||
} | |||
} | |||
} |
@@ -33,7 +33,7 @@ public class TreeTableDeclarativeTest extends TableDeclarativeTest { | |||
@Test | |||
public void testAttributes() { | |||
String design = "<v-tree-table animations-enabled=true>"; | |||
String design = "<v-tree-table animations-enabled=''>"; | |||
TreeTable table = getTable(); | |||
table.setAnimationsEnabled(true); | |||
@@ -50,10 +50,10 @@ public class WindowDeclarativeTest extends DeclarativeTestBase<Window> { | |||
public void testFeatures() { | |||
String design = "<v-window position='100,100' window-mode='maximized' " | |||
+ "center modal=true resizable=false resize-lazy=true closable=false draggable=false " | |||
+ "center modal='' resizable=false resize-lazy='' closable=false draggable=false " | |||
+ "close-shortcut='ctrl-alt-escape' " | |||
+ "assistive-prefix='Hello' assistive-postfix='World' assistive-role='alertdialog' " | |||
+ "tab-stop-enabled=true " | |||
+ "tab-stop-enabled='' " | |||
+ "tab-stop-top-assistive-text='Do not move above the window' " | |||
+ "tab-stop-bottom-assistive-text='End of window'>" | |||
+ "</v-window>"; |