|
@@ -107,7 +107,15 @@ describe('App.HostComponentView', function() {
|
|
|
App.TestAliases.testAsComputedEqual(getView(), 'isActive', 'content.passiveState', 'OFF');
|
|
|
|
|
|
describe('#isDeleteComponentDisabled', function() {
|
|
|
-
|
|
|
+ var configs=[
|
|
|
+ {
|
|
|
+ properties: {
|
|
|
+ 'hive_database': 'Existing MYSQL Database'
|
|
|
+ },
|
|
|
+ tag: 'version2',
|
|
|
+ type: 'hive-env'
|
|
|
+ }
|
|
|
+ ];
|
|
|
beforeEach(function() {
|
|
|
this.mock = sinon.stub(App.StackServiceComponent, 'find');
|
|
|
sinon.stub(App.HostComponent, 'getCount').returns(1);
|
|
@@ -137,6 +145,15 @@ describe('App.HostComponentView', function() {
|
|
|
hostComponentView.propertyDidChange('isDeleteComponentDisabled');
|
|
|
expect(hostComponentView.get('isDeleteComponentDisabled')).to.be.true;
|
|
|
});
|
|
|
+
|
|
|
+ it('delete is enabled because mysql server is stopped and hive is using external database', function() {
|
|
|
+ App.db.setConfigs(configs);
|
|
|
+ this.mock.returns(Em.Object.create({minToInstall: 0}));
|
|
|
+ hostComponentView.get('hostComponent').set('componentName', 'MYSQL_SERVER');
|
|
|
+ hostComponentView.get('hostComponent').set('workStatus', 'STOPPED');
|
|
|
+ hostComponentView.propertyDidChange('isDeleteComponentDisabled');
|
|
|
+ expect(hostComponentView.get('isDeleteComponentDisabled')).to.be.true;
|
|
|
+ });
|
|
|
});
|
|
|
|
|
|
describe('#componentTextStatus', function() {
|