Search in sources :

Example 1 with AuthenticationTokenRetrival

use of org.jboss.tools.openshift.reddeer.utils.AuthenticationTokenRetrival in project jbosstools-openshift by jbosstools.

the class CreateNewConnectionTest method shouldExtractTokenInBrowserWindow.

// Skip Test for now, not stable
// @Test
@RunIf(conditionClass = ConnectionCredentialsExists.class)
public void shouldExtractTokenInBrowserWindow() {
    openConnectionWizardAndSetDefaultServerOAuth();
    String token = new AuthenticationTokenRetrival(DatastoreOS3.USERNAME, DatastoreOS3.PASSWORD).retrieveToken();
    String tokenText = new LabeledText(OpenShiftLabel.TextLabels.TOKEN).getText();
    assertEquals(token, tokenText);
    new CancelButton().click();
}
Also used : AuthenticationTokenRetrival(org.jboss.tools.openshift.reddeer.utils.AuthenticationTokenRetrival) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) CancelButton(org.eclipse.reddeer.swt.impl.button.CancelButton) RunIf(org.eclipse.reddeer.junit.execution.annotation.RunIf)

Aggregations

RunIf (org.eclipse.reddeer.junit.execution.annotation.RunIf)1 CancelButton (org.eclipse.reddeer.swt.impl.button.CancelButton)1 LabeledText (org.eclipse.reddeer.swt.impl.text.LabeledText)1 AuthenticationTokenRetrival (org.jboss.tools.openshift.reddeer.utils.AuthenticationTokenRetrival)1