bug fixed can't load for notebook list when enabled shiro

This commit is contained in:
CloverHearts 2016-11-02 19:15:40 +09:00
parent 794c66b08f
commit 27451a4108
2 changed files with 28 additions and 7 deletions

View file

@ -39,6 +39,8 @@ import java.io.IOException;
import java.net.URI;
import java.util.List;
import static org.junit.Assert.assertTrue;
/**
* Created for org.apache.zeppelin.integration on 13/06/16.
@ -119,6 +121,21 @@ public class AuthenticationIT extends AbstractZeppelinIT {
ZeppelinITUtils.sleep(1000, false);
}
private void testShowNotebookListOnNavbar() {
if (!endToEndTestEnabled()) {
return;
}
try {
pollingWait(By.xpath("//li[@class='dropdown notebook-list-dropdown']"),
MAX_BROWSER_TIMEOUT_SEC).click();
assertTrue(driver.findElements(By.xpath("//a[@class=\"notebook-list-item ng-scope\"]")).size() > 0);
pollingWait(By.xpath("//li[@class='dropdown notebook-list-dropdown']"),
MAX_BROWSER_TIMEOUT_SEC).click();
pollingWait(By.xpath("//li[@class='dropdown notebook-list-dropdown']"),
MAX_BROWSER_TIMEOUT_SEC).click();
}
}
private void logoutUser(String userName) {
ZeppelinITUtils.sleep(500, false);
driver.findElement(By.xpath("//div[contains(@class, 'navbar-collapse')]//li[contains(.,'" +

View file

@ -114,6 +114,7 @@
$scope.$on('setNoteMenu', function(event, notes) {
noteListDataFactory.setNotes(notes);
initNotebookListEventListener();
});
$scope.$on('setConnectedStatus', function(event, param) {
@ -127,15 +128,18 @@
/*
** Performance optimization for Browser Render.
*/
angular.element(document).ready(function() {
angular.element('.notebook-list-dropdown').on('show.bs.dropdown', function() {
$scope.isDrawNavbarNoteList = true;
});
function initNotebookListEventListener() {
angular.element(document).ready(function() {
angular.element('.notebook-list-dropdown').on('show.bs.dropdown', function() {
console.log('clover open');
$scope.isDrawNavbarNoteList = true;
});
angular.element('.notebook-list-dropdown').on('hide.bs.dropdown', function() {
$scope.isDrawNavbarNoteList = false;
angular.element('.notebook-list-dropdown').on('hide.bs.dropdown', function() {
$scope.isDrawNavbarNoteList = false;
});
});
});
}
}
})();