Resolve "Генерация периодических задач по тегам" #207
@ -140,6 +140,7 @@ body {
|
||||
|
||||
.paper-name {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.paper-name:hover {
|
||||
@ -156,6 +157,11 @@ body {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.paper-name span:nth-child(2) {
|
||||
max-width: 326px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.icon {
|
||||
|
@ -176,4 +176,32 @@ public class IndexConferenceTest extends TestTemplate {
|
||||
.findElements(By.tagName("span"))
|
||||
.get(1).getText().equals(paperName)));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAddArticle() {
|
||||
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 paperCount = conferencePage.getPaperCount();
|
||||
|
||||
conferencePage.clickAddPaperBut();
|
||||
List<WebElement> webElements = conferencePage.getPapers();
|
||||
String paperName = webElements.get(webElements.size() - 1).findElement(By.tagName("a")).findElements(By.tagName("span")).get(1).getText();
|
||||
conferencePage.clickSaveBut();
|
||||
|
||||
getContext().goTo(applicationProperties.getBaseUrl() + String.format("/conferences/conference?id=%s", conferenceId));
|
||||
|
||||
Assert.assertTrue(paperCount + 1 == conferencePage.getPaperCount()
|
||||
&& conferencePage.getPapers()
|
||||
.stream()
|
||||
.anyMatch(webElement -> webElement
|
||||
.findElement(By.tagName("a"))
|
||||
.findElements(By.tagName("span"))
|
||||
.get(1).getText().equals(paperName)));
|
||||
}
|
||||
}
|
||||
|
@ -85,4 +85,8 @@ public class ConferencePage extends PageObject {
|
||||
webElement.click();
|
||||
return webElement;
|
||||
}
|
||||
|
||||
public void clickAddPaperBut() {
|
||||
driver.findElement(By.id("add-paper")).click();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user