Resolve "Генерация периодических задач по тегам" #207

Merged
ashette merged 32 commits from 79-students-tags-generation into dev 2019-05-16 07:30:47 +04:00
2 changed files with 23 additions and 0 deletions
Showing only changes of commit b2e8a43cee - Show all commits

View File

@ -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());
}
}

View File

@ -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();
}
}