Resolve "Генерация периодических задач по тегам" #207
@ -255,4 +255,19 @@ public class IndexConferenceTest extends TestTemplate {
|
||||
|
||||
Assert.assertEquals(1, conferencesPage.getConferencesList().size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDeleteConf() throws InterruptedException {
|
||||
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());
|
||||
|
||||
Integer size = conferencesPage.getConferencesList().size();
|
||||
conferencesPage.deleteFirst();
|
||||
Thread.sleep(2000);
|
||||
conferencesPage.clickConfirm();
|
||||
|
||||
Assert.assertEquals(size - 1, conferencesPage.getConferencesList().size());
|
||||
}
|
||||
}
|
||||
|
@ -29,4 +29,12 @@ public class ConferencesPage extends PageObject {
|
||||
driver.findElements(By.className("bootstrap-select")).get(1).findElement(By.className("btn")).click();
|
||||
driver.findElements(By.className("bootstrap-select")).get(1).findElements(By.className("dropdown-item")).get(1).click();
|
||||
}
|
||||
|
||||
public void deleteFirst() {
|
||||
driver.findElement(By.xpath("//*[@id=\"conferences\"]/div/div[2]/div[1]/div[1]/div/input[2]")).submit();
|
||||
}
|
||||
|
||||
public void clickConfirm() {
|
||||
driver.findElement(By.xpath("//*[@id=\"deleteConference\"]")).click();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user