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

Commit 504d264

Browse files
author
vikasrohit
committed
Merge branch 'dev' into feature/sso-accounts-app-integration
* dev: AS#102438220269693, Clean up lint errors for app/scripts/filepicker.js & angular-filepicker.js -- Fixed lint errors AS#141842509742941, Fix unit tests for submission.service.js 
2 parents 70cd24a + 1ec6a45 commit 504d264

File tree

5 files changed

+17
-9
lines changed

5 files changed

+17
-9
lines changed

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.gitignore
2+
assets/scripts/*.*
3+
report/**/*.*

app/submissions/submit-design-files/submit-design-files.spec.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ describe('Submit Design Files Controller', function() {
1919
}
2020

2121
var submissionsService = {
22-
getPresignedURL: function() {}
22+
getPresignedURL: function() {},
23+
startSubmission: function() {
24+
var deferred = $q.defer()
25+
deferred.resolve()
26+
return deferred.promise
27+
}
2328
}
2429

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

3136
beforeEach(function() {
3237
bard.appModule('tc.submissions')
33-
bard.inject(this, '$controller', '$rootScope')
38+
bard.inject(this, '$controller', '$rootScope', '$q')
3439

3540
scope = $rootScope.$new()
3641
})
@@ -59,7 +64,7 @@ describe('Submit Design Files Controller', function() {
5964
challengeToSubmitTo: {
6065
challenge: {
6166
name: 'Challenge Name',
62-
track: 'DEVELOP',
67+
track: 'DESIGN',
6368
id: 30049240
6469
}
6570
},
@@ -127,7 +132,7 @@ describe('Submit Design Files Controller', function() {
127132
})
128133
})
129134

130-
describe.skip('uploadSubmission', function() {
135+
describe('uploadSubmission', function() {
131136
it('adds comments to the submissions body', function() {
132137
vm.comments = 'test comments'
133138
scope.$digest()
@@ -149,7 +154,7 @@ describe('Submit Design Files Controller', function() {
149154
})
150155

151156
it('calls the submission service', function() {
152-
var mockAPICall = sinon.spy(submissionsService, 'getPresignedURL')
157+
var mockAPICall = sinon.spy(submissionsService, 'startSubmission')
153158

154159
vm.uploadSubmission()
155160
scope.$digest()

app/submissions/submit-develop-files/submit-develop-files.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*eslint no-undef:0*/
2-
describe.skip('Submit Develop Files Controller', function() {
2+
describe('Submit Develop Files Controller', function() {
33
var controller, vm, scope
44

55
var mockChallenge = {
@@ -59,7 +59,7 @@ describe.skip('Submit Develop Files Controller', function() {
5959
challengeToSubmitTo: {
6060
challenge: {
6161
name: 'Challenge Name',
62-
track: 'DESIGN',
62+
track: 'DEVELOP',
6363
id: 30049240
6464
}
6565
},

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"scripts": {
55
"build": "webpack --bail --progress --build --tc",
66
"start": "webpack-dev-server --history-api-fallback --host 0.0.0.0 --dev --tc --inline --progress --port 3000",
7-
"lint": "eslint --ignore-path .gitignore .",
7+
"lint": "eslint .",
88
"test": "karma start --tc --test"
99
},
1010
"devDependencies": {

webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const config = require('appirio-tech-webpack-config')({
2929
favicon: './assets/images/favicon.ico',
3030
uglifyOptions: {
3131
mangle: { except: ['Auth0'] }
32-
}
32+
}
3333
})
3434

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

0 commit comments

Comments
 (0)