Search in sources :

Example 1 with Table

use of org.eclipse.reddeer.swt.api.Table in project linuxtools by eclipse.

the class RegistryAccountsPreferencePage method removeRegistry.

public void removeRegistry(String serverAddress) {
    Table table = new DefaultTable();
    if (table.containsItem(serverAddress)) {
        table.select(serverAddress);
        new PushButton("Remove").click();
    }
}
Also used : DefaultTable(org.eclipse.reddeer.swt.impl.table.DefaultTable) Table(org.eclipse.reddeer.swt.api.Table) DefaultTable(org.eclipse.reddeer.swt.impl.table.DefaultTable) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton)

Example 2 with Table

use of org.eclipse.reddeer.swt.api.Table in project jbosstools-openshift by jbosstools.

the class PortForwardingTest method testFreePortsForPortForwarding.

@Test
public void testFreePortsForPortForwarding() {
    openPortForwardingDialog();
    CheckBox checkBox = new CheckBox(OpenShiftLabel.TextLabels.FIND_FREE_PORTS);
    Table table = new DefaultTable();
    assertTrue("Default port should be used for ping on first opening of Port forwarding dialog.", table.getItem("ping").getText(1).equals("8888"));
    assertTrue("Default port should be used for http on first opening of Port forwarding dialog.", table.getItem("http").getText(1).equals("8080"));
    new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
    checkBox.click();
    assertFalse("Free port port should be used for ping at this point.", table.getItem("ping").getText(1).equals("8888"));
    assertFalse("Free port should be used for http at this point.", table.getItem("http").getText(1).equals("8080"));
    checkBox.click();
    assertTrue("Default port should be used for ping at this point.", table.getItem("ping").getText(1).equals("8888"));
    assertTrue("Default port should be used for http at this point.", table.getItem("http").getText(1).equals("8080"));
}
Also used : DefaultTable(org.eclipse.reddeer.swt.impl.table.DefaultTable) Table(org.eclipse.reddeer.swt.api.Table) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) CheckBox(org.eclipse.reddeer.swt.impl.button.CheckBox) DefaultTable(org.eclipse.reddeer.swt.impl.table.DefaultTable) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) AbstractTest(org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest) Test(org.junit.Test)

Example 3 with Table

use of org.eclipse.reddeer.swt.api.Table in project linuxtools by eclipse.

the class NewDockerConnectionPage method search.

public void search(String connectionName) {
    new PushButton("Search...").click();
    new WaitUntil(new ShellIsAvailable("Docker Connection Selection"));
    Table table = new DefaultTable();
    table.getItem(connectionName).select();
    new OkButton().click();
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) OkButton(org.eclipse.reddeer.swt.impl.button.OkButton) DefaultTable(org.eclipse.reddeer.swt.impl.table.DefaultTable) Table(org.eclipse.reddeer.swt.api.Table) DefaultTable(org.eclipse.reddeer.swt.impl.table.DefaultTable) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Example 4 with Table

use of org.eclipse.reddeer.swt.api.Table in project linuxtools by eclipse.

the class RegistryAccountsPreferencePage method editRegistry.

public void editRegistry(String serverAddress, String email, String userName, String password) {
    Table table = new DefaultTable();
    if (table.containsItem(serverAddress)) {
        table.select(serverAddress);
        new PushButton("Edit").click();
        new LabeledText(SERVER_ADDRESS).setText(serverAddress);
        new LabeledText(USERNAME).setText(userName);
        new LabeledText(EMAIL).setText(email);
        new LabeledText(PASSWORD).setText(password);
        new PushButton("OK").click();
    }
}
Also used : DefaultTable(org.eclipse.reddeer.swt.impl.table.DefaultTable) Table(org.eclipse.reddeer.swt.api.Table) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) DefaultTable(org.eclipse.reddeer.swt.impl.table.DefaultTable) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton)

Example 5 with Table

use of org.eclipse.reddeer.swt.api.Table in project linuxtools by eclipse.

the class RegistryAccountsPreferencePage method removeAllRegistries.

public void removeAllRegistries() {
    Table table = new DefaultTable();
    for (int i = 0; i < table.rowCount(); i++) {
        table.select(0);
        new PushButton("Remove").click();
    }
}
Also used : DefaultTable(org.eclipse.reddeer.swt.impl.table.DefaultTable) Table(org.eclipse.reddeer.swt.api.Table) DefaultTable(org.eclipse.reddeer.swt.impl.table.DefaultTable) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton)

Aggregations

Table (org.eclipse.reddeer.swt.api.Table)5 DefaultTable (org.eclipse.reddeer.swt.impl.table.DefaultTable)5 PushButton (org.eclipse.reddeer.swt.impl.button.PushButton)4 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)1 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)1 ShellIsAvailable (org.eclipse.reddeer.swt.condition.ShellIsAvailable)1 CheckBox (org.eclipse.reddeer.swt.impl.button.CheckBox)1 OkButton (org.eclipse.reddeer.swt.impl.button.OkButton)1 LabeledText (org.eclipse.reddeer.swt.impl.text.LabeledText)1 JobIsRunning (org.eclipse.reddeer.workbench.core.condition.JobIsRunning)1 AbstractTest (org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest)1 Test (org.junit.Test)1