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

Qa integration #692

Merged
merged 65 commits into from
Jan 26, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
35d91d7
Fixed error in running badges-tooltip and toggle-password directives …
Dec 31, 2015
36eeffa
Unit tests for getSocialUserData and getPageTitle methods
Dec 31, 2015
d90c5f9
Unit tests for getParameterByName, storeById, parseQuestions and pars…
Jan 4, 2016
ef38f7c
Unit tests for compileReviewItems, npad, setupLoginEventMetrics and g…
Jan 6, 2016
646c004
Add spec file
Jan 14, 2016
e8bf8df
Merge branch 'dev' into SUP-2936-tc-input-tests
Jan 14, 2016
03f3d42
Add unit tests for tc-input, remove random debugger in code
Jan 15, 2016
b6640a7
Merge pull request #663 from appirio-tech/SUP-2936-tc-input-tests
nlitwin Jan 15, 2016
c310e68
Add unit tests for tc-form-stockart
Jan 15, 2016
ec599bd
Add tests for tc-form-fonts
Jan 15, 2016
df7e3b8
Merge commit 'b6640a782b11dcb3aeef9f96e2fe8c7d745956ac' into HEAD
Jan 15, 2016
6b4dbde
Merge pull request #664 from appirio-tech/SUP-2964-tc-font-stockart-t…
nlitwin Jan 15, 2016
1a83d65
Add spec file for tc-file-input
Jan 16, 2016
26ee43d
Merge commit '6b4dbdedce183e096e2d1b334f69828da3ae3d93' into HEAD
Jan 16, 2016
f8cd7ff
SUP-2412, [Usersnap] For all contests, almost all of the types at th…
Jan 18, 2016
aeeee4c
SUP-2994, My Challenges | | Empty page when loading past challenges
Jan 18, 2016
b329d47
Merge pull request #668 from appirio-tech/techdebt/unittests-for-serv…
Jan 18, 2016
8bcf316
Merge pull request #667 from appirio-tech/techdebt/unittests-for-dire…
Jan 18, 2016
2d90cc1
Merge branch 'dev' into SUP-2935-tc-file-tests
Jan 18, 2016
8a7391b
Add tests for tc-file-input
Jan 18, 2016
58d35bd
Merge pull request #669 from appirio-tech/SUP-2935-tc-file-tests
nlitwin Jan 18, 2016
efc71c4
Add unit tests for both submissions controllers
Jan 18, 2016
d092b4e
Update specs.html
Jan 18, 2016
1cc0149
Merge pull request #670 from appirio-tech/SUP-2996-controller-tests
nlitwin Jan 18, 2016
10a8504
Merge commit '1cc0149451c1a0011063fb202744869664ca5da4' into HEAD
Jan 18, 2016
0232e7e
Merge branch 'dev' into feature/sup-2412-challenge-title-visiblity
Jan 19, 2016
da0ceef
Merge pull request #665 from appirio-tech/feature/sup-2994-empty-page…
Jan 19, 2016
15f3333
Merge branch 'dev' into feature/sup-2412-challenge-title-visiblity
Jan 19, 2016
8bbc10d
SUP-2412, [Usersnap] For all contests, almost all of the types at th…
Jan 19, 2016
a98a314
Merge pull request #666 from appirio-tech/feature/sup-2412-challenge-…
Jan 19, 2016
1fe036f
Make textarea and file input plus buttons 500px
Jan 19, 2016
927cdf6
Merge pull request #671 from appirio-tech/SUP-2956-css-polishing
nlitwin Jan 19, 2016
6661006
Merge commit '927cdf6c6c230b3ca5e82d42e568723afbe205cf' into HEAD
Jan 19, 2016
849f3b4
CSS updates
Jan 20, 2016
d2e6087
Merge pull request #678 from appirio-tech/SUP-2946-column-layout
nlitwin Jan 20, 2016
0be398a
SUP-2990, Usersnap - Can't change country to Republic of Korea
Jan 20, 2016
8c03bfa
SUP-2961, Dashboard: Active challenges not showing on dashboard after…
Jan 20, 2016
77fe76c
Merge pull request #680 from appirio-tech/feature/sup-2961-blank-my-c…
Jan 20, 2016
9948a67
Fix styles for login buttons in header
Jan 20, 2016
f34254c
Merge pull request #681 from appirio-tech/SUP-2263-login-button-styles
nlitwin Jan 20, 2016
b226de8
Show assembly instead of assembly competition
Jan 20, 2016
8d50cf4
Merge pull request #682 from appirio-tech/SUP-2394-assembly
nlitwin Jan 20, 2016
55499c1
Add new page for successful submission
Jan 20, 2016
3398e5a
Merge commit '8d50cf48dc96bc30df78a0fb7fcd972390a61792' into HEAD
Jan 20, 2016
f392720
Merge pull request #679 from appirio-tech/feature/sup-2990-error-with…
Jan 21, 2016
fa86701
SUP-3005, Update Dec '15 Members of the Month
Jan 21, 2016
0dfd60e
Merge pull request #683 from appirio-tech/feature/sup-3005-update-dec…
Jan 21, 2016
ade537b
Add buttons when upload is complete and change routes to handle diffe…
Jan 22, 2016
2f76a06
Trying to fix the unit tests error appearing in qa-merge branch.
Jan 22, 2016
5360982
Merge pull request #685 from appirio-tech/feature/vikas-submission-fo…
Jan 22, 2016
123d198
Merge commit '53609821817117752f5100c5b7fbf36a154b2b22' into HEAD
Jan 22, 2016
ed4e179
SUP-2412, [Usersnap] For all contests, almost all of the types at th…
Jan 22, 2016
8ff60da
Merge pull request #686 from appirio-tech/feature/sup-2412-challenge-…
Jan 22, 2016
1cd8025
Merge branch 'dev' into SUP-3006-upload-complete
Jan 22, 2016
b3639fb
Added unit tests for new functionality
Jan 22, 2016
72183f9
Merge pull request #687 from appirio-tech/SUP-3006-upload-complete
nlitwin Jan 22, 2016
3075193
Add clarity
nlitwin Jan 22, 2016
c03beb7
Merge commit '30751934f3ed42a1217842bf16652b357a3ea9c8' into HEAD
Jan 22, 2016
132c8f4
Add develop submission pages
Jan 23, 2016
3a73377
SUP-3014, [Profile] Issues with card alignment
Jan 25, 2016
b905bc0
Merge pull request #688 from appirio-tech/feature/sup-3014-card-align…
Jan 26, 2016
00ed688
Merge pull request #689 from appirio-tech/develop-submission
nlitwin Jan 26, 2016
661f7a0
Add error messages for all cases
Jan 26, 2016
6aaef07
Merge pull request #690 from appirio-tech/SUP-3017-error-page
nlitwin Jan 26, 2016
e8583aa
Merge pull request #691 from appirio-tech/dev
nlitwin Jan 26, 2016
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
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ Spec files live alongside the code they are testing. For example, in peer-review
## UI-Router and States
See any *.routes.js file as an example.

