Changeset 18765 in josm for trunk


Ignore:
Timestamp:
2023-06-20T20:52:08+02:00 (14 months ago)
Author:
taylor.smock
Message:

See r18764, fix unit test that expected a button at a specific location

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/OAuthAuthenticationPreferencesPanelTest.java

    r18671 r18765  
    33
    44import static org.junit.jupiter.api.Assertions.assertAll;
     5import static org.junit.jupiter.api.Assertions.assertEquals;
    56import static org.junit.jupiter.api.Assertions.assertNotNull;
    67import static org.junit.jupiter.api.Assertions.assertNull;
    78import static org.junit.jupiter.api.Assertions.assertSame;
    89import static org.junit.jupiter.api.Assertions.fail;
     10import static org.openstreetmap.josm.tools.I18n.tr;
    911
    1012import java.lang.reflect.Field;
     
    7577        assertNotNull(getAuthorization(oAuthVersion));
    7678        final JPanel buttons = (JPanel) ((JPanel) pnlAlreadyAuthorised.get(panel)).getComponent(6);
    77         final JButton action = (JButton) buttons.getComponent(oAuthVersion == OAuthVersion.OAuth10a ? 2 : 0);
     79        final JButton action = (JButton) buttons.getComponent(oAuthVersion == OAuthVersion.OAuth10a ? 2 : 1);
     80        assertEquals(tr("Remove token"), action.getText(), "The selected button should be for removing the token");
    7881        action.getAction().actionPerformed(null);
    7982        panel.saveToPreferences(); // Save to preferences should make the removal permanent
Note: See TracChangeset for help on using the changeset viewer.