You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by on...@apache.org on 2014/04/17 12:09:43 UTC
git commit: AMBARI-5490. Fix UI Unit tests. (onechiporenko)
Repository: ambari
Updated Branches:
refs/heads/trunk ce9a6eff4 -> 290ec23b2
AMBARI-5490. Fix UI Unit tests. (onechiporenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/290ec23b
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/290ec23b
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/290ec23b
Branch: refs/heads/trunk
Commit: 290ec23b24bcb4d3ebbbcaecfd02f45634065170
Parents: ce9a6ef
Author: Oleg Nechiporenko <on...@apache.org>
Authored: Thu Apr 17 13:07:07 2014 +0300
Committer: Oleg Nechiporenko <on...@apache.org>
Committed: Thu Apr 17 13:07:07 2014 +0300
----------------------------------------------------------------------
ambari-web/test/installer/step9_test.js | 5 ++--
.../test/utils/batch_scheduled_requests_test.js | 9 ++++++-
ambari-web/test/views/main/host/summary_test.js | 25 ++++++++------------
3 files changed, 21 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/290ec23b/ambari-web/test/installer/step9_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/installer/step9_test.js b/ambari-web/test/installer/step9_test.js
index 958335e..f96ee00 100644
--- a/ambari-web/test/installer/step9_test.js
+++ b/ambari-web/test/installer/step9_test.js
@@ -27,11 +27,12 @@ var modelSetup = require('test/init_model_test');
describe('App.InstallerStep9Controller', function () {
beforeEach(function(){
- modelSetup.setupStackServiceComponent()
+ modelSetup.setupStackServiceComponent();
});
afterEach(function(){
modelSetup.cleanStackServiceComponent();
- })
+ });
+
describe('#isSubmitDisabled', function () {
var tests = Em.A([
{controllerName: 'addHostController', state: 'STARTED', e: false},
http://git-wip-us.apache.org/repos/asf/ambari/blob/290ec23b/ambari-web/test/utils/batch_scheduled_requests_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/utils/batch_scheduled_requests_test.js b/ambari-web/test/utils/batch_scheduled_requests_test.js
index 714b8c6..0937965 100644
--- a/ambari-web/test/utils/batch_scheduled_requests_test.js
+++ b/ambari-web/test/utils/batch_scheduled_requests_test.js
@@ -19,9 +19,16 @@ var App = require('app');
require('utils/helper');
require('views/common/rolling_restart_view');
var batchUtils = require('utils/batch_scheduled_requests');
-
+var modelSetup = require('test/init_model_test');
describe('batch_scheduled_requests', function() {
+ beforeEach(function(){
+ modelSetup.setupStackServiceComponent();
+ });
+ afterEach(function(){
+ modelSetup.cleanStackServiceComponent();
+ });
+
describe('#getRollingRestartComponentName', function() {
var tests = [
{serviceName: 'HDFS', componentName: 'DATANODE'},
http://git-wip-us.apache.org/repos/asf/ambari/blob/290ec23b/ambari-web/test/views/main/host/summary_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/main/host/summary_test.js b/ambari-web/test/views/main/host/summary_test.js
index 91770b4..309f7d6 100644
--- a/ambari-web/test/views/main/host/summary_test.js
+++ b/ambari-web/test/views/main/host/summary_test.js
@@ -30,9 +30,14 @@ var modelSetup = require('test/init_model_test');
describe('App.MainHostSummaryView', function() {
beforeEach(function() {
+ modelSetup.setupStackServiceComponent();
mainHostSummaryView = extendedMainHostSummaryView.create({});
});
+ afterEach(function(){
+ modelSetup.cleanStackServiceComponent();
+ });
+
describe('#sortedComponents', function() {
var tests = Em.A([
@@ -269,13 +274,6 @@ describe('App.MainHostSummaryView', function() {
describe('#installableClientComponents', function() {
- beforeEach(function(){
- modelSetup.setupStackServiceComponent();
- });
- afterEach(function(){
- modelSetup.cleanStackServiceComponent();
- });
-
it('delete host not supported', function() {
App.set('supports.deleteHost', false);
expect(mainHostSummaryView.get('installableClientComponents')).to.eql([]);
@@ -335,12 +333,6 @@ describe('App.MainHostSummaryView', function() {
});
describe('#addableComponents', function() {
- beforeEach(function(){
- modelSetup.setupStackServiceComponent();
- });
- afterEach(function(){
- modelSetup.cleanStackServiceComponent();
- });
var tests = Em.A([
{
content: Em.Object.create({
@@ -392,8 +384,11 @@ describe('App.MainHostSummaryView', function() {
it(test.m, function() {
mainHostSummaryView.set('content', test.content);
mainHostSummaryView.set('installedServices', test.services);
- expect(mainHostSummaryView.get('addableComponents').mapProperty('componentName')).to.include.members(test.e);
- expect(test.e).to.include.members(mainHostSummaryView.get('addableComponents').mapProperty('componentName'));
+ //expect(mainHostSummaryView.get('addableComponents').mapProperty('componentName')).to.include.members(test.e);
+ console.log('!!!!!!!!!', mainHostSummaryView.get('addableComponents').mapProperty('componentName').join(', '));
+ console.log('@@@@@@@@@', test.e.join(', '));
+ console.log('#########', App.get('components.addableToHost').join(', '));
+ expect(mainHostSummaryView.get('addableComponents').mapProperty('componentName')).to.eql(test.e);
});
});