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

Commit 797741f

Browse files
authored
Merge pull request #866 from appirio-tech/qa-integration
Patch release (P0 and few minor fixes)
2 parents 8561df7 + a5f38dc commit 797741f

File tree

5 files changed

+17
-8
lines changed

5 files changed

+17
-8
lines changed

app/services/jwtInterceptor.service.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ import { isTokenExpired, getFreshToken } from 'tc-accounts'
2727
.catch(function(err) {
2828
// Server will not or cannot refresh token
2929
logger.debug('Unable to refresh V3 token, redirecting to login')
30-
var retUrl = CONSTANTS.MAIN_URL + '/?next=' + config.url
31-
$window.location = CONSTANTS.ACCOUNTS_APP_URL + '?retUrl=' + encodeURIComponent(retUrl)
30+
var next = $state.href('dashboard', {}, {absolute: true})
31+
$window.location = CONSTANTS.ACCOUNTS_APP_URL + '?retUrl=' + encodeURIComponent(next)
3232

3333
return null
3434
})
@@ -83,8 +83,8 @@ import { isTokenExpired, getFreshToken } from 'tc-accounts'
8383
// logger.debug('idToken: ' + idToken)
8484
if (!TcAuthService.isAuthenticated() || idToken == null) {
8585
// logger.debug('redirecting to accounts app')
86-
var retUrl = CONSTANTS.MAIN_URL + '/?next=' + config.url
87-
$window.location = CONSTANTS.ACCOUNTS_APP_URL + '?retUrl=' + encodeURIComponent(retUrl)
86+
var next = $state.href('dashboard', {}, {absolute: true})
87+
$window.location = CONSTANTS.ACCOUNTS_APP_URL + '?retUrl=' + encodeURIComponent(next)
8888
return
8989
}
9090

app/services/jwtInterceptor.service.spec.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ describe('JWT Interceptor Service', function() {
2727
fakeState = {
2828
go: sinon.spy(function(param) {
2929
return
30+
}),
31+
href: sinon.spy(function(stateName, toParams, params) {
32+
return 'https://topcoder.com/' + stateName
3033
})
3134
},
3235
fakeWindow = {
@@ -84,6 +87,7 @@ describe('JWT Interceptor Service', function() {
8487
expect($window.location).not.null
8588
expect($window.location).to.have.string(CONSTANTS.ACCOUNTS_APP_URL)
8689
expect(TcAuthService.isAuthenticated).to.be.have.been.calledOnce
90+
expect(fakeState.href).to.be.calledWith('dashboard')
8791
})
8892

8993
it('should redirect to login page for other endpoints', function() {
@@ -95,6 +99,7 @@ describe('JWT Interceptor Service', function() {
9599
expect($window.location).not.null
96100
expect($window.location).to.have.string(CONSTANTS.ACCOUNTS_APP_URL)
97101
expect(TcAuthService.isAuthenticated).to.be.have.been.calledOnce
102+
expect(fakeState.href).to.be.calledWith('dashboard')
98103
})
99104

100105
afterEach(function() {

app/services/tcAuth.service.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import { getCurrentUser, logout as doLogout } from './userv3.service.js'
2525
}
2626

2727
function isAuthenticated() {
28-
return !!getCurrentUser() && !!AuthTokenService.getV2Token() && !!AuthTokenService.getTCSSOToken()
28+
return !!getCurrentUser()
2929
}
3030

3131
}

app/submissions/submit-design-files/submit-design-files.jade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
.form-block__text
2020
p Please follow the instructions on the Challenge Details page regarding what your submission, source, and preview files should contain.
2121

22-
p Do not name any of your files "declaration.txt", as this is added by our system.
22+
p Do not name any of your files "declaration.txt," as this is added by our system.
2323

2424
p Please be sure to double-check that you have submitted the correct files and that your JPG files (if applicable) are in RGB color mode.
2525

assets/css/layout/footer.scss

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@
3434

3535

3636
@media only screen and (max-width : 1024px) {
37-
.bottom-footer, .fold-pusher {
37+
// removed fold-pusher from the rule to remove white space
38+
// .bottom-footer, .fold-pusher {
39+
.bottom-footer {
3840
height: 200px;
3941
}
4042
.bottom-footer .menu-item {
@@ -87,7 +89,9 @@
8789
}
8890

8991
@media only screen and (min-width : 1025px) {
90-
.bottom-footer, .fold-pusher {
92+
// removed fold-pusher from the rule to remove white space
93+
// .bottom-footer, .fold-pusher {
94+
.bottom-footer {
9195
height: 270px;
9296
}
9397
.bottom-footer {

0 commit comments

Comments
 (0)