From fe4cd80c1e7e2dd7fe0ec890eeec782f8981e98a Mon Sep 17 00:00:00 2001 From: Tom <20648924+moT01@users.noreply.github.com> Date: Fri, 19 Jul 2024 02:16:01 -0500 Subject: [PATCH] fix: ignore block order for all upcoming blocks (#55546) --- .../meta.json | 2 +- .../meta.json | 2 +- .../meta.json | 2 +- curriculum/test/test-challenges.js | 19 +++++++------------ 4 files changed, 10 insertions(+), 15 deletions(-) diff --git a/curriculum/challenges/_meta/build-a-polygon-area-calculator-project/meta.json b/curriculum/challenges/_meta/build-a-polygon-area-calculator-project/meta.json index be564ad91bf..6526248e7c2 100644 --- a/curriculum/challenges/_meta/build-a-polygon-area-calculator-project/meta.json +++ b/curriculum/challenges/_meta/build-a-polygon-area-calculator-project/meta.json @@ -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": [ { diff --git a/curriculum/challenges/_meta/build-a-probability-calculator-project/meta.json b/curriculum/challenges/_meta/build-a-probability-calculator-project/meta.json index 1d216be2e70..ce6099368d1 100644 --- a/curriculum/challenges/_meta/build-a-probability-calculator-project/meta.json +++ b/curriculum/challenges/_meta/build-a-probability-calculator-project/meta.json @@ -3,7 +3,7 @@ "isUpcomingChange": false, "usesMultifileEditor": true, "dashedName": "build-a-probability-calculator-project", - "order": 17, + "order": 18, "superBlock": "scientific-computing-with-python", "challengeOrder": [ { diff --git a/curriculum/challenges/_meta/learn-encapsulation-by-building-a-projectile-trajectory-calculator/meta.json b/curriculum/challenges/_meta/learn-encapsulation-by-building-a-projectile-trajectory-calculator/meta.json index a360eec9740..a6f87e3c5eb 100644 --- a/curriculum/challenges/_meta/learn-encapsulation-by-building-a-projectile-trajectory-calculator/meta.json +++ b/curriculum/challenges/_meta/learn-encapsulation-by-building-a-projectile-trajectory-calculator/meta.json @@ -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": [ { diff --git a/curriculum/test/test-challenges.js b/curriculum/test/test-challenges.js index 7c262586798..ccf2a5f11d7 100644 --- a/curriculum/test/test-challenges.js +++ b/curriculum/test/test-challenges.js @@ -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); + }); + } }); }); });