Resolve "Генерация периодических задач по тегам" #207
@ -106,4 +106,25 @@ public class IndexConferenceTest extends TestTemplate {
|
|||||||
&& webElement.findElement(By.cssSelector("input[type=\"date\"]")).getAttribute("value").equals(dateValue);
|
&& webElement.findElement(By.cssSelector("input[type=\"date\"]")).getAttribute("value").equals(dateValue);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testTakePartAndSave() {
|
||||||
|
Map.Entry<PageObject, List<String>> page = Iterables.get(navigationHolder.entrySet(), 0);
|
||||||
|
|
||||||
|
getContext().goTo(applicationProperties.getBaseUrl() + page.getValue().get(1));
|
||||||
|
ConferencesPage conferencesPage = (ConferencesPage) getContext().initPage(page.getKey());
|
||||||
|
ConferencePage conferencePage = (ConferencePage) getContext().initPage(Iterables.get(navigationHolder.entrySet(), 1).getKey());
|
||||||
|
|
||||||
|
conferencesPage.getConferenceFirst();
|
||||||
|
String conferenceId = conferencePage.getId();
|
||||||
|
Integer membersCount = conferencePage.getMemperCount();
|
||||||
|
|
||||||
|
conferencePage.clickTakePartBut();
|
||||||
|
conferencePage.clickSaveBut();
|
||||||
|
|
||||||
|
getContext().goTo(applicationProperties.getBaseUrl() + String.format("/conferences/conference?id=%s", conferenceId));
|
||||||
|
|
||||||
|
Assert.assertTrue(membersCount + 1 == conferencePage.getMemperCount()
|
||||||
|
&& conferencePage.getTakePartButDisabledValue().equals("true"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,4 +51,16 @@ public class ConferencePage extends PageObject {
|
|||||||
public void setDeadlineDate(String date, Integer i) {
|
public void setDeadlineDate(String date, Integer i) {
|
||||||
driver.findElement(By.id(String.format("deadlines%d.date", i))).sendKeys(date);
|
driver.findElement(By.id(String.format("deadlines%d.date", i))).sendKeys(date);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void clickTakePartBut() {
|
||||||
|
driver.findElement(By.id("take-part")).click();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTakePartButDisabledValue() {
|
||||||
|
return driver.findElement(By.id("take-part")).getAttribute("disabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getMemperCount() {
|
||||||
|
return driver.findElements(By.className("member")).size();
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user