From a444f1a3227c397b665fcaeaa6508385b2955800 Mon Sep 17 00:00:00 2001 From: Teppo Kurki Date: Fri, 28 Aug 2015 09:23:05 +0300 Subject: Close existing details when the generator is changed (#18664) Change-Id: Id031ad8ab5d513159e014458e40d35038f98df3d --- .../client/GridDetailsClientTest.java | 25 ++++++---------------- 1 file changed, 6 insertions(+), 19 deletions(-) (limited to 'uitest') diff --git a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/client/GridDetailsClientTest.java b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/client/GridDetailsClientTest.java index 1e4b8a0062..73f9d584a6 100644 --- a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/client/GridDetailsClientTest.java +++ b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/client/GridDetailsClientTest.java @@ -17,7 +17,6 @@ package com.vaadin.tests.components.grid.basicfeatures.client; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; @@ -79,16 +78,6 @@ public class GridDetailsClientTest extends GridBasicClientFeaturesTest { details.getText().startsWith("Row: 1.")); } - @Test - public void openDetailsThenAppyRenderer() { - toggleDetailsFor(1); - selectMenuPath(SET_GENERATOR); - - TestBenchElement details = getGridElement().getDetails(1); - assertTrue("Unexpected details content", - details.getText().startsWith("Row: 1.")); - } - @Test public void openHiddenDetailsThenScrollToIt() { try { @@ -114,8 +103,8 @@ public class GridDetailsClientTest extends GridBasicClientFeaturesTest { assertFalse("No notifications should've been at the start", $(FixedNotificationElement.class).exists()); - toggleDetailsFor(1); selectMenuPath(SET_FAULTY_GENERATOR); + toggleDetailsFor(1); ElementQuery notification = $(FixedNotificationElement.class); assertTrue("Was expecting an error notification here", @@ -126,17 +115,15 @@ public class GridDetailsClientTest extends GridBasicClientFeaturesTest { getGridElement().getDetails(1).getText()); } - @Test - public void updaterStillWorksAfterError() { + @Test(expected = NoSuchElementException.class) + public void detailsClosedWhenResettingGenerator() { + + selectMenuPath(SET_GENERATOR); toggleDetailsFor(1); selectMenuPath(SET_FAULTY_GENERATOR); - $(FixedNotificationElement.class).first().close(); - selectMenuPath(SET_GENERATOR); - assertNotEquals( - "New details should've been generated even after error", "", - getGridElement().getDetails(1).getText()); + getGridElement().getDetails(1); } @Test -- cgit v1.2.3