Skip to content

Commit

Permalink
Override default paternflytimeline icon size
Browse files Browse the repository at this point in the history
  • Loading branch information
AllenBW committed Jul 26, 2017
1 parent 2d7ac37 commit 80c96d1
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 54 deletions.
117 changes: 63 additions & 54 deletions client/app/services/vms/snapshots.component.spec.js
Original file line number Diff line number Diff line change
@@ -1,58 +1,67 @@
describe('Component: snapshots', function () {
beforeEach(function () {
module('app.services');
});
describe('Component: snapshots', function() {
beforeEach(function() {
module('app.services');
});

describe('with $componentController', function() {
let $componentController, ctrl, notificationsSpy, collectionsApiSpy;
let bindings = {vmId: "1"};
let successResponse = {
message: "Success"
};
let errorResponse = 'error';

describe('with $componentController', function () {
let $componentController, ctrl, notificationsSpy, collectionsApiSpy;
let bindings = {vmId: "1"};
let successResponse = {
message: "Success"
beforeEach(
inject(function(_$componentController_) {
$componentController = _$componentController_;
let transclude = function() {
let returnObj = {};
returnObj.length = 0;
return returnObj
};
let errorResponse = 'error';

beforeEach(
inject(function (_$componentController_) {
$componentController = _$componentController_;
let transclude = function () {
let returnObj = {};
returnObj.length = 0;
return returnObj
};
ctrl = $componentController('vmSnapshots', {$transclude: transclude}, bindings);
})
);

it('is defined, accepts bindings', function () {
expect(ctrl).to.be.defined;
expect(ctrl.vmId).to.equal("1");
});

it('sets correct title', function () {
expect(ctrl.title).to.equal("Snapshots");
});

it('has an onInit()', function () {
ctrl.$onInit();
expect(ctrl.$onInit).to.be.defined;
});

beforeEach(function () {
bard.inject('CollectionsApi', 'EventNotifications');
notificationsSpy = sinon.stub(EventNotifications, 'result').returns(null);
ctrl.$onInit();
});

it('should query the API to resolve snapshots', function () {
collectionsApiSpy = sinon.stub(CollectionsApi, 'query').returns(Promise.resolve(successResponse));
ctrl.resolveSnapshots();
expect(collectionsApiSpy).to.have.been.called;
});

it('should call CollectionsApi post to delete snapshots', function () {
collectionsApiSpy = sinon.stub(CollectionsApi, 'post').returns(Promise.resolve(successResponse));
ctrl.deleteSnapshots();
expect(collectionsApiSpy).to.have.been.called;
});
ctrl = $componentController('vmSnapshots', {$transclude: transclude}, bindings);
})
);

it('is defined, accepts bindings', function() {
expect(ctrl).to.be.defined;
expect(ctrl.vmId).to.equal("1");
});

it('sets correct title', function() {
expect(ctrl.title).to.equal("Snapshots");
});

it('has an onInit()', function() {
expect(ctrl.$onInit).to.be.defined;
});

it('has a deleteSnapshots()', function() {
ctrl.deleteSnapshots()
ctrl.deleteSnapshots("action", {item: "item"})
expect(ctrl.deleteSnapshots()).to.be.defined;
});

it('has a cancelDelete()', function() {
expect(ctrl.cancelDelete()).to.be.defined;
});

beforeEach(function() {
bard.inject('CollectionsApi', 'EventNotifications');
notificationsSpy = sinon.stub(EventNotifications, 'result').returns(null);
ctrl.$onInit();
});

it('should query the API to resolve snapshots', function() {
collectionsApiSpy = sinon.stub(CollectionsApi, 'query').returns(Promise.resolve(successResponse));
ctrl.resolveSnapshots();
expect(collectionsApiSpy).to.have.been.called;
});

it('should call CollectionsApi post to delete snapshots', function() {
collectionsApiSpy = sinon.stub(CollectionsApi, 'post').returns(Promise.resolve(successResponse));
ctrl.deleteSnapshots();
expect(collectionsApiSpy).to.have.been.called;
});
});
});
8 changes: 8 additions & 0 deletions client/assets/sass/_overrides.sass
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,11 @@

.form-group
margin-bottom: 0 !important // sass-lint:disable-line no-important

// Override patternfly-timeline default icon size
.timeline-pf-drop
font-size: 20px !important // sass-lint:disable-line no-important

&:hover
font-size: 30px !important // sass-lint:disable-line no-important

0 comments on commit 80c96d1

Please sign in to comment.