#103 add delete deadline
This commit is contained in:
parent
0cb7b05c25
commit
7b4318a3b5
@ -127,4 +127,24 @@ public class IndexConferenceTest extends TestTemplate {
|
||||
Assert.assertTrue(membersCount + 1 == conferencePage.getMemperCount()
|
||||
&& conferencePage.getTakePartButDisabledValue().equals("true"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDeleteDeadlineAndSave() {
|
||||
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 deadlineCount = conferencePage.getDeadlineCount();
|
||||
|
||||
conferencePage.clickDeleteDeadlineBut();
|
||||
conferencePage.clickSaveBut();
|
||||
|
||||
getContext().goTo(applicationProperties.getBaseUrl() + String.format("/conferences/conference?id=%s", conferenceId));
|
||||
|
||||
Assert.assertTrue(deadlineCount - 1 == conferencePage.getDeadlineCount());
|
||||
}
|
||||
}
|
||||
|
@ -63,4 +63,8 @@ public class ConferencePage extends PageObject {
|
||||
public Integer getMemperCount() {
|
||||
return driver.findElements(By.className("member")).size();
|
||||
}
|
||||
|
||||
public void clickDeleteDeadlineBut() {
|
||||
driver.findElement(By.xpath("//*[@id=\"deadlines\"]/div/input[4]")).click();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user