#103 add paper transition
This commit is contained in:
parent
cad8682088
commit
4e4e7ae194
@ -162,6 +162,10 @@ body {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
max-width: 445px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.icon {
|
||||
|
@ -191,7 +191,7 @@ public class IndexConferenceTest extends TestTemplate {
|
||||
|
||||
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();
|
||||
String paperName = webElements.get(webElements.size() - 1).findElements(By.tagName("input")).get(1).getAttribute("value");
|
||||
conferencePage.clickSaveBut();
|
||||
|
||||
getContext().goTo(applicationProperties.getBaseUrl() + String.format("/conferences/conference?id=%s", conferenceId));
|
||||
@ -200,8 +200,26 @@ public class IndexConferenceTest extends TestTemplate {
|
||||
&& conferencePage.getPapers()
|
||||
.stream()
|
||||
.anyMatch(webElement -> webElement
|
||||
.findElement(By.tagName("a"))
|
||||
.findElements(By.tagName("span"))
|
||||
.get(1).getText().equals(paperName)));
|
||||
.findElements(By.tagName("input"))
|
||||
.get(1).getAttribute("value")
|
||||
.equals(paperName)));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTransitionToTheArticle() {
|
||||
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();
|
||||
|
||||
WebElement paper = conferencePage.getPapers().get(0);
|
||||
String paperName = paper.findElements(By.tagName("input")).get(1).getAttribute("value");
|
||||
paper.findElement(By.tagName("a")).click();
|
||||
|
||||
Assertions.assertThat(conferencePage.getName())
|
||||
.isEqualTo(paperName);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user