use of org.eclipse.reddeer.swt.impl.link.DefaultLink in project jbosstools-hibernate by jbosstools.
the class NewConfigurationWizardPage method getValuesFromConnection.
public SelectConnectionProfileDialog getValuesFromConnection() {
Link link = new DefaultLink(referencedComposite, "Get values from Connection");
link.click();
return new SelectConnectionProfileDialog();
}
use of org.eclipse.reddeer.swt.impl.link.DefaultLink in project jbosstools-openshift by jbosstools.
the class OpenNewConnectionWizardTest method shouldOpenConnectionWizardViaLinkTest.
@Test
public void shouldOpenConnectionWizardViaLinkTest() {
// given
ConnectionUtils.clearAll();
explorer.open();
// when
new DefaultLink(OpenShiftLabel.TextLabels.CREATE_CONNECTION).click();
// then
verifyNewConnectionWizardIsOpened();
}
use of org.eclipse.reddeer.swt.impl.link.DefaultLink in project jbosstools-openshift by jbosstools.
the class CreateApplicationFromTemplateTest method completeWizardAndVerify.
private void completeWizardAndVerify() {
new WaitUntil(new ControlIsEnabled(new NextButton()), TimePeriod.DEFAULT);
new NextButton().click();
new WaitUntil(new ControlIsEnabled(new BackButton()), TimePeriod.LONG);
String srcRepoRef = new DefaultTable().getItem(TemplateParametersTest.SOURCE_REPOSITORY_REF).getText(1);
srcRepoURI = new DefaultTable().getItem(TemplateParametersTest.SOURCE_REPOSITORY_URL).getText(1);
String contextDir = new DefaultTable().getItem(TemplateParametersTest.CONTEXT_DIR).getText(1);
applicationName = new DefaultTable().getItem(TemplateParametersTest.APPLICATION_NAME).getText(1);
new NextButton().click();
new WaitWhile(new ControlIsEnabled(new NextButton()), TimePeriod.LONG);
new FinishButton().click();
new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.APPLICATION_SUMMARY), TimePeriod.LONG);
new DefaultShell(OpenShiftLabel.Shell.APPLICATION_SUMMARY);
assertTrue(TemplateParametersTest.SOURCE_REPOSITORY_REF + " is not same as the one shown in " + "New OpenShift Application wizard.", new DefaultTable().getItem(TemplateParametersTest.SOURCE_REPOSITORY_REF).getText(1).equals(srcRepoRef));
assertTrue(TemplateParametersTest.SOURCE_REPOSITORY_URL.split(" ")[0] + " is not same as the one shown in " + "New OpenShift Application wizard.", new DefaultTable().getItem(TemplateParametersTest.SOURCE_REPOSITORY_URL.split(" ")[0]).getText(1).equals(srcRepoURI));
assertTrue(TemplateParametersTest.CONTEXT_DIR + " is not same as the one shown in New OpenShift" + " Application wizard.", new DefaultTable().getItem(TemplateParametersTest.CONTEXT_DIR).getText(1).equals(contextDir));
assertTrue(TemplateParametersTest.APPLICATION_NAME.split(" ")[0] + " is not same as the one shown in " + "New OpenShift Application wizard.", new DefaultTable().getItem(TemplateParametersTest.APPLICATION_NAME.split(" ")[0]).getText(1).equals(applicationName));
assertFalse(TemplateParametersTest.GENERIC_SECRET.split(" ")[0] + " should be generated and non-empty.", new DefaultTable().getItem(TemplateParametersTest.GENERIC_SECRET.split(" ")[0]).getText(1).isEmpty());
assertFalse(TemplateParametersTest.GITHUB_SECRET.split(" ")[0] + " should be generated and non-empty.", new DefaultTable().getItem(TemplateParametersTest.GITHUB_SECRET.split(" ")[0]).getText(1).isEmpty());
new DefaultLink("Click here to display the webhooks available to automatically trigger builds.").click();
new DefaultShell(OpenShiftLabel.Shell.WEBHOOK_TRIGGERS);
genericWebhookURL = new DefaultText(0).getText();
githubWebhookURL = new DefaultText(1).getText();
assertFalse("Generic webhook URL should not be empty.", genericWebhookURL.isEmpty());
assertFalse("GitHub webhook URL should not be empty.", githubWebhookURL.isEmpty());
new OkButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.WEBHOOK_TRIGGERS));
new DefaultShell(OpenShiftLabel.Shell.APPLICATION_SUMMARY);
new OkButton().click();
}
use of org.eclipse.reddeer.swt.impl.link.DefaultLink in project jbosstools-hibernate by jbosstools.
the class ProjectConfigurationFactory method convertProjectToFacetsForm.
/**
* Convert project to facet form
* @param prj given project name
*/
public static void convertProjectToFacetsForm(String prj) {
ProjectExplorer pe = new ProjectExplorer();
pe.open();
PropertyDialog pd = pe.getProject(prj).openProperties();
pd.select("Project Facets");
// convert to faceted form
new DefaultTreeItem("Project Facets").select();
new DefaultLink("Convert to faceted form...").click();
new WaitWhile(new JobIsRunning());
new WaitUntil(new WidgetIsFound(Button.class, new WithStyleMatcher(SWT.PUSH), new WithMnemonicTextMatcher("Apply")), TimePeriod.LONG);
PushButton apply = new PushButton("Apply");
new WaitUntil(new ControlIsEnabled(apply));
apply.click();
pd.ok();
}
Aggregations