mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
test: Add a basic e2e test for home
This commit is contained in:
parent
39dc77e4f3
commit
15473de6b5
3 changed files with 58 additions and 0 deletions
18
zeppelin-web/e2e/home.spec.js
Normal file
18
zeppelin-web/e2e/home.spec.js
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
describe('Home e2e Test', function() {
|
||||
it('should have a welcome message', function() {
|
||||
browser.get('http://localhost:8080');
|
||||
var weblcomeElem = element(by.id('welcome'))
|
||||
|
||||
expect(weblcomeElem.getText()).toEqual('Welcome to Zeppelin!')
|
||||
})
|
||||
|
||||
it('should have the button for importing notebook', function() {
|
||||
var btn = element(by.cssContainingText('a', 'Import note'))
|
||||
expect(btn).toBeDefined()
|
||||
})
|
||||
|
||||
it('should have the button for creating notebook', function() {
|
||||
var btn = element(by.cssContainingText('a', 'Create new note'))
|
||||
expect(btn).toBeDefined()
|
||||
})
|
||||
})
|
||||
|
|
@ -19,6 +19,7 @@
|
|||
"dev:watch": "grunt watch-webpack-dev",
|
||||
"dev": "npm-run-all --parallel dev:server lint:watch dev:watch",
|
||||
"test:watch": "karma start karma.conf.js --single-run=false",
|
||||
"e2e": "protractor protractor.conf.js",
|
||||
"test": "karma start karma.conf.js"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
@ -75,6 +76,7 @@
|
|||
"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",
|
||||
"karma-coverage": "^1.1.1",
|
||||
"karma-jasmine": "~1.0.2",
|
||||
|
|
@ -86,6 +88,7 @@
|
|||
"ng-annotate-loader": "^0.2.0",
|
||||
"npm-run-all": "^3.1.2",
|
||||
"postcss-loader": "^1.2.1",
|
||||
"protractor": "^5.1.2",
|
||||
"raw-loader": "^0.5.1",
|
||||
"rimraf": "^2.5.4",
|
||||
"string-replace-webpack-plugin": "^0.1.3",
|
||||
|
|
|
|||
37
zeppelin-web/protractor.conf.js
Normal file
37
zeppelin-web/protractor.conf.js
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
exports.config = {
|
||||
baseUrl: 'http://localhost:8080/',
|
||||
directConnect: true,
|
||||
capabilities: {
|
||||
browserName: 'chrome',
|
||||
chromeOptions: {
|
||||
'args': ['show-fps-counter=true']
|
||||
}
|
||||
},
|
||||
allScriptsTimeout: 110000,
|
||||
|
||||
framework: 'jasmine',
|
||||
specs: ['e2e/**/*.js'],
|
||||
jasmineNodeOpts: {
|
||||
showTiming: true,
|
||||
showColors: true,
|
||||
isVerbose: true,
|
||||
includeStackTrace: false,
|
||||
defaultTimeoutInterval: 400000,
|
||||
print: function() {}, // remove protractor dot reporter, we are using jasmine-spec-reporter
|
||||
},
|
||||
|
||||
onPrepare: function() {
|
||||
// waiting for angular app is loaded
|
||||
browser.ignoreSynchronization = true;
|
||||
browser.manage().timeouts().pageLoadTimeout(40000);
|
||||
browser.manage().timeouts().implicitlyWait(25000);
|
||||
|
||||
// add reporter to display executed tests in console
|
||||
var SpecReporter = require('jasmine-spec-reporter').SpecReporter;
|
||||
jasmine.getEnv().addReporter(new SpecReporter({
|
||||
spec: {
|
||||
displayStacktrace: true
|
||||
}
|
||||
}));
|
||||
},
|
||||
};
|
||||
Loading…
Reference in a new issue