**Important:** Make sure the url in your routes files ends with a slash `/`

## Contributing

### Style Guide and Naming Conventions
Expand All @@ -78,9 +80,9 @@ Jade Files
```
.wrapper
h1 Lorem ipsum

p Sibling tag

.wrapper2
p Child
```
Expand All @@ -99,7 +101,7 @@ SCSS Files
height: 100px;
width: 100px;
}

.inside-box {
font-size: 14px;
@media screen and (min-width: 768px) {
Expand Down
2 changes: 1 addition & 1 deletion app/community/members.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
ctrl.notSearch = true;
ctrl.showing = 'list';
ctrl.domain = CONSTANTS.domain;
ctrl.currentMonth = 'November 2015';
ctrl.currentMonth = 'December 2015';
ctrl.memberLeaderboard = [];
ctrl.copilots = [];
CommunityDataService.getMembersData()
Expand Down
17 changes: 15 additions & 2 deletions app/directives/badges/badge-tooltip.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ describe('Badge Tooltip Directive', function() {
var spotlightChallenge = mockData.getMockSpotlightChallenges()[0];

beforeEach(function() {
bard.appModule('tcUIComponents');
bard.appModule('topcoder');
bard.inject(this, '$compile', '$rootScope');
scope = $rootScope.$new();
});

bard.verifyNoOutstandingHttpRequests();

xdescribe('Badge Tooltip', function() {
describe('Badge Tooltip', function() {
var tooltip;

beforeEach(function() {
Expand Down Expand Up @@ -89,5 +89,18 @@ describe('Badge Tooltip Directive', function() {
expect(dataDiv).not.to.null;
expect(dataDiv.hasClass('ng-hide')).to.equal(true);
});

it('should trigger mouseenter handler ', function() {
tooltip.trigger('mouseenter');
var tooltipElement = tooltip.children(0);
expect(tooltipElement.css('z-index')).to.equal('2000');
expect(tooltip.isolateScope().hide).to.equal(false);
});

it('should trigger mouseleave handler ', function() {
tooltip.trigger('mouseleave');
tooltipElement = tooltip.children(0);
expect(tooltip.isolateScope().hide).to.equal(true);
});
});
});
91 changes: 42 additions & 49 deletions app/directives/challenge-tile/challenge-tile.directive.jade
Original file line number Diff line number Diff line change
Expand Up @@ -2,80 +2,75 @@
.active-challenge(ng-show="challenge.status === 'ACTIVE'")

header
.top
a.name(ng-href="{{challenge|challengeLinks:'detail'}}") #[span {{challenge.name}}]
a.name(ng-href="{{challenge|challengeLinks:'detail'}}", title="{{challenge.name}}") #[span {{challenge.name}}]

.challenge-track

p.subtrack-color {{challenge.subTrack | underscoreStrip}}
p.subtrack-color {{challenge.subTrack | underscoreStrip}}

challenge-links(challenge="challenge", view="'tile'")
.challenge-card__bottom.challenge-card__bottom--active
.challenge-details
p.currentPhase {{challenge.userCurrentPhase}}

.challenge-details
p.currentPhase {{challenge.userCurrentPhase}}

.challenge-calendar(ng-show="challenge.userCurrentPhaseEndTime")
p.ends-in Ends In
p.time-remaining {{challenge.userCurrentPhaseEndTime[0]}}
p.unit-of-time {{challenge.userCurrentPhaseEndTime[1]}}
.challenge-calendar(ng-show="challenge.userCurrentPhaseEndTime")
p.ends-in Ends In
p.time-remaining {{challenge.userCurrentPhaseEndTime[0]}}
p.unit-of-time {{challenge.userCurrentPhaseEndTime[1]}}

.stalled-challenge(ng-hide="challenge.userCurrentPhaseEndTime") This challenge is currently paused.
.stalled-challenge(ng-hide="challenge.userCurrentPhaseEndTime") This challenge is currently paused.

.phase-action(ng-switch="challenge.userAction")
a.tc-btn.tc-btn-s.tc-btn-wide.tc-btn-ghost.submit(ng-switch-when="Submit", ng-href="{{challenge|challengeLinks:'detail'}}") Submit
.phase-action(ng-show="challenge.userAction", ng-switch="challenge.userAction")
a.tc-btn.tc-btn-s.tc-btn-wide.tc-btn-ghost.submit(ng-switch-when="Submit", ng-href="{{challenge|challengeLinks:'detail'}}") Submit

.submitted(ng-switch-when="Submitted") Submitted
.submitted(ng-switch-when="Submitted") Submitted

// TODO: Need styling and JS logic for this one
.registered(ng-switch-when="Registered") Registered
// TODO: Need styling and JS logic for this one
.registered(ng-switch-when="Registered") Registered

// Only show if not data science track
p.roles
span(ng-hide="challenge.track === 'DATA_SCIENCE'")
span Role:  
span {{challenge.userDetails.roles | listRoles}}
// Only show if not data science track
p.roles
span(ng-hide="challenge.track === 'DATA_SCIENCE'")
span Role:  
span {{challenge.userDetails.roles | listRoles}}

.completed-challenge(
ng-show="challenge.status === 'COMPLETED' || challenge.status === 'PAST'",
ng-switch="challenge.track")
.challenge-track

header
.top
a.name(ng-href="{{challenge|challengeLinks:'detail'}}") {{challenge.name}}
a.name(ng-href="{{challenge|challengeLinks:'detail'}}", title="{{challenge.name}}") {{challenge.name}}

p.subtrack-color {{challenge.subTrack | underscoreStrip}}
p.subtrack-color {{challenge.subTrack | underscoreStrip}}

p.date-completed {{challenge.submissionEndDate | date : 'MMMM yyyy'}}

.winner-ribbon(ng-show="challenge.wonFirst")

.challenge-details(ng-switch-when="DATA_SCIENCE", ng-switch="challenge.subTrack", ng-class="challenge.track")
.challenge-card__bottom.challenge-card__bottom--completed
.challenge-details(ng-switch-when="DATA_SCIENCE", ng-switch="challenge.subTrack", ng-class="challenge.track")

div
.marathon-score
p.score {{challenge.pointTotal || 0 }}
div
.marathon-score
p.score {{challenge.pointTotal || 0 }}

p Total Points
p Total Points

.challenge-details(ng-switch-when="DEVELOP")
dev-challenge-user-place(challenge="challenge", view="view")
.challenge-details(ng-switch-when="DEVELOP")
dev-challenge-user-place(challenge="challenge", view="view")

.challenge-details(ng-switch-when="DESIGN")
design-challenge-user-place(challenge="challenge", view="view")
.challenge-details(ng-switch-when="DESIGN")
design-challenge-user-place(challenge="challenge", view="view")

// Only show if not data science track
p.roles
span(ng-hide="challenge.track === 'DATA_SCIENCE'")
span Role:  
span {{challenge.userDetails.roles | listRoles}}
// Only show if not data science track
p.roles
span(ng-hide="challenge.track === 'DATA_SCIENCE'")
span Role:  
span {{challenge.userDetails.roles | listRoles}}

.challenge.list-view(ng-show="view=='list'", ng-class="challenge.track")
.active-challenge(ng-show="challenge.status === 'ACTIVE'")
.challenge-track

header
a.name(ng-href="{{challenge|challengeLinks:'detail'}}") {{challenge.name}}
a.name(ng-href="{{challenge|challengeLinks:'detail'}}", title="{{challenge.name}}") {{challenge.name}}

p.subtrack-color {{challenge.subTrack | underscoreStrip}}

Expand All @@ -102,22 +97,20 @@
.completed-challenge(
ng-show="challenge.status === 'COMPLETED' || challenge.status === 'PAST'",
ng-switch="challenge.track")
.challenge-track

header
a.name(ng-href="{{challenge|challengeLinks:'detail'}}") {{challenge.name}}
a.name(ng-href="{{challenge|challengeLinks:'detail'}}", title="{{challenge.name}}") {{challenge.name}}

p.subtrack-color {{challenge.subTrack | underscoreStrip}}

p.roles(ng-hide="challenge.track === 'DATA_SCIENCE'") #[span Role: ] #[span {{challenge.userDetails.roles | listRoles}}]

.challenge-details(ng-switch-when="DATA_SCIENCE", ng-switch="challenge.subTrack", ng-class="challenge.track")

div
.marathon-score
p.score {{challenge.pointTotal || 0 }}
.marathon-score
p.score {{challenge.pointTotal || 0 }}

p Total Points
p Total Points

.challenge-details(ng-switch-when="DEVELOP")
dev-challenge-user-place(challenge="challenge", view="view")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
p.place(ng-show="challenge.userStatus === 'PASSED_SCREENING'") Passed Screening
p.place(ng-show="challenge.userStatus === 'COMPLETED'") COMPLETED

.challenge-score(ng-class="{hidden: challenge.userStatus !== 'PASSED_REVIEW'}")
.challenge-score(ng-hide="challenge.userStatus !== 'PASSED_REVIEW'")
p.score {{challenge.userDetails.submissionReviewScore/100 | percentage}}

p Review Score
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
angular.module('tcUIComponents').directive('pageStateHeader', function() {
return {
restrict: 'E',
templateUrl: 'directives/page-state-header/page-state-header.directive.html',
templateUrl: 'directives/page-state-header/page-state-header.html',
transclude: true,
scope: {
handle: '@',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.page-state-header
header
.page-info
h1 {{pageTitle}}
h1 {{pageTitle | track}}

div(ng-transclude)

Expand Down
4 changes: 2 additions & 2 deletions app/directives/tc-file-input/tc-file-input.directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
var fileInput = $(element[0]).find('.none');
var fileNameInput = $(element[0]).find('input[type=text]');

fileInput.bind('change', function() {
var file = fileInput[0].files[0];
fileInput.bind('change', function(event) {
var file = event.target.files[0];

// About 1 in 20 times, the file is undefined (must be race condition)
// Return early in this case so no errors are thrown
Expand Down
7 changes: 4 additions & 3 deletions app/directives/tc-file-input/tc-file-input.jade
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
label.tc-label {{labelText}}
span.lowercase(ng-if="showFileType") {{ ' *(.' + fileType + ')'}}

span.tc-label__mandatory.lowercase(ng-if="mandatory") #[span *]mandatory

.tc-file-field__inputs
input.tc-file-field__input(type="text", placeholder="{{placeholder}}", disabled)
.tc-label__wrapper
input.tc-file-field__input(type="text", placeholder="{{placeholder}}", disabled)

span.tc-label__asterisk.lowercase(ng-if="mandatory") #[span *]mandatory

button.tc-btn(ng-click="selectFile()") {{buttonText}}

Expand Down
Loading