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

Commit 782c2ed

Browse files
author
vikasrohit
authored
Merge pull request #74 from topcoder-platform/dev
Promoting changes to production
2 parents b1ceb4d + 68afa64 commit 782c2ed

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

src/common/constants.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,10 @@ module.exports = {
150150
created: {
151151
title: 'Your project has been created, and we\'re ready for your specification',
152152
content: data => `Hello, Coder here! Your project '${data.projectName}' has been created successfully. For your next step, please head over to the <a href="${data.projectUrl}specification/" rel="nofollow">Specification</a> section and answer all of the required questions. If you already have a document with your requirements, just verify it against our checklist and then upload it. Once you're done, hit the "Submit for Review" button on the Specification. Get stuck or need help? Email us at <a href="mailto:support@topcoder.com?subject=Question%20Regarding%20My%20New%20Topcoder%20Connect%20Project" rel="nofollow">support@topcoder.com</a>.`,
153-
disabled: true,
154153
},
155154
submittedForReview: {
156-
title: 'Your project is being reviewed. Provide additional info if you have it.',
157-
content: data => `Hello, Coder here! Thanks for submitting your project <a href="${data.projectUrl}" rel="nofollow">${data.projectName}</a>! I've used my super computational powers to route it to one of our trusty humans. They'll get back to you in 1-2 business days. Meanwhile, if have any additional project information or documents to upload, please head over to the <a href="${data.projectUrl}specification/" rel="nofollow">Specification</a> section. Get stuck or need help? Email us at <a href="mailto:support@topcoder.com?subject=Question%20Regarding%20My%20New%20Topcoder%20Connect%20Project" rel="nofollow">support@topcoder.com</a>.`,
155+
title: 'Your project has been submitted for review',
156+
content: data => `Hello, it's Coder again. Thanks for submitting your project <a href="${data.projectUrl}" rel="nofollow">${data.projectName}</a>! I've used my super computational powers to route it to one of our trusty humans. They'll get back to you in 1-2 business days.`,
158157
},
159158
activated: {
160159
title: 'Work on your project has begun',

src/test/app.test.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,10 +237,14 @@ describe('app', () => {
237237
});
238238

239239
describe('`project.draft-created` event', () => {
240-
it('should not create `Project.Created` notification as it is disabled now', (done) => {
240+
it('should create `Project.Created` notification', (done) => {
241241
sendTestEvent(sampleEvents.draftCreated, 'project.draft-created');
242242
setTimeout(() => {
243-
sinon.assert.notCalled(spy);
243+
const expectedTitle = 'Your project has been created, and we\'re ready for your specification';
244+
const expectedBody = 'Hello, Coder here! Your project \'test\' has been created successfully. For your next step, please head over to the <a href="https://connect.topcoder-dev.com/projects/1/specification/" rel="nofollow">Specification</a> section and answer all of the required questions. If you already have a document with your requirements, just verify it against our checklist and then upload it. Once you\'re done, hit the "Submit for Review" button on the Specification. Get stuck or need help? Email us at <a href="mailto:support@topcoder.com?subject=Question%20Regarding%20My%20New%20Topcoder%20Connect%20Project" rel="nofollow">support@topcoder.com</a>.';
245+
const params = spy.lastCall.args;
246+
assert.equal(params[2], expectedTitle);
247+
assert.equal(params[3], expectedBody);
244248
done();
245249
}, testTimeout);
246250
});
@@ -258,8 +262,8 @@ describe('app', () => {
258262
sendTestEvent(sampleEvents.updatedInReview, 'project.updated');
259263
setTimeout(() => {
260264
assertCount += 1;
261-
const expectedTitle = 'Your project is being reviewed. Provide additional info if you have it.';
262-
const expectedBody = 'Hello, Coder here! Thanks for submitting your project <a href="https://connect.topcoder-dev.com/projects/1/" rel="nofollow">test</a>! I\'ve used my super computational powers to route it to one of our trusty humans. They\'ll get back to you in 1-2 business days. Meanwhile, if have any additional project information or documents to upload, please head over to the <a href="https://connect.topcoder-dev.com/projects/1/specification/" rel="nofollow">Specification</a> section. Get stuck or need help? Email us at <a href="mailto:support@topcoder.com?subject=Question%20Regarding%20My%20New%20Topcoder%20Connect%20Project" rel="nofollow">support@topcoder.com</a>.';
265+
const expectedTitle = 'Your project has been submitted for review';
266+
const expectedBody = 'Hello, it\'s Coder again. Thanks for submitting your project <a href="https://connect.topcoder-dev.com/projects/1/" rel="nofollow">test</a>! I\'ve used my super computational powers to route it to one of our trusty humans. They\'ll get back to you in 1-2 business days.';
263267
let params = spy.lastCall.args;
264268
assert.equal(params[2], expectedTitle);
265269
assert.equal(params[3], expectedBody);

0 commit comments

Comments
 (0)