fix: ignore block order for all upcoming blocks (#55546)

This commit is contained in:
Tom
2024-07-19 02:16:01 -05:00
committed by GitHub
parent 973b7175c9
commit fe4cd80c1e
4 changed files with 10 additions and 15 deletions

View File

@@ -3,7 +3,7 @@
"isUpcomingChange": false,
"usesMultifileEditor": true,
"dashedName": "build-a-polygon-area-calculator-project",
"order": 15,
"order": 16,
"superBlock": "scientific-computing-with-python",
"challengeOrder": [
{

View File

@@ -3,7 +3,7 @@
"isUpcomingChange": false,
"usesMultifileEditor": true,
"dashedName": "build-a-probability-calculator-project",
"order": 17,
"order": 18,
"superBlock": "scientific-computing-with-python",
"challengeOrder": [
{

View File

@@ -4,7 +4,7 @@
"usesMultifileEditor": true,
"hasEditableBoundaries": true,
"dashedName": "learn-encapsulation-by-building-a-projectile-trajectory-calculator",
"order": 16,
"order": 17,
"superBlock": "scientific-computing-with-python",
"challengeOrder": [
{

View File

@@ -282,16 +282,8 @@ function populateTestsForLang({ lang, challenges, meta, superBlocks }) {
if (!process.env.FCC_BLOCK && !process.env.FCC_CHALLENGE_ID) {
describe('Assert meta order', function () {
/** This array can be used to skip a superblock - we'll use this
* when we are working on the new project-based curriculum for
* a superblock (because keeping those challenges in order is
* tricky and needs cleaning up before deploying).
*/
const superBlocksUnderDevelopment = ['scientific-computing-with-python'];
const superBlocks = new Set([
...Object.values(meta)
.map(el => el.superBlock)
.filter(el => !superBlocksUnderDevelopment.includes(el))
...Object.values(meta).map(el => el.superBlock)
]);
superBlocks.forEach(superBlock => {
const filteredMeta = Object.values(meta)
@@ -316,9 +308,12 @@ function populateTestsForLang({ lang, challenges, meta, superBlocks }) {
);
});
filteredMeta.forEach((meta, index) => {
it(`${meta.superBlock} ${meta.name} must be in order`, function () {
assert.equal(meta.order, index);
});
// ignore block order for upcoming blocks
if (!meta.isUpcomingChange) {
it(`${meta.superBlock} ${meta.name} must be in order`, function () {
assert.equal(meta.order, index);
});
}
});
});
});