chore(curriculum): fix + test curriculum order (#44366)

* chore(tools): test curriculum order

* chore: update orders

* fix(tests): temporarily ignore cert super

The Relational Databases cert being 'upcomingChanges' is breaking
the tests.

* fix: graphql query here

* fix: use only one meta

* chore: remove unnecessary superOrders

* chore: zero-based indexing

* fix: update mock

* refactor: remove unused fixture

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
Nicholas Carrigan (he/him)
2021-12-06 08:55:13 -08:00
committed by GitHub
parent e18ccef2f2
commit 8372623f69
88 changed files with 184 additions and 166 deletions

View File

@ -153,7 +153,7 @@ export function buildChallengeUrl(challenge) {
export function getFirstChallenge(allChallenges) {
const first = allChallenges.find(
({ challengeOrder, superOrder, order }) =>
challengeOrder === 0 && superOrder === 1 && order === 0
challengeOrder === 0 && superOrder === 0 && order === 0
);
return first ? buildChallengeUrl(first) : '/learn';

View File

@ -17,7 +17,7 @@ export const mockFirstChallenge = {
superBlock: 'the',
dashedName: 'challenge',
challengeOrder: 0,
superOrder: 1,
superOrder: 0,
order: 0
};
@ -163,11 +163,6 @@ export const matchUserIdQuery = {
where: { id: mockUser.id }
};
export const firstChallengeQuery = {
// first challenge of the first block of the first superBlock
where: { challengeOrder: 0, superOrder: 1, order: 0 }
};
export const fullStackChallenges = [
{
completedDate: 1585210952511,