Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Feature/filestack int #825

Merged
merged 3 commits into from
Jun 13, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.gitignore
assets/scripts/*.*
report/**/*.*
15 changes: 10 additions & 5 deletions app/submissions/submit-design-files/submit-design-files.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ describe('Submit Design Files Controller', function() {
}

var submissionsService = {
getPresignedURL: function() {}
getPresignedURL: function() {},
startSubmission: function() {
var deferred = $q.defer()
deferred.resolve()
return deferred.promise
}
}

var mockWindow = {
Expand All @@ -30,7 +35,7 @@ describe('Submit Design Files Controller', function() {

beforeEach(function() {
bard.appModule('tc.submissions')
bard.inject(this, '$controller', '$rootScope')
bard.inject(this, '$controller', '$rootScope', '$q')

scope = $rootScope.$new()
})
Expand Down Expand Up @@ -59,7 +64,7 @@ describe('Submit Design Files Controller', function() {
challengeToSubmitTo: {
challenge: {
name: 'Challenge Name',
track: 'DEVELOP',
track: 'DESIGN',
id: 30049240
}
},
Expand Down Expand Up @@ -127,7 +132,7 @@ describe('Submit Design Files Controller', function() {
})
})

describe.skip('uploadSubmission', function() {
describe('uploadSubmission', function() {
it('adds comments to the submissions body', function() {
vm.comments = 'test comments'
scope.$digest()
Expand All @@ -149,7 +154,7 @@ describe('Submit Design Files Controller', function() {
})

it('calls the submission service', function() {
var mockAPICall = sinon.spy(submissionsService, 'getPresignedURL')
var mockAPICall = sinon.spy(submissionsService, 'startSubmission')

vm.uploadSubmission()
scope.$digest()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*eslint no-undef:0*/
describe.skip('Submit Develop Files Controller', function() {
describe('Submit Develop Files Controller', function() {
var controller, vm, scope

var mockChallenge = {
Expand Down Expand Up @@ -59,7 +59,7 @@ describe.skip('Submit Develop Files Controller', function() {
challengeToSubmitTo: {
challenge: {
name: 'Challenge Name',
track: 'DESIGN',
track: 'DEVELOP',
id: 30049240
}
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"scripts": {
"build": "webpack --bail --progress --build --tc",
"start": "webpack-dev-server --history-api-fallback --host 0.0.0.0 --dev --tc --inline --progress --port 3000",
"lint": "eslint --ignore-path .gitignore .",
"lint": "eslint .",
"test": "karma start --tc --test"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const config = require('appirio-tech-webpack-config')({
favicon: './assets/images/favicon.ico',
uglifyOptions: {
mangle: { except: ['Auth0'] }
}
}
})

if (CI) config.output.publicPath = process.env.ASSET_PREFIX
Expand Down