Skip to content
Snippets Groups Projects
Commit 1b0359a9 authored by srosse's avatar srosse
Browse files

no-jira: fix selenium test, the edit menu of portfolio template

parent 3f11f4e2
No related branches found
No related tags found
No related merge requests found
...@@ -832,7 +832,7 @@ public class PortfolioTest { ...@@ -832,7 +832,7 @@ public class PortfolioTest {
String pageTitle = "Page-Template-" + UUID.randomUUID(); String pageTitle = "Page-Template-" + UUID.randomUUID();
String structureElementTitle = "Struct-Template-" + UUID.randomUUID(); String structureElementTitle = "Struct-Template-" + UUID.randomUUID();
template template
.openEditor() .openResourceEditor()
.selectMapInEditor(portfolioTitle) .selectMapInEditor(portfolioTitle)
.selectFirstPageInEditor() .selectFirstPageInEditor()
.setPage(pageTitle, "With a little description") .setPage(pageTitle, "With a little description")
......
...@@ -188,6 +188,33 @@ public class PortfolioPage { ...@@ -188,6 +188,33 @@ public class PortfolioPage {
return this; return this;
} }
/**
* Open the editor of a template
* @return
*/
public PortfolioPage openResourceEditor() {
By toolsMenu = By.cssSelector("ul.o_sel_repository_tools");
if(!browser.findElement(toolsMenu).isDisplayed()) {
openToolsMenu();
}
By editTemplateBy = By.className("o_sel_ep_edit_map");
browser.findElement(editTemplateBy).click();
OOGraphene.waitBusy();
return this;
}
/**
* Open the tools drop-down
* @return
*/
public PortfolioPage openToolsMenu() {
By toolsMenuCaretBy = By.cssSelector("a.o_sel_repository_tools");
browser.findElement(toolsMenuCaretBy).click();
By toolsMenuBy = By.cssSelector("ul.o_sel_repository_tools");
OOGraphene.waitElement(toolsMenuBy);
return this;
}
public PortfolioPage openMap(String mapTitle) { public PortfolioPage openMap(String mapTitle) {
By mapBy = By.cssSelector("div.o_eportfolio_maps div.o_map-default"); By mapBy = By.cssSelector("div.o_eportfolio_maps div.o_map-default");
By headingBy = By.cssSelector("div.panel-heading h4"); By headingBy = By.cssSelector("div.panel-heading h4");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment