[Code Style] Run gulp fixstyle

...to apply code style settings from #142.
This commit is contained in:
Victor Woeltjen
2016-05-19 11:29:13 -07:00
parent f12b9704d9
commit fa77139077
440 changed files with 1885 additions and 1662 deletions

View File

@@ -33,9 +33,9 @@ define(
popupService;
beforeEach(function () {
mockDocument = jasmine.createSpyObj('$document', [ 'find' ]);
mockDocument = jasmine.createSpyObj('$document', ['find']);
testWindow = { innerWidth: 1000, innerHeight: 800 };
mockBody = jasmine.createSpyObj('body', [ 'append' ]);
mockBody = jasmine.createSpyObj('body', ['append']);
mockElement = jasmine.createSpyObj('element', [
'css',
'remove'
@@ -49,13 +49,13 @@ define(
});
it("adds elements to the body of the document", function () {
popupService.display(mockElement, [ 0, 0 ]);
popupService.display(mockElement, [0, 0]);
expect(mockBody.append).toHaveBeenCalledWith(mockElement);
});
describe("when positioned in appropriate quadrants", function () {
it("orients elements relative to the top-left", function () {
popupService.display(mockElement, [ 25, 50 ]);
popupService.display(mockElement, [25, 50]);
expect(mockElement.css).toHaveBeenCalledWith({
position: 'absolute',
left: '25px',
@@ -64,7 +64,7 @@ define(
});
it("orients elements relative to the top-right", function () {
popupService.display(mockElement, [ 800, 50 ]);
popupService.display(mockElement, [800, 50]);
expect(mockElement.css).toHaveBeenCalledWith({
position: 'absolute',
right: '200px',
@@ -73,7 +73,7 @@ define(
});
it("orients elements relative to the bottom-right", function () {
popupService.display(mockElement, [ 800, 650 ]);
popupService.display(mockElement, [800, 650]);
expect(mockElement.css).toHaveBeenCalledWith({
position: 'absolute',
right: '200px',
@@ -82,7 +82,7 @@ define(
});
it("orients elements relative to the bottom-left", function () {
popupService.display(mockElement, [ 120, 650 ]);
popupService.display(mockElement, [120, 650]);
expect(mockElement.css).toHaveBeenCalledWith({
position: 'absolute',
left: '120px',

View File

@@ -32,7 +32,7 @@ define(
beforeEach(function () {
mockElement =
jasmine.createSpyObj('element', [ 'css', 'remove' ]);
jasmine.createSpyObj('element', ['css', 'remove']);
testStyles = { left: '12px', top: '14px' };
popup = new Popup(mockElement, testStyles);
});

View File

@@ -36,19 +36,19 @@ define(
testViews;
beforeEach(function () {
// Creates a mockLocation, used to
// Creates a mockLocation, used to
// do the view search
mockLocation = jasmine.createSpyObj(
"$location",
[ "path", "search" ]
["path", "search"]
);
// The mockDomainObject is initialized as a
// The mockDomainObject is initialized as a
// spy object to ultimately be passed into the
// urlService urlFor function
mockDomainObject = jasmine.createSpyObj(
"domainObject",
[ "getId", "getCapability", "getModel", "useCapability" ]
["getId", "getCapability", "getModel", "useCapability"]
);
mockContext = jasmine.createSpyObj('context', ['getPath']);
testViews = [
@@ -57,39 +57,39 @@ define(
{ key: 'xyz' }
];
mockMode = "browse";
// The mockContext is set a path
// for the mockDomainObject
mockContext.getPath.andReturn(
[mockDomainObject]
);
// view capability used with the testviews made
mockDomainObject.useCapability.andCallFake(function (c) {
return (c === 'view') && testViews;
});
// context capability used with the mockContext created
// so the variables including context in the urlFor are
// initialized and reached
mockDomainObject.getCapability.andCallFake(function (c) {
return c === 'context' && mockContext;
});
// Uses the mockLocation to get the current
// "mock" website's view
mockLocation.search.andReturn({ view: 'def' });
urlService = new UrlService(mockLocation);
});
it("get url for a location using domainObject and mode", function () {
urlService.urlForLocation(mockMode, mockDomainObject);
});
it("get url for a new tab using domainObject and mode", function () {
urlService.urlForNewTab(mockMode, mockDomainObject);
});
});
}
);
);