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

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

app/services/userStats.service.spec.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,30 +29,30 @@ describe('User Stats Service', function() {
2929
var _data = UserStatsService.getIterableStats('DEVELOP', 'ASSEMBLY_COMPETITION', stats)
3030
expect(_data).to.have.length(6)
3131

32-
expect(_.pluck(_data, 'val')).to.have.members(['1,733', '25', '95%', '16', '10', '80%'])
33-
expect(_.pluck(_data, 'label')).to.have.members(['rating', 'rank', 'percentile', 'challenges', 'wins', 'reliability'])
32+
expect(_.map(_data, 'val')).to.have.members(['1,733', '25', '95%', '16', '10', '80%'])
33+
expect(_.map(_data, 'label')).to.have.members(['rating', 'rank', 'percentile', 'challenges', 'wins', 'reliability'])
3434
})
3535

3636
it('should return stats for design-webdesign ', function() {
3737
var _data = UserStatsService.getIterableStats('DESIGN', 'WEB_DESIGNS', stats)
3838
expect(_data).to.have.length(2)
39-
expect(_.pluck(_data, 'val')).to.have.members(['190','418'])
40-
expect(_.pluck(_data, 'label')).to.have.members(['wins', 'challenges'])
39+
expect(_.map(_data, 'val')).to.have.members(['190','418'])
40+
expect(_.map(_data, 'label')).to.have.members(['wins', 'challenges'])
4141
})
4242

4343
it('should return stats for data-science: srms ', function() {
4444
var _data = UserStatsService.getIterableStats('DATA_SCIENCE', 'SRM', stats)
4545
expect(_data).to.have.length(5)
46-
expect(_.pluck(_data, 'label')).to.have.members(['rating', 'rank', 'percentile', 'competitions', 'volatility'])
47-
expect(_.pluck(_data, 'val')).to.have.members(['799', '6,280', '26%', '10', '473'])
46+
expect(_.map(_data, 'label')).to.have.members(['rating', 'rank', 'percentile', 'competitions', 'volatility'])
47+
expect(_.map(_data, 'val')).to.have.members(['799', '6,280', '26%', '10', '473'])
4848
})
4949

5050

5151
it('should return stats for Copilot ', function() {
5252
var _data = UserStatsService.getIterableStats('COPILOT', 'COPILOT', stats)
5353
expect(_data).to.have.length(5)
54-
expect(_.pluck(_data, 'label')).to.have.members(['active challenges', 'active projects', 'total challenges', 'total projects', 'fulfillment'])
55-
expect(_.pluck(_data, 'val')).to.have.members([0, '1', '24', '3', '84%'])
54+
expect(_.map(_data, 'label')).to.have.members(['active challenges', 'active projects', 'total challenges', 'total projects', 'fulfillment'])
55+
expect(_.map(_data, 'val')).to.have.members([0, '1', '24', '3', '84%'])
5656
})
5757
})
5858

@@ -322,7 +322,7 @@ describe('User Stats Service', function() {
322322
}]
323323
var filtered = UserStatsService.filterStats(toTest)
324324
expect(filtered).to.exist.to.have.length(3)
325-
expect(_.pluck(filtered, 'showStats')).to.have.members([true, true, true])
325+
expect(_.map(filtered, 'showStats')).to.have.members([true, true, true])
326326
})
327327
})
328328

app/settings/edit-profile/edit-profile.controller.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,9 @@ import _ from 'lodash'
155155

156156
function processData(userInfo) {
157157
vm.tracks = {
158-
DESIGN: _.contains(userInfo.tracks, 'DESIGN'),
159-
DEVELOP: _.contains(userInfo.tracks, 'DEVELOP'),
160-
DATA_SCIENCE: _.contains(userInfo.tracks, 'DATA_SCIENCE')
158+
DESIGN: _.includes(userInfo.tracks, 'DESIGN'),
159+
DEVELOP: _.includes(userInfo.tracks, 'DEVELOP'),
160+
DATA_SCIENCE: _.includes(userInfo.tracks, 'DATA_SCIENCE')
161161
}
162162
}
163163

app/skill-picker/skill-picker.controller.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ import _ from 'lodash'
5656
* Verfies if the communities section state has been modified by the user in any way.
5757
*/
5858
function isCommunitiesDirty() {
59-
var community = _.findWhere(vm.communities, {dirty: true})
59+
var community = _.find(vm.communities, {dirty: true})
6060
return !!community
6161
}
6262

@@ -97,7 +97,7 @@ import _ from 'lodash'
9797
vm.loadingCommunities = false
9898
responses.forEach(function(program) {
9999
if (program) {
100-
var community = _.findWhere(vm.communities, {programId: program.eventId})
100+
var community = _.find(vm.communities, {programId: program.eventId})
101101
if (community) {
102102
// set display false to avoid showing already enabled/registered program
103103
// we expect display property to be modified after first load of the page
@@ -111,7 +111,7 @@ import _ from 'lodash'
111111
}
112112
})
113113
// if there exists at least 1 community which can be displayed, set showCommunity flag to true
114-
var community = _.findWhere(vm.communities, {display: true})
114+
var community = _.find(vm.communities, {display: true})
115115
if (community) {
116116
vm.showCommunity = true
117117
}

assets/css/layout/header.scss

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -75,20 +75,6 @@
7575
background-size: contain;
7676
background-repeat: no-repeat;
7777
}
78-
79-
.logo-link:after {
80-
content: 'beta';
81-
display: inline-block;
82-
width: 37px;
83-
height: 18px;
84-
margin-top: 21px;
85-
margin-left: 160px;
86-
padding: 0 1px;
87-
line-height: 19px;
88-
font-size: 10px;
89-
background-color: $gray-lighter;
90-
border-radius: 15px;
91-
}
9278
}
9379

9480
.user-link {
@@ -315,11 +301,6 @@
315301

316302
.top-header {
317303
padding: 0 20px 20px;
318-
319-
.logo-link:after {
320-
margin-top: 21px;
321-
margin-left: -3px;
322-
}
323304
}
324305

325306
.menu-item {

assets/css/submissions/submissions.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,7 @@
5050
margin-left: auto;
5151
margin-right: auto;
5252
}
53+
54+
.icon-arrow {
55+
background-image: url(../../images/ico-arrow-big-left.svg);
56+
}

0 commit comments

Comments
 (0)