aboutsummaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorJonatan Kronqvist <jonatan@vaadin.com>2014-04-08 15:02:58 +0300
committerJonatan Kronqvist <jonatan@vaadin.com>2014-04-14 11:43:18 +0300
commitd2e24feb09ccba7f3a2f253687488774af2bc340 (patch)
treef66161d98c5c1638741569c45712a6f06e7fd756 /uitest
parent51c2e93172b0132ead54573c74117efac29c1cec (diff)
downloadvaadin-framework-d2e24feb09ccba7f3a2f253687488774af2bc340.tar.gz
vaadin-framework-d2e24feb09ccba7f3a2f253687488774af2bc340.zip
Update some APIs based on the 7.2 API review comments
* NotificationConfiguration "helpers" removed from Notification * NotificationConfiguration methods accept Type instead of style (String) * Tab.setIconAltText -> Tab.setIconAlternateText * Remove the two new TabSheet.addTab() methods * UI.reinit() -> UI.refresh() Change-Id: I97488e7c6de8cfacc591450d69c821b2973b8707
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/com/vaadin/tests/components/notification/NotificationsWaiAria.java19
-rw-r--r--uitest/src/com/vaadin/tests/components/tabsheet/TabSheetIcons.java2
-rw-r--r--uitest/src/com/vaadin/tests/components/ui/UIRefresh.java (renamed from uitest/src/com/vaadin/tests/components/ui/UIReinit.java)4
-rw-r--r--uitest/src/com/vaadin/tests/components/ui/UIRefreshTest.java (renamed from uitest/src/com/vaadin/tests/components/ui/UIReinitTest.java)8
-rw-r--r--uitest/src/com/vaadin/tests/components/window/ExtraWindowShownWaiAria.java2
5 files changed, 20 insertions, 15 deletions
diff --git a/uitest/src/com/vaadin/tests/components/notification/NotificationsWaiAria.java b/uitest/src/com/vaadin/tests/components/notification/NotificationsWaiAria.java
index 27af49a397..ecf704835f 100644
--- a/uitest/src/com/vaadin/tests/components/notification/NotificationsWaiAria.java
+++ b/uitest/src/com/vaadin/tests/components/notification/NotificationsWaiAria.java
@@ -2,7 +2,7 @@ package com.vaadin.tests.components.notification;
import com.vaadin.data.Item;
import com.vaadin.server.Page;
-import com.vaadin.shared.ui.ui.NotificationConfigurationBean.Role;
+import com.vaadin.shared.ui.ui.NotificationRole;
import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
@@ -11,8 +11,10 @@ import com.vaadin.ui.ComboBox;
import com.vaadin.ui.NativeSelect;
import com.vaadin.ui.Notification;
import com.vaadin.ui.Notification.Type;
+import com.vaadin.ui.NotificationConfiguration;
import com.vaadin.ui.TextArea;
import com.vaadin.ui.TextField;
+import com.vaadin.ui.UI;
public class NotificationsWaiAria extends TestBase {
@@ -36,9 +38,9 @@ public class NotificationsWaiAria extends TestBase {
" - closes automatically after 10 seconds");
addComponent(postfix);
- role = new NativeSelect("Role");
- role.addItem(Role.ALERT);
- role.addItem(Role.STATUS);
+ role = new NativeSelect("NotificationRole");
+ role.addItem(NotificationRole.ALERT);
+ role.addItem(NotificationRole.STATUS);
role.setValue(role.getItemIds().iterator().next());
addComponent(role);
@@ -96,9 +98,12 @@ public class NotificationsWaiAria extends TestBase {
Notification n = new Notification(tf.getValue(), typeValue);
n.setHtmlContentAllowed(true);
- n.setAssistivePrefixForType(typeValue, prefix.getValue());
- n.setAssistivePostfixForType(typeValue, postfix.getValue());
- n.setAssistiveRoleForType(typeValue, (Role) role.getValue());
+ NotificationConfiguration notificationConf = UI.getCurrent()
+ .getNotificationConfiguration();
+ notificationConf.setAssistivePrefix(typeValue, prefix.getValue());
+ notificationConf.setAssistivePostfix(typeValue, postfix.getValue());
+ notificationConf
+ .setAssistiveRole(typeValue, (NotificationRole) role.getValue());
n.show(Page.getCurrent());
}
diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/TabSheetIcons.java b/uitest/src/com/vaadin/tests/components/tabsheet/TabSheetIcons.java
index ccdc4ecb38..c5e01969a1 100644
--- a/uitest/src/com/vaadin/tests/components/tabsheet/TabSheetIcons.java
+++ b/uitest/src/com/vaadin/tests/components/tabsheet/TabSheetIcons.java
@@ -46,7 +46,7 @@ public class TabSheetIcons extends TestBase {
for (Component c : tab) {
tabsheet.addTab(c);
- tabsheet.getTab(c).setIconAltText(
+ tabsheet.getTab(c).setIconAlternateText(
"iconalt" + tabsheet.getComponentCount());
}
diff --git a/uitest/src/com/vaadin/tests/components/ui/UIReinit.java b/uitest/src/com/vaadin/tests/components/ui/UIRefresh.java
index bef7a5a6d1..b61e32c984 100644
--- a/uitest/src/com/vaadin/tests/components/ui/UIReinit.java
+++ b/uitest/src/com/vaadin/tests/components/ui/UIRefresh.java
@@ -22,7 +22,7 @@ import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.ui.Label;
@PreserveOnRefresh
-public class UIReinit extends AbstractTestUI {
+public class UIRefresh extends AbstractTestUI {
public static final String REINIT_ID = "reinit";
@@ -31,7 +31,7 @@ public class UIReinit extends AbstractTestUI {
}
@Override
- protected void reinit(VaadinRequest request) {
+ protected void refresh(VaadinRequest request) {
Label l = new Label("Reinit!");
l.setId(REINIT_ID);
addComponent(l);
diff --git a/uitest/src/com/vaadin/tests/components/ui/UIReinitTest.java b/uitest/src/com/vaadin/tests/components/ui/UIRefreshTest.java
index 82132d3c65..974c4bfe5a 100644
--- a/uitest/src/com/vaadin/tests/components/ui/UIReinitTest.java
+++ b/uitest/src/com/vaadin/tests/components/ui/UIRefreshTest.java
@@ -22,18 +22,18 @@ import org.junit.Test;
import com.vaadin.testbench.By;
import com.vaadin.tests.tb3.MultiBrowserTest;
-public class UIReinitTest extends MultiBrowserTest {
+public class UIRefreshTest extends MultiBrowserTest {
@Test
- public void testUIReinit() {
+ public void testUIRefresh() {
openTestURL();
Assert.assertFalse(reinitLabelExists());
- // Reload the page; UI.reinit should be invoked
+ // Reload the page; UI.refresh should be invoked
openTestURL();
Assert.assertTrue(reinitLabelExists());
}
private boolean reinitLabelExists() {
- return !getDriver().findElements(By.id(UIReinit.REINIT_ID)).isEmpty();
+ return !getDriver().findElements(By.id(UIRefresh.REINIT_ID)).isEmpty();
}
}
diff --git a/uitest/src/com/vaadin/tests/components/window/ExtraWindowShownWaiAria.java b/uitest/src/com/vaadin/tests/components/window/ExtraWindowShownWaiAria.java
index 39989926e7..c7379f666b 100644
--- a/uitest/src/com/vaadin/tests/components/window/ExtraWindowShownWaiAria.java
+++ b/uitest/src/com/vaadin/tests/components/window/ExtraWindowShownWaiAria.java
@@ -2,7 +2,7 @@ package com.vaadin.tests.components.window;
import com.vaadin.server.ThemeResource;
import com.vaadin.server.VaadinRequest;
-import com.vaadin.shared.ui.window.WindowState.WindowRole;
+import com.vaadin.shared.ui.window.WindowRole;
import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;