Skip to content

Commit cb2c62b

Browse files
committed
MarkSeenRootTest: assert presence/absence of word "disabled" in recordToggleButton tooltip
1 parent d48d946 commit cb2c62b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

test/unit/org/openstreetmap/josm/plugins/markseen/MarkSeenRootTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ public void testInitPrefRecordActiveDisabled() throws ReflectiveOperationExcepti
251251
this.dialog.showDialog();
252252

253253
this.assertControlStates(4, true, false);
254+
assertTrue(this.recordToggleButton.getToolTipText().contains("disabled"));
254255

255256
// should have no effect
256257
Main.map.mapView.zoomTo(new Bounds(26.27, -18.23, 26.39, -18.06));
@@ -266,6 +267,7 @@ public void testInitPrefRecordActiveDisabled() throws ReflectiveOperationExcepti
266267
Main.map.mapView.zoomTo(new Bounds(26.27, -18.23, 26.275, -18.22));
267268

268269
this.assertControlStates(12, true, true);
270+
assertFalse(this.recordToggleButton.getToolTipText().contains("disabled"));
269271

270272
// should deactivate recording
271273
this.recordToggleButton.doClick();
@@ -310,7 +312,7 @@ public void testInitPrefRecordActiveDisabled() throws ReflectiveOperationExcepti
310312
this.probeSlippyMapPixels(0xff80ff, 0x0, 0x0, 0xff80ff);
311313
}
312314

313-
@Test
315+
@Test(timeout=60000)
314316
public void testInitPrefRecordActiveEnabled() throws ReflectiveOperationException {
315317
Main.pref.putInteger("markseen.recordMinZoom", 10);
316318
Main.pref.put("markseen.recordActive", true);
@@ -322,6 +324,7 @@ public void testInitPrefRecordActiveEnabled() throws ReflectiveOperationExceptio
322324
this.dialog.showDialog();
323325

324326
this.assertControlStates(10, true, true);
327+
assertFalse(this.recordToggleButton.getToolTipText().contains("disabled"));
325328
this.probeSlippyMapPixels(0x0, 0x0, 0x0, 0x0);
326329

327330
Main.map.mapView.zoomTo(new Bounds(-0.0005, -0.0005, 0.001, 0.001));

0 commit comments

Comments
 (0)