FEST

Adding a requireToolTip() method for JComponents

Details

  • Type: New Feature New Feature
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: FEST-Swing 1.2a2
  • Fix Version/s: FEST-Swing 1.2a3
  • Component/s: Swing
  • Labels:
    None
  • Number of attachments :
    0

Description

Instead of having to do the following

public void testTooltip() {
  JComboBox myComboBox = <...>
  assertEquals("Tooltip does not correspond to selection", getToolTipTextInEDT(myComboBox), "expected tooltip");
}

private String getToolTipTextInEDT(final JComboBoxFixture combobox) {
  String tooltip = GuiActionRunner.execute(new GuiQuery<String>() {
    public String executeInEDT() {
      return combobox.component().getToolTipText();
    }
  });
  return tooltip;
}

there should be a requireToolTip(String) on a to-be-created JComponentFixture injected between ComponentFixture and its subclasses.

Activity

Hide
Alex Ruiz added a comment -

I ended up adding requireToolTip to all fixtures that handle {{JComponent}}s.

Show
Alex Ruiz added a comment - I ended up adding requireToolTip to all fixtures that handle {{JComponent}}s.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: