|
29 | 29 | import org.labkey.test.util.SampleTypeHelper; |
30 | 30 | import org.labkey.test.util.TestDataGenerator; |
31 | 31 | import org.labkey.test.util.exp.SampleTypeAPIHelper; |
| 32 | +import org.openqa.selenium.TimeoutException; |
32 | 33 | import org.openqa.selenium.WebDriverException; |
33 | 34 |
|
34 | 35 | import java.io.IOException; |
|
40 | 41 | import java.util.List; |
41 | 42 | import java.util.Map; |
42 | 43 |
|
| 44 | +import static org.junit.Assert.fail; |
| 45 | + |
43 | 46 | @Category({Daily.class}) |
44 | 47 | public class GridPanelViewTest extends GridPanelBaseTest |
45 | 48 | { |
@@ -1292,18 +1295,23 @@ public void testWarningOnInvalidDateFilter() |
1292 | 1295 | .hasSize(1) |
1293 | 1296 | .filteredOn(a-> a.getText().equals("Created > 2024-05-27")) |
1294 | 1297 | .isNotEmpty()); |
| 1298 | + grid.saveView().saveView(); |
1295 | 1299 | grid.clearFilters(); |
1296 | 1300 |
|
1297 | 1301 | log("try to filter on an invalid date"); |
1298 | 1302 | grid.filterColumn("Created", Filter.Operator.GT, new FilterExpressionPanel.DateString("05/37/2024")); |
1299 | 1303 | // don't expect the parser to get the invalid date right; current behavior won't do that |
| 1304 | + // also add a bogus filter on int column, verify it refuses to do it |
| 1305 | + var err = grid.filterColumnExpectingError("Int", Filter.Operator.GT, "XYZ"); |
| 1306 | + checker().verifyEquals("expect error when trying to configure invalid filter", |
| 1307 | + "Missing filter values for: Int.", err); |
| 1308 | + grid.saveView().saveView(); |
1300 | 1309 |
|
1301 | 1310 | log("ensure the view can be edited after"); |
1302 | 1311 | grid.filterColumn("Created", Filter.Operator.LTE, new Date()); // filter on right now |
1303 | 1312 |
|
1304 | | - grid.clickUndoButton(); // undo will clear the view from its edited state, make it deletable |
1305 | 1313 | grid.manageViews() // ensure the view can be deleted now |
1306 | | - .deleteViewAndConfirm(viewName + " (shared)") |
| 1314 | + .deleteViewAndConfirm(viewName) |
1307 | 1315 | .dismiss("Done"); |
1308 | 1316 | } |
1309 | 1317 |
|
|
0 commit comments