This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #330 from zanata/zanata-server
use zanata-server.zip as jboss server in test
- Loading branch information
Showing
11 changed files
with
89 additions
and
1,294 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
functional-test/src/main/java/org/zanata/page/administration/ManageSearchPage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
package org.zanata.page.administration; | ||
|
||
import com.google.common.base.Predicate; | ||
import java.util.List; | ||
import org.openqa.selenium.By; | ||
import org.openqa.selenium.WebDriver; | ||
import org.openqa.selenium.WebElement; | ||
import org.zanata.page.BasePage; | ||
import org.zanata.util.Checkbox; | ||
import org.zanata.util.TableRow; | ||
import org.zanata.util.WebElementUtil; | ||
|
||
/** | ||
* @author Patrick Huang | ||
* <a href="mailto:pahuang@redhat.com">pahuang@redhat.com</a> | ||
*/ | ||
public class ManageSearchPage extends BasePage { | ||
private By classesTableBy = By.id("form:classList"); | ||
|
||
public ManageSearchPage(WebDriver driver) { | ||
super(driver); | ||
} | ||
|
||
|
||
public ManageSearchPage selectAllActionsFor(String clazz) { | ||
List<TableRow> tableRows = | ||
WebElementUtil.getTableRows(getDriver(), classesTableBy); | ||
for (TableRow tableRow : tableRows) { | ||
if (tableRow.getCellContents().contains(clazz)) { | ||
WebElement allActionsChkBox = | ||
tableRow.getCells().get(0).findElement(By.tagName("input")); | ||
Checkbox.of(allActionsChkBox).check(); | ||
} | ||
} | ||
|
||
return this; | ||
} | ||
|
||
public ManageSearchPage performSelectedActions() { | ||
getDriver().findElement(By.id("form:reindex")).click(); | ||
waitForTenSec().until(new Predicate<WebDriver>() { | ||
@Override | ||
public boolean apply(WebDriver input) { | ||
// once the button re-appears, it means the reindex is done. | ||
input.findElement(By.id("form:reindex")); | ||
return true; | ||
} | ||
}); | ||
return this; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
103 changes: 0 additions & 103 deletions
103
functional-test/src/test/resources/as7module/sun/module.xml
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.