fix(learn): tests for python video lessons (#38600)
* fix: improve tests for video challenges * fix: remove unused challenges + get rid of no description warning * fix: remove non-existent challenges from meta
This commit is contained in:
@ -1,7 +1,10 @@
|
||||
const crypto = require('crypto');
|
||||
|
||||
function createChallengeNode(challenge, reporter) {
|
||||
if (typeof challenge.description[0] !== 'string') {
|
||||
if (
|
||||
typeof challenge.description[0] !== 'string' &&
|
||||
challenge.challengeType !== 11
|
||||
) {
|
||||
reporter.warn(`
|
||||
|
||||
${challenge.title} has a description that will break things!
|
||||
|
@ -126,5 +126,9 @@ exports.helpCategory = {
|
||||
'data-analysis-with-python-projects': 'Certification Projects',
|
||||
'machine-learning-with-python': 'Certification Projects',
|
||||
'machine-learning-with-python-projects': 'Certification Projects',
|
||||
'python-for-everybody': 'Python'
|
||||
'python-for-everybody': 'Python',
|
||||
tensorflow: 'Python',
|
||||
'how-neural-networks-work': 'Python',
|
||||
numpy: 'Python',
|
||||
'data-analysis-with-python-course': 'Python'
|
||||
};
|
||||
|
@ -229,34 +229,6 @@
|
||||
[
|
||||
"5e7b9f6a0b6c005b0e76f097",
|
||||
"Viz C"
|
||||
],
|
||||
[
|
||||
"5e7b9f6a0b6c005b0e76f098",
|
||||
"Viz Geodata"
|
||||
],
|
||||
[
|
||||
"5e7b9f6a0b6c005b0e76f099",
|
||||
"Viz Gmane Model"
|
||||
],
|
||||
[
|
||||
"5e7b9f6b0b6c005b0e76f09a",
|
||||
"Viz Gmane Spider"
|
||||
],
|
||||
[
|
||||
"5e7b9f6b0b6c005b0e76f09b",
|
||||
"Viz Gmane Viz"
|
||||
],
|
||||
[
|
||||
"5e7b9f6b0b6c005b0e76f09c",
|
||||
"Viz Page Rank"
|
||||
],
|
||||
[
|
||||
"5e7b9f6b0b6c005b0e76f09d",
|
||||
"Viz Page Spider"
|
||||
],
|
||||
[
|
||||
"5e7b9f6c0b6c005b0e76f09e",
|
||||
"Viz Page Viz"
|
||||
]
|
||||
]
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
---
|
||||
id: 5e6a54a558d3af90110a60a0
|
||||
title: Introduction A
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: 3muQV-Im3Z0
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'Who should learn to program?'
|
||||
answers:
|
||||
- 'College students.'
|
||||
- 'People who want to become software developers.'
|
||||
- 'Everyone.'
|
||||
solution: 3
|
||||
```
|
||||
|
||||
</section>
|
@ -15,7 +15,7 @@ function getSchemaForLang(lang) {
|
||||
checksum: Joi.number(),
|
||||
dashedName: Joi.string(),
|
||||
description: Joi.when('challengeType', {
|
||||
is: challengeTypes.step,
|
||||
is: Joi.only([challengeTypes.step, challengeTypes.video]),
|
||||
then: Joi.string().allow(''),
|
||||
otherwise: Joi.string().required()
|
||||
}),
|
||||
@ -41,6 +41,7 @@ function getSchemaForLang(lang) {
|
||||
),
|
||||
guideUrl: Joi.string().uri({ scheme: 'https' }),
|
||||
videoUrl: Joi.string().allow(''),
|
||||
videoId: Joi.string(),
|
||||
forumTopicId: Joi.number(),
|
||||
helpRoom: Joi.string(),
|
||||
id: Joi.objectId().required(),
|
||||
|
Reference in New Issue
Block a user