Commit 2a1b1db8 authored by Kevin Smith's avatar Kevin Smith Committed by Andrea Aime
Browse files

GEOS-7203, Unit test should simulate AJAX and then run validators

parent 50fbdb1c
......@@ -184,16 +184,25 @@ public class LayerCacheOptionsTabPanelTest extends GeoServerWicketTestSupport {
tester.assertComponent("form:panel", LayerCacheOptionsTabPanel.class);
// Avoid saving the Layer
FormTester formTester = tester.newFormTester("form");
formTester.setValue("panel:tileLayerEditor:createTileLayer", false);
tester.executeAjaxEvent("form:panel:tileLayerEditor:createTileLayer", "onchange");
LayerCacheOptionsTabPanel panel = (LayerCacheOptionsTabPanel) tester
formTester.getForm().onFormSubmitted(); // This is an utter hack but is the only way I could
// figure out to exercise the validators the same
// way that happens in a live GeoServer;
// Ensure the GeoServerTileLayerInfoModel is updated
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment