From c018bce3bd684f186b6391c8dbdd37b9be158e64 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Wed, 5 Oct 2011 11:33:11 +0000 Subject: [PATCH] Made IE7ButtonWithIcon more general and added testing of buttons with all three themes svn changeset:21573/svn branch:6.7 --- .../components/button/Buttons-chameleon.html | 32 ++++++++++++ .../{Buttons.html => Buttons-reindeer.html} | 0 .../tests/components/button/Buttons-runo.html | 32 ++++++++++++ .../button/ButtonsAndIcons-chameleon.html | 32 ++++++++++++ ...con.html => ButtonsAndIcons-reindeer.html} | 4 +- .../button/ButtonsAndIcons-runo.html | 32 ++++++++++++ .../components/button/ButtonsAndIcons.java | 49 +++++++++++++++++++ .../components/button/IE7ButtonWithIcon.java | 27 ---------- 8 files changed, 179 insertions(+), 29 deletions(-) create mode 100644 tests/testbench/com/vaadin/tests/components/button/Buttons-chameleon.html rename tests/testbench/com/vaadin/tests/components/button/{Buttons.html => Buttons-reindeer.html} (100%) create mode 100644 tests/testbench/com/vaadin/tests/components/button/Buttons-runo.html create mode 100644 tests/testbench/com/vaadin/tests/components/button/ButtonsAndIcons-chameleon.html rename tests/testbench/com/vaadin/tests/components/button/{IE7ButtonWithIcon.html => ButtonsAndIcons-reindeer.html} (84%) create mode 100644 tests/testbench/com/vaadin/tests/components/button/ButtonsAndIcons-runo.html create mode 100644 tests/testbench/com/vaadin/tests/components/button/ButtonsAndIcons.java delete mode 100644 tests/testbench/com/vaadin/tests/components/button/IE7ButtonWithIcon.java diff --git a/tests/testbench/com/vaadin/tests/components/button/Buttons-chameleon.html b/tests/testbench/com/vaadin/tests/components/button/Buttons-chameleon.html new file mode 100644 index 0000000000..4830c79bcf --- /dev/null +++ b/tests/testbench/com/vaadin/tests/components/button/Buttons-chameleon.html @@ -0,0 +1,32 @@ + + + + + + +com.vaadin.tests.components.button.Buttons + + + + + + + + + + + + + + + + + + + + + + +
com.vaadin.tests.components.button.Buttons
open/run/com.vaadin.tests.components.button.Buttons?theme=chameleon
waitForVaadin
screenCapture
+ + diff --git a/tests/testbench/com/vaadin/tests/components/button/Buttons.html b/tests/testbench/com/vaadin/tests/components/button/Buttons-reindeer.html similarity index 100% rename from tests/testbench/com/vaadin/tests/components/button/Buttons.html rename to tests/testbench/com/vaadin/tests/components/button/Buttons-reindeer.html diff --git a/tests/testbench/com/vaadin/tests/components/button/Buttons-runo.html b/tests/testbench/com/vaadin/tests/components/button/Buttons-runo.html new file mode 100644 index 0000000000..27779f170b --- /dev/null +++ b/tests/testbench/com/vaadin/tests/components/button/Buttons-runo.html @@ -0,0 +1,32 @@ + + + + + + +com.vaadin.tests.components.button.Buttons + + + + + + + + + + + + + + + + + + + + + + +
com.vaadin.tests.components.button.Buttons
open/run/com.vaadin.tests.components.button.Buttons?theme=runo
waitForVaadin
screenCapture
+ + diff --git a/tests/testbench/com/vaadin/tests/components/button/ButtonsAndIcons-chameleon.html b/tests/testbench/com/vaadin/tests/components/button/ButtonsAndIcons-chameleon.html new file mode 100644 index 0000000000..5425ebb716 --- /dev/null +++ b/tests/testbench/com/vaadin/tests/components/button/ButtonsAndIcons-chameleon.html @@ -0,0 +1,32 @@ + + + + + + +IE7ButtonWithIcon + + + + + + + + + + + + + + + + + + + + + + +
ButtonsAndIcons
open/run/com.vaadin.tests.components.button.ButtonsAndIcons?theme=chameleon
waitForVaadin
screenCapture
+ + diff --git a/tests/testbench/com/vaadin/tests/components/button/IE7ButtonWithIcon.html b/tests/testbench/com/vaadin/tests/components/button/ButtonsAndIcons-reindeer.html similarity index 84% rename from tests/testbench/com/vaadin/tests/components/button/IE7ButtonWithIcon.html rename to tests/testbench/com/vaadin/tests/components/button/ButtonsAndIcons-reindeer.html index a05b439759..6bee11d561 100644 --- a/tests/testbench/com/vaadin/tests/components/button/IE7ButtonWithIcon.html +++ b/tests/testbench/com/vaadin/tests/components/button/ButtonsAndIcons-reindeer.html @@ -9,11 +9,11 @@ - + - + diff --git a/tests/testbench/com/vaadin/tests/components/button/ButtonsAndIcons-runo.html b/tests/testbench/com/vaadin/tests/components/button/ButtonsAndIcons-runo.html new file mode 100644 index 0000000000..8084a58536 --- /dev/null +++ b/tests/testbench/com/vaadin/tests/components/button/ButtonsAndIcons-runo.html @@ -0,0 +1,32 @@ + + + + + + +IE7ButtonWithIcon + + +
IE7ButtonWithIcon
ButtonsAndIcons
open/run/com.vaadin.tests.components.button.IE7ButtonWithIcon/run/com.vaadin.tests.components.button.ButtonsAndIcons
+ + + + + + + + + + + + + + + + + + + +
ButtonsAndIcons
open/run/com.vaadin.tests.components.button.ButtonsAndIcons?theme=runo
waitForVaadin
screenCapture
+ + diff --git a/tests/testbench/com/vaadin/tests/components/button/ButtonsAndIcons.java b/tests/testbench/com/vaadin/tests/components/button/ButtonsAndIcons.java new file mode 100644 index 0000000000..56fc5f208c --- /dev/null +++ b/tests/testbench/com/vaadin/tests/components/button/ButtonsAndIcons.java @@ -0,0 +1,49 @@ +package com.vaadin.tests.components.button; + +import com.vaadin.terminal.ThemeResource; +import com.vaadin.tests.components.TestBase; +import com.vaadin.ui.Button; +import com.vaadin.ui.NativeButton; + +public class ButtonsAndIcons extends TestBase { + + @Override + protected String getDescription() { + return "The first button has text and an icon, the second only text and the third only an icon."; + } + + @Override + protected Integer getTicketNumber() { + return 3031; + } + + @Override + protected void setup() { + Button b = new Button("Text and icon"); + b.setIcon(new ThemeResource("../runo/icons/16/ok.png")); + + addComponent(b); + + b = new Button("Only text"); + + addComponent(b); + b = new Button(null); + b.setIcon(new ThemeResource("../runo/icons/16/ok.png")); + + addComponent(b); + + b = new NativeButton("Text and icon"); + b.setIcon(new ThemeResource("../runo/icons/16/ok.png")); + + addComponent(b); + + b = new NativeButton("Only text"); + + addComponent(b); + b = new NativeButton(null); + b.setIcon(new ThemeResource("../runo/icons/16/ok.png")); + + addComponent(b); + } + +} diff --git a/tests/testbench/com/vaadin/tests/components/button/IE7ButtonWithIcon.java b/tests/testbench/com/vaadin/tests/components/button/IE7ButtonWithIcon.java deleted file mode 100644 index c6a0ae96a9..0000000000 --- a/tests/testbench/com/vaadin/tests/components/button/IE7ButtonWithIcon.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.vaadin.tests.components.button; - -import com.vaadin.terminal.ThemeResource; -import com.vaadin.tests.components.TestBase; -import com.vaadin.ui.Button; - -public class IE7ButtonWithIcon extends TestBase { - - @Override - protected String getDescription() { - return "The button should contain the text \"Normal\" and an 16x16 icon and have padding to the left and the right"; - } - - @Override - protected Integer getTicketNumber() { - return 3031; - } - - @Override - protected void setup() { - Button b = new Button("Normal"); - b.setIcon(new ThemeResource("../runo/icons/16/ok.png")); - - addComponent(b); - } - -} -- 2.39.5