From 943a68210b7e9ae493fd5bd5a4b6f55bf7636f56 Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Thu, 26 Jan 2017 21:07:22 -0800 Subject: [PATCH] feat(challenges): add backend challenge infrastructure (#11058) * Feat: Initial backend view * Feat: Refactor frame runner * Feat: backend challenge submit runs tests * Feat: Backend challenge request * Feat: Whitelist hyperdev in csp * Fix: Use app tests instead of challenge tests * Feat: Allow hyperdev subdomains * Fix(csp): allow hypderdev.space subdomains * feat(challenge): submit backend * feat: Add timeout to test runner (5 sec) * chore(seed): Add more to test backend * fix(csp): s/hyperdev/gomix/g * fix(app): fix code mirror skeleton filepath * fix(app): remove Gitter saga import * fix(app): codemirrorskeleton does not need it's own folder fix(app): cmk needs to work with Null types * fix: No longer restart the browser when challenges change * fix(app): Update jquery for challenges * fix(seed): Remove to promise jquery call * fix(lint): Undo merge error undefined is no allowed * fix(app): linting errors due to bad merge * fix(seed): Remove old seed file --- .../api-and-microservice-projects.json | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/challenges/05-apis-and-microservices/api-and-microservice-projects.json b/challenges/05-apis-and-microservices/api-and-microservice-projects.json index a556512d14..fe42a870aa 100644 --- a/challenges/05-apis-and-microservices/api-and-microservice-projects.json +++ b/challenges/05-apis-and-microservices/api-and-microservice-projects.json @@ -4,6 +4,29 @@ "time": "150 hours", "helpRoom": "HelpBackend", "challenges": [ + { + "id": "57ed709d334ad35e8fe79acb", + "title": "New Backend Format", + "isBeta": "true", + "meta": "This is just a test", + "description": [ + "This is just a test of the new backend challenge test framework" + ], + "tests": [{ + "text": "website should return 200", + "testString": "getUserInput => $.ajax({ url: getUserInput('url'), method: 'HEAD' }).then(null, (err) => assert.fail(err));" + }, { + "text": "package.json should have a valid \"keywords\" key", + "testString": "getUserInput => ($.get(getUserInput('url') + '/_api/package.json').then(function(data){ var packJson = JSON.parse(data); assert(packJson.keywords); }, err => { throw new Error('Err: ' + err.statusText);}))" + }, { + "text": "\"keywords\" field should be an Array", + "testString": "getUserInput => ($.get(getUserInput('url') + '/_api/package.json').then(function(data){ var packJson = JSON.parse(data); assert.isArray(packJson.keywords); }, err => { throw new Error('Err: ' + err.statusText);}))" + }, { + "text": "\"keywords\" should include \"freecodecamp\"", + "testString": "getUserInput => ($.get(getUserInput('url') + '/_api/package.json').then(function(data){ var packJson = JSON.parse(data); assert.include(packJson.keywords, 'freecodecamp'); }, err => { throw new Error('Err: ' + err.statusText); }))" + }], + "type": "backend" + }, { "id": "bd7158d8c443edefaeb5bdef", "title": "Timestamp Microservice", @@ -261,4 +284,4 @@ } } ] -} \ No newline at end of file +}