Skip to content

Commit

Permalink
fixing test
Browse files Browse the repository at this point in the history
  • Loading branch information
ksierks committed Aug 16, 2022
1 parent 9942971 commit 0d340a1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@

public class ShareSamplesPage {
@FindBy(css = ".t-project-select .ant-select-selection-search-input")
private WebElement shareProjectSelectSearch;

@FindBy(css = ".t-project-select .ant-select-selection-item")
private WebElement shareProjectSelect;

@FindBy(className = "ant-select-dropdown")
Expand Down Expand Up @@ -76,10 +79,14 @@ public static ShareSamplesPage initPage(WebDriver driver) {
}

public void searchForProject(String name) {
shareProjectSelect.sendKeys(name);
shareProjectSelectSearch.sendKeys(name);
projectDropdown.click();
}

public String getProjectSelectText() {
return shareProjectSelect.getText();
}

public int getNumberOfSamplesDisplayed() {
return shareSampleListItem.size();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ public void testShareSamplesAsManager() {
samplesPage.shareSamples();

assertFalse(shareSamplesPage.isNextButtonEnabled(), "");
shareSamplesPage.searchForProject("2");
shareSamplesPage.searchForProject("3");
assertEquals(shareSamplesPage.getProjectSelectText(), "project_three");
assertTrue(shareSamplesPage.isNextButtonEnabled(), "Next button should be enabled");
shareSamplesPage.searchForProject("project2");
assertTrue(shareSamplesPage.isNextButtonEnabled(), "Next button should be enabled");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
organism="E. coli" projectDescription="This is an interesting project description."
remoteURL="http://google.ca"/>
<project id="2" createdDate="2013-07-18 14:20:19.0" name="project2" modifiedDate="2013-07-18 14:19:19.0"/>
<project id="3" createdDate="2013-07-18 14:20:19.0" name="project3" modifiedDate="2013-07-18 14:18:19.0"/>
<project id="3" createdDate="2013-07-18 14:20:19.0" name="project_three" modifiedDate="2013-07-18 14:18:19.0"/>
<project id="4" createdDate="2013-07-18 14:21:19.0" name="project4" modifiedDate="2013-07-18 14:17:19.0"/>
<project id="5" createdDate="2013-07-18 14:21:19.0" name="project5" modifiedDate="2013-07-18 14:17:19.0"/>
<project id="6" createdDate="2013-07-18 14:21:19.0" name="project6" modifiedDate="2013-07-18 14:17:19.0"/>
Expand Down

0 comments on commit 0d340a1

Please sign in to comment.