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

Commit 7ccc6c9

Browse files
committed
Merge pull request #743 from appirio-tech/qa-integration
Qa integration
2 parents 3a87a99 + 9d3eb3e commit 7ccc6c9

File tree

19 files changed

+92
-211
lines changed

19 files changed

+92
-211
lines changed

.eslintignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

app/community/members.controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import angular from 'angular'
1212
ctrl.notSearch = true
1313
ctrl.showing = 'list'
1414
ctrl.domain = CONSTANTS.domain
15-
ctrl.currentMonth = 'January 2016'
15+
ctrl.currentMonth = 'February 2016'
1616
ctrl.memberLeaderboard = []
1717
ctrl.copilots = []
1818
CommunityDataService.getMembersData()

app/directives/external-account/external-account.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ describe('External Accounts Directive', function() {
121121
scope.linkedAccounts = null
122122
scope.$digest()
123123
expect(element.isolateScope().accountList).to.have.length(7)
124-
expect(_.all(_.pluck(element.isolateScope().accountList, 'status'))).to.be.false
124+
expect(_.every(_.map(element.isolateScope().accountList, 'status'))).to.be.false
125125
})
126126

127127
it('should link external account ', function() {

app/directives/page-state-header/page-state-header.directive.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ import _ from 'lodash'
9595
function displayMoneyEarned(handle) {
9696
ProfileService.getUserFinancials(handle)
9797
.then(function(financials) {
98-
vm.moneyEarned = _.sum(_.pluck(financials, 'amount'))
98+
vm.moneyEarned = _.sum(_.map(financials, 'amount'))
9999

100100
if (!vm.moneyEarned) {
101101
$scope.hideMoney = true

app/my-challenges/my-challenges.controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ import _ from 'lodash'
8181
.then(function(data) {
8282
// data should be an array of 2 objects each with it's own array (2D array with metadata)
8383

84-
vm.totalCount = _.sum(_.pluck(data, 'metadata.totalCount'))
84+
vm.totalCount = _.sum(_.map(data, 'metadata.totalCount'))
8585
vm.myChallenges = vm.myChallenges.concat(_.union(data[0], data[1]))
8686
if (vm.totalCount === 0) {
8787
_checkForParticipation().then(function() {

app/profile/subtrack/subtrack.controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ import _ from 'lodash'
8585
var mustHaveMetrics = ['rank', 'rating', 'reliability']
8686
// check if rating, rank & reliability are all set
8787
var _filteredObjs = _.filter(vm.subTrackStats, function(k) { return _.indexOf(mustHaveMetrics, k.label) > -1})
88-
if (_.all(_.pluck(_filteredObjs, 'val'), function(v) { return !v})) {
88+
if (_.every(_.map(_filteredObjs, 'val'), function(v) { return !v})) {
8989
// all false filter em out
9090
_.remove(vm.subTrackStats, function(k) { return _.indexOf(mustHaveMetrics, k.label) > -1})
9191
}

app/services/communityData.service.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,29 +21,29 @@ import angular from 'angular'
2121
var data = {
2222
'memberLeaderboard': [
2323
{
24-
'avatar': '//www.topcoder.com/wp-content/uploads/2015/05/f0rc0d3r_jan2016.png',
25-
'name': 'f0rc0d3r',
24+
'avatar': '//www.topcoder.com/wp-content/uploads/2015/05/tewibowo_feb2016.png',
25+
'name': 'Tewibowo',
2626
'contestType': 'Design',
27-
'description': 'Three first place wins in design totalling $4500',
27+
'description': 'Won $4,175 in 6 challenges',
2828
'class': 'design'
2929
}, {
30-
'avatar': '//www.topcoder.com/wp-content/uploads/2015/05/vvvpig_jan2016.png',
31-
'name': 'vvvpig',
30+
'avatar': '//www.topcoder.com/wp-content/uploads/2015/05/billsedison_feb2016.png',
31+
'name': 'billsedison',
3232
'contestType': 'Development',
33-
'description': 'Eight first place wins in design totalling $9300',
33+
'description': 'Four wins for $4,500',
3434
'class': 'develop'
3535
}, {
36-
'avatar': '//www.topcoder.com/wp-content/uploads/2015/05/grumpy_gordon_jan2016.png',
37-
'name': 'grumpy_gordon',
36+
'avatar': '//www.topcoder.com/wp-content/uploads/2015/05/anubhav94_feb2016.png',
37+
'name': 'anubhav94',
3838
'contestType': 'Data Science',
39-
'description': 'Rating increase of 316 pts in Nov SRMs, vaulting into Div 1',
39+
'description': 'Gained 336 rating points within all 3 December SRMs',
4040
'class': 'data-science'
4141
}, {
42-
'avatar': '//www.topcoder.com/wp-content/uploads/2015/05/thomaskranitsas_jan2016.png',
43-
'name': 'thomaskranitsas',
44-
'contestType': 'Development Rookie',
45-
'description': 'Won first place in his first two challenges!',
46-
'class': 'develop'
42+
'avatar': '//www.topcoder.com/wp-content/uploads/2015/05/johnalok_feb2016.png',
43+
'name': 'johnalok',
44+
'contestType': 'Design Rookie',
45+
'description': 'Won first place within 2 weeks of joining!',
46+
'class': 'design'
4747
}
4848
],
4949
'copilots': [{

app/services/externalAccounts.service.spec.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ describe('ExternalAccount Service', function() {
1212
var auth0, userService
1313
var profileGet, profilePost, profileDelete
1414

15-
1615
beforeEach(function() {
1716
bard.appModule('topcoder')
1817
bard.inject(this, 'ExternalAccountService', '$httpBackend', '$q', 'CONSTANTS', 'JwtInterceptorService', 'auth', 'UserService')
@@ -91,8 +90,8 @@ describe('ExternalAccount Service', function() {
9190
// spy
9291
service.getAllExternalLinks('test1', 111, false).then(function(data) {
9392
expect(data).to.be.defined
94-
expect(_.pluck(data, 'provider')).to.include.members(['dribbble', 'github','bitbucket', 'stackoverflow'])
95-
expect(_.all(_.pluck(data, 'data'))).to.be.truthy
93+
expect(_.map(data, 'provider')).to.include.members(['dribbble', 'github','bitbucket', 'stackoverflow'])
94+
expect(_.every(_.map(data, 'data'))).to.be.truthy
9695
})
9796
$httpBackend.flush()
9897
})
@@ -101,7 +100,7 @@ describe('ExternalAccount Service', function() {
101100
// spy
102101
service.getAllExternalLinks('test1', 111, true).then(function(data) {
103102
expect(data).to.be.defined
104-
expect(_.pluck(data, 'provider')).to.include.members(['dribbble', 'github', 'behance', 'bitbucket','stackoverflow'])
103+
expect(_.map(data, 'provider')).to.include.members(['dribbble', 'github', 'behance', 'bitbucket','stackoverflow'])
105104
expect(data).to.have.length(5)
106105
var nullAccounts = _.remove(data, function(n) {return n.data.status === 'PENDING'})
107106
expect(nullAccounts).to.have.length(1)
@@ -116,8 +115,8 @@ describe('ExternalAccount Service', function() {
116115
// spy
117116
service.getAllExternalLinks('test1', 111, true).then(function(data) {
118117
expect(data).to.be.defined
119-
expect(_.pluck(data, 'provider')).to.include.members(['dribbble', 'github','bitbucket', 'stackoverflow'])
120-
expect(_.all(_.pluck(data, 'data'))).to.be.truthy
118+
expect(_.map(data, 'provider')).to.include.members(['dribbble', 'github','bitbucket', 'stackoverflow'])
119+
expect(_.every(_.map(data, 'data'))).to.be.truthy
121120
})
122121
$httpBackend.flush()
123122
})

app/services/externalLinks.service.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ import _ from 'lodash'
3434
})
3535
}
3636
// add provider type as weblink
37-
links = _(links).forEach(function(l) {
38-
l.provider = 'weblink'
39-
if (l.synchronizedAt === 0) {
40-
l.status = 'PENDING'
37+
links.forEach(function(l, i, array) {
38+
array[i].provider = 'weblink'
39+
if (array[i].synchronizedAt === 0) {
40+
array[i].status = 'PENDING'
4141
}
42-
}).value()
42+
})
4343
return links
4444
})
4545
}

app/services/introduction.service.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,21 +41,21 @@ import _ from 'lodash'
4141
var handleInParams = $stateParams.userHandle ? $stateParams.userHandle.toLowerCase() : null
4242
var userIntroJSStats = store.get(userId)
4343

44-
if (!userIntroJSStats.dashboardIntroComplete && _.contains(currentPage, 'dashboard')) {
44+
if (!userIntroJSStats.dashboardIntroComplete && _.includes(currentPage, 'dashboard')) {
4545
userIntroJSStats.dashboardIntroComplete = true
4646
store.set(userId, userIntroJSStats)
4747

4848
return getIntroData(currentPage)
4949
}
5050

51-
if (!userIntroJSStats.profileAboutIntroComplete && _.contains(currentPage, 'profile.about') && userHandle === handleInParams) {
51+
if (!userIntroJSStats.profileAboutIntroComplete && _.includes(currentPage, 'profile.about') && userHandle === handleInParams) {
5252
userIntroJSStats.profileAboutIntroComplete = true
5353
store.set(userId, userIntroJSStats)
5454

5555
return getIntroData(currentPage)
5656
}
5757

58-
if (!userIntroJSStats.profileSubtrackIntroComplete && _.contains(currentPage, 'profile.subtrack') && userHandle === handleInParams && $stateParams.subTrack.toLowerCase() !== 'copilot') {
58+
if (!userIntroJSStats.profileSubtrackIntroComplete && _.includes(currentPage, 'profile.subtrack') && userHandle === handleInParams && $stateParams.subTrack.toLowerCase() !== 'copilot') {
5959
userIntroJSStats.profileSubtrackIntroComplete = true
6060
store.set(userId, userIntroJSStats)
6161

0 commit comments

Comments
 (0)