You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by fe...@apache.org on 2018/12/25 19:35:53 UTC
[zeppelin] branch master updated: [ZEPPELIN-3864] Fix Travis tests
This is an automated email from the ASF dual-hosted git repository.
felixcheung pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zeppelin.git
The following commit(s) were added to refs/heads/master by this push:
new 6639025 [ZEPPELIN-3864] Fix Travis tests
6639025 is described below
commit 663902518762cbad2fdc4efa3d552ad13effe4b0
Author: Savalek - Aleksey Savelenko <30...@users.noreply.github.com>
AuthorDate: Tue Dec 25 22:35:45 2018 +0300
[ZEPPELIN-3864] Fix Travis tests
### What is this PR for?
Maven `frontend plugin v1.4` incorrectly processed `npm` messages with error.
This PR update `frontend plugin` to 1.6 from 1.4.
### What type of PR is it?
Bug Fix
### What is the Jira issue?
[ZEPPELIN-3864](https://issues.apache.org/jira/browse/ZEPPELIN-3864),
[ZP-70]
### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no
---
pom.xml | 2 +-
zeppelin-web/e2e/searchBlock.spec.js | 2 ++
zeppelin-web/package.json | 12 ++++----
zeppelin-web/pom.xml | 2 +-
.../src/app/notebook/notebook.controller.js | 22 +++++++------
.../src/app/notebook/notebook.controller.test.js | 1 +
.../note-create/note-create.controller.test.js | 10 +++---
.../components/note-list/note-list.factory.test.js | 36 +++++++++++-----------
zeppelin-web/webpack.config.js | 5 +--
9 files changed, 49 insertions(+), 43 deletions(-)
diff --git a/pom.xml b/pom.xml
index 2465009..04a6ad8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -102,7 +102,7 @@
<!-- frontend maven plugin related versions-->
<node.version>v8.9.3</node.version>
<npm.version>5.5.1</npm.version>
- <plugin.frontend.version>1.4</plugin.frontend.version>
+ <plugin.frontend.version>1.6</plugin.frontend.version>
<!-- common library versions -->
<slf4j.version>1.7.10</slf4j.version>
diff --git a/zeppelin-web/e2e/searchBlock.spec.js b/zeppelin-web/e2e/searchBlock.spec.js
index 570673b..a146e47 100644
--- a/zeppelin-web/e2e/searchBlock.spec.js
+++ b/zeppelin-web/e2e/searchBlock.spec.js
@@ -20,6 +20,8 @@ describe('Search block e2e Test', function() {
beforeEach(function() {
browser.get('http://localhost:8080')
+ browser.sleep(500);
+ waitVisibility(element(by.linkText('Create new note')))
clickOn(element(by.linkText('Create new note')))
waitVisibility(element(by.id('noteCreateModal')))
clickAndWait(element(by.id('createNoteButton')))
diff --git a/zeppelin-web/package.json b/zeppelin-web/package.json
index 69248c6..de83a62 100644
--- a/zeppelin-web/package.json
+++ b/zeppelin-web/package.json
@@ -22,7 +22,7 @@
"pree2e": "webdriver-manager update --gecko false --versions.chrome=2.35",
"e2e": "protractor protractor.conf.js",
"pretest": "npm rebuild phantomjs-prebuilt",
- "test": "karma start karma.conf.js"
+ "karma-test": "karma start karma.conf.js"
},
"dependencies": {
"angular-ui-grid": "4.4.6",
@@ -78,15 +78,15 @@
"html-webpack-plugin": "^3.2.0",
"imports-loader": "^0.7.1",
"istanbul-instrumenter-loader": "^0.2.0",
- "jasmine-core": "^2.5.2",
- "jasmine-spec-reporter": "^4.1.1",
- "karma": "~1.3.0",
+ "jasmine-core": "^3.3.0",
+ "jasmine-spec-reporter": "^4.2.1",
+ "karma": "~3.1.3",
"karma-coverage": "^1.1.2",
- "karma-jasmine": "~1.0.2",
+ "karma-jasmine": "~2.0.1",
"karma-phantomjs-launcher": "^1.0.4",
"karma-sourcemap-loader": "^0.3.7",
"karma-spec-reporter": "0.0.31",
- "karma-webpack": "^1.8.1",
+ "karma-webpack": "^3.0.5",
"load-grunt-tasks": "^0.4.0",
"mini-css-extract-plugin": "^0.4.4",
"ng-annotate-loader": "^0.2.0",
diff --git a/zeppelin-web/pom.xml b/zeppelin-web/pom.xml
index 498803b..7de15dc 100644
--- a/zeppelin-web/pom.xml
+++ b/zeppelin-web/pom.xml
@@ -111,7 +111,7 @@
<phase>test</phase>
<configuration>
<skip>${web.e2e.disabled}</skip>
- <arguments>run test</arguments>
+ <arguments>run karma-test</arguments>
</configuration>
</execution>
diff --git a/zeppelin-web/src/app/notebook/notebook.controller.js b/zeppelin-web/src/app/notebook/notebook.controller.js
index 2f1437d..426667d 100644
--- a/zeppelin-web/src/app/notebook/notebook.controller.js
+++ b/zeppelin-web/src/app/notebook/notebook.controller.js
@@ -1579,14 +1579,16 @@ function NotebookCtrl($scope, $route, $routeParams, $location, $rootScope,
});
let content = document.getElementById('content');
- $scope.addEvent({
- eventID: content.id,
- eventType: 'resize',
- element: window,
- onDestroyElement: content,
- handler: () => {
- const actionbarHeight = document.getElementById('actionbar').lastElementChild.clientHeight;
- angular.element(document.getElementById('content')).css('padding-top', actionbarHeight - 20);
- },
- });
+ if (content && content.id) {
+ $scope.addEvent({
+ eventID: content.id,
+ eventType: 'resize',
+ element: window,
+ onDestroyElement: content,
+ handler: () => {
+ const actionbarHeight = document.getElementById('actionbar').lastElementChild.clientHeight;
+ angular.element(document.getElementById('content')).css('padding-top', actionbarHeight - 20);
+ },
+ });
+ }
}
diff --git a/zeppelin-web/src/app/notebook/notebook.controller.test.js b/zeppelin-web/src/app/notebook/notebook.controller.test.js
index be9f956..8aa8524 100644
--- a/zeppelin-web/src/app/notebook/notebook.controller.test.js
+++ b/zeppelin-web/src/app/notebook/notebook.controller.test.js
@@ -9,6 +9,7 @@ describe('Controller: NotebookCtrl', function() {
getInterpreterBindings: function() {},
updateNote: function() {},
renameNote: function() {},
+ listConfigurations: function() {},
};
let baseUrlSrvMock = {
diff --git a/zeppelin-web/src/components/note-create/note-create.controller.test.js b/zeppelin-web/src/components/note-create/note-create.controller.test.js
index 59f01d2..38a0544 100644
--- a/zeppelin-web/src/components/note-create/note-create.controller.test.js
+++ b/zeppelin-web/src/components/note-create/note-create.controller.test.js
@@ -16,11 +16,11 @@ describe('Controller: NoteCreateCtrl', function() {
it('should create a new name from current name when cloneNoteName is called', function() {
let notesList = [
- {name: 'dsds 1', id: '1'},
- {name: 'dsds 2', id: '2'},
- {name: 'test name', id: '3'},
- {name: 'aa bb cc', id: '4'},
- {name: 'Untitled Note 6', id: '4'},
+ {path: 'dsds 1', id: '1'},
+ {path: 'dsds 2', id: '2'},
+ {path: 'test name', id: '3'},
+ {path: 'aa bb cc', id: '4'},
+ {path: 'Untitled Note 6', id: '4'},
];
noteList.setNotes(notesList);
diff --git a/zeppelin-web/src/components/note-list/note-list.factory.test.js b/zeppelin-web/src/components/note-list/note-list.factory.test.js
index 2a962d8..c1ba9eb 100644
--- a/zeppelin-web/src/components/note-list/note-list.factory.test.js
+++ b/zeppelin-web/src/components/note-list/note-list.factory.test.js
@@ -11,30 +11,30 @@ describe('Factory: NoteList', function() {
it('should generate both flat list and folder-based list properly', function() {
let notesList = [
- {name: 'A', id: '000001'},
- {name: 'B', id: '000002'},
- {id: '000003'}, // note without name
- {name: '/C/CA', id: '000004'},
- {name: '/C/CB', id: '000005'},
- {name: '/C/CB/CBA', id: '000006'}, // same name with a dir
- {name: '/C/CB/CBA', id: '000007'}, // same name with another note
- {name: 'C///CB//CBB', id: '000008'},
- {name: 'D/D[A/DA]B', id: '000009'}, // check if '[' and ']' considered as folder seperator
+ {path: 'A', id: '000001'},
+ {path: 'B', id: '000002'},
+ {id: '000003'}, // note without path
+ {path: '/C/CA', id: '000004'},
+ {path: '/C/CB', id: '000005'},
+ {path: '/C/CB/CBA', id: '000006'}, // same path with a dir
+ {path: '/C/CB/CBA', id: '000007'}, // same path with another note
+ {path: 'C///CB//CBB', id: '000008'},
+ {path: 'D/D[A/DA]B', id: '000009'}, // check if '[' and ']' considered as folder seperator
];
noteList.setNotes(notesList);
let flatList = noteList.flatList;
expect(flatList.length).toBe(9);
- expect(flatList[0].name).toBe('A');
+ expect(flatList[0].path).toBe('A');
expect(flatList[0].id).toBe('000001');
- expect(flatList[1].name).toBe('B');
- expect(flatList[2].name).toBeUndefined();
- expect(flatList[3].name).toBe('/C/CA');
- expect(flatList[4].name).toBe('/C/CB');
- expect(flatList[5].name).toBe('/C/CB/CBA');
- expect(flatList[6].name).toBe('/C/CB/CBA');
- expect(flatList[7].name).toBe('C///CB//CBB');
- expect(flatList[8].name).toBe('D/D[A/DA]B');
+ expect(flatList[1].path).toBe('B');
+ expect(flatList[2].path).toBeUndefined();
+ expect(flatList[3].path).toBe('/C/CA');
+ expect(flatList[4].path).toBe('/C/CB');
+ expect(flatList[5].path).toBe('/C/CB/CBA');
+ expect(flatList[6].path).toBe('/C/CB/CBA');
+ expect(flatList[7].path).toBe('C///CB//CBB');
+ expect(flatList[8].path).toBe('D/D[A/DA]B');
let folderList = noteList.root.children;
expect(folderList.length).toBe(5);
diff --git a/zeppelin-web/webpack.config.js b/zeppelin-web/webpack.config.js
index ccb33df..1112756 100644
--- a/zeppelin-web/webpack.config.js
+++ b/zeppelin-web/webpack.config.js
@@ -242,12 +242,13 @@ module.exports = function makeWebpackConfig () {
}
if (isTest) {
- config.module.postLoaders = [
+ config.module.rules = [
{
// COVERAGE
test: /\.js$/,
exclude: /(node_modules|bower_components|\.test\.js)/,
- loader: 'istanbul-instrumenter'
+ loader: 'istanbul-instrumenter',
+ enforce: 'post'
}
]
}