Skip to content

Commit

Permalink
Attempt to stabilize MavenTargetDependencyEditorTest
Browse files Browse the repository at this point in the history
Create more descriptive failure messages and delay validation of button
enablement to give the dialog more time to update.
  • Loading branch information
ptziegler authored and akurtakov committed Oct 18, 2024
1 parent 4c92950 commit c45423e
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ public void testAddMavenLocation() throws Exception {
assertEquals(table.cell(19, 3), "");
assertEquals(table.cell(19, 4), "jar");

assertFalse(robot.button("Update").isEnabled());
assertFalse(robot.button("Finish").isEnabled());
assertFalse("Expected \"Update\" button to be disabled", robot.button("Update").isEnabled());
assertFalse("Expected \"Finish\" button to be disabled", robot.button("Finish").isEnabled());
// There is no elegant way to select the cell editor, but we
// know that it will be the first text widget in the dialog.
table.click(19, 0);
Expand All @@ -246,14 +246,14 @@ public void testAddMavenLocation() throws Exception {
robot.text(0).setText("3.12.0");
table.click(19, 3); // Close cell editor

assertTrue(robot.button("Update").isEnabled());
assertTrue(robot.button("Finish").isEnabled());

assertEquals(table.cell(19, 0), "org.apache.commons");
assertEquals(table.cell(19, 1), "commons-lang3");
assertEquals(table.cell(19, 2), "3.12.0");
assertEquals(table.cell(19, 3), "");
assertEquals(table.cell(19, 4), "jar");

assertTrue("Expected \"Update\" button to be enabled", robot.button("Update").isEnabled());
assertTrue("Expected \"Finished\" button to be enabled", robot.button("Finish").isEnabled());
}

/**
Expand Down

0 comments on commit c45423e

Please sign in to comment.