Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] libp2p hands-on tutorial #617

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions scripts/__tests__/protowizard/__snapshots__/lessons.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ exports[`protowizard 2. create lesson 2.1. should create lesson after creating a

exports[`protowizard 2. create lesson 2.1. should create lesson after creating a new tutorial (skips resource creation) 2`] = `"Let's create the files you need to build your tutorial. I'll ask you a few questions to get started."`;

exports[`protowizard 2. create lesson 2.1. should create lesson after creating a new tutorial (skips resource creation) 3`] = `"Thanks! I've created a directory for your tutorial at \`src/tutorials/0010-new-tut-10/\`."`;
exports[`protowizard 2. create lesson 2.1. should create lesson after creating a new tutorial (skips resource creation) 3`] = `"Thanks! I've created a directory for your tutorial at \`src/tutorials/0011-new-tut-11/\`."`;

exports[`protowizard 2. create lesson 2.1. should create lesson after creating a new tutorial (skips resource creation) 4`] = `"To preview your tutorial, first run \`npm start\` in a separate terminal window or tab, then visit this page in your web browser: http://localhost:3000/new-tut-10/"`;
exports[`protowizard 2. create lesson 2.1. should create lesson after creating a new tutorial (skips resource creation) 4`] = `"To preview your tutorial, first run \`npm start\` in a separate terminal window or tab, then visit this page in your web browser: http://localhost:3000/new-tut-11/"`;

exports[`protowizard 2. create lesson 2.1. should create lesson after creating a new tutorial (skips resource creation) 5`] = `"Let's create your first lesson!"`;

Expand All @@ -15,14 +15,14 @@ exports[`protowizard 2. create lesson 2.1. should create lesson after creating a
‣ 01.md (for writing the text of your lesson)"
`;

exports[`protowizard 2. create lesson 2.1. should create lesson after creating a new tutorial (skips resource creation) 7`] = `"To preview this lesson, first run \`npm start\` in a separate terminal window or tab, then visit this page in your web browser: http://localhost:3000/new-tut-10/01"`;
exports[`protowizard 2. create lesson 2.1. should create lesson after creating a new tutorial (skips resource creation) 7`] = `"To preview this lesson, first run \`npm start\` in a separate terminal window or tab, then visit this page in your web browser: http://localhost:3000/new-tut-11/01"`;

exports[`protowizard 2. create lesson 2.1. should create lesson after creating a new tutorial (skips resource creation) 8`] = `
"Okay, sounds like we're done. Here are all the lessons now included in \\"New Tutorial (10)\\":
"Okay, sounds like we're done. Here are all the lessons now included in \\"New Tutorial (11)\\":
‣ 1 - Lesson 1 (text)"
`;

exports[`protowizard 2. create lesson 2.1. should create lesson after creating a new tutorial (skips resource creation) 9`] = `"You can find all the files you'll need for these lessons in the \`src/tutorials/0010-new-tut-10/\` directory."`;
exports[`protowizard 2. create lesson 2.1. should create lesson after creating a new tutorial (skips resource creation) 9`] = `"You can find all the files you'll need for these lessons in the \`src/tutorials/0011-new-tut-11/\` directory."`;

exports[`protowizard 2. create lesson 2.1. should create lesson after creating a new tutorial (skips resource creation) 10`] = `"All tutorials have a resources page where users can find opportunities for further learning."`;

Expand All @@ -41,14 +41,14 @@ exports[`protowizard 2. create lesson 2.2. should create a lesson and add it to
‣ 01.md (for writing the text of your lesson)"
`;

exports[`protowizard 2. create lesson 2.2. should create a lesson and add it to the latest tutorial (skips resource creation) 5`] = `"To preview this lesson, first run \`npm start\` in a separate terminal window or tab, then visit this page in your web browser: http://localhost:3000/new-tut-10/01"`;
exports[`protowizard 2. create lesson 2.2. should create a lesson and add it to the latest tutorial (skips resource creation) 5`] = `"To preview this lesson, first run \`npm start\` in a separate terminal window or tab, then visit this page in your web browser: http://localhost:3000/new-tut-11/01"`;

exports[`protowizard 2. create lesson 2.2. should create a lesson and add it to the latest tutorial (skips resource creation) 6`] = `
"Okay, sounds like we're done. Here are all the lessons now included in \\"New Tutorial (10)\\":
"Okay, sounds like we're done. Here are all the lessons now included in \\"New Tutorial (11)\\":
‣ 1 - Lesson (text)"
`;

exports[`protowizard 2. create lesson 2.2. should create a lesson and add it to the latest tutorial (skips resource creation) 7`] = `"You can find all the files you'll need for these lessons in the \`src/tutorials/0010-new-tut-10/\` directory."`;
exports[`protowizard 2. create lesson 2.2. should create a lesson and add it to the latest tutorial (skips resource creation) 7`] = `"You can find all the files you'll need for these lessons in the \`src/tutorials/0011-new-tut-11/\` directory."`;

exports[`protowizard 2. create lesson 2.2. should create a lesson and add it to the latest tutorial (skips resource creation) 8`] = `"All tutorials have a resources page where users can find opportunities for further learning."`;

Expand All @@ -75,24 +75,24 @@ exports[`protowizard 2. create lesson 2.3. should list the lessons created so fa
‣ 05.md (for writing the text of your lesson)"
`;

exports[`protowizard 2. create lesson 2.3. should list the lessons created so far 6`] = `"To preview this lesson, first run \`npm start\` in a separate terminal window or tab, then visit this page in your web browser: http://localhost:3000/new-tut-10/05"`;
exports[`protowizard 2. create lesson 2.3. should list the lessons created so far 6`] = `"To preview this lesson, first run \`npm start\` in a separate terminal window or tab, then visit this page in your web browser: http://localhost:3000/new-tut-11/05"`;

exports[`protowizard 2. create lesson 2.3. should list the lessons created so far 7`] = `
"Okay, sounds like we're done. Here are all the lessons now included in \\"New Tutorial (10)\\":
"Okay, sounds like we're done. Here are all the lessons now included in \\"New Tutorial (11)\\":
‣ 1 - Lesson 1 (text)
‣ 2 - Lesson 2 (text)
‣ 3 - Lesson 3 (text)
‣ 4 - Lesson 4 (text)
‣ 5 - Lesson (text)"
`;

exports[`protowizard 2. create lesson 2.3. should list the lessons created so far 8`] = `"You can find all the files you'll need for these lessons in the \`src/tutorials/0010-new-tut-10/\` directory."`;
exports[`protowizard 2. create lesson 2.3. should list the lessons created so far 8`] = `"You can find all the files you'll need for these lessons in the \`src/tutorials/0011-new-tut-11/\` directory."`;

exports[`protowizard 2. create lesson 2.3. should list the lessons created so far 9`] = `"Awesome work! \\"New Tutorial (10)\\" has both lesson files and resources!"`;
exports[`protowizard 2. create lesson 2.3. should list the lessons created so far 9`] = `"Awesome work! \\"New Tutorial (11)\\" has both lesson files and resources!"`;

exports[`protowizard 2. create lesson 2.3. should list the lessons created so far 10`] = `"To preview your tutorial, first run \`npm start\` in a separate terminal window or tab, then visit this page in your web browser: http://localhost:3000/new-tut-10/"`;
exports[`protowizard 2. create lesson 2.3. should list the lessons created so far 10`] = `"To preview your tutorial, first run \`npm start\` in a separate terminal window or tab, then visit this page in your web browser: http://localhost:3000/new-tut-11/"`;

exports[`protowizard 2. create lesson 2.3. should list the lessons created so far 11`] = `"To create the content of your lessons, edit the files in the \`src/tutorials/0010-new-tut-10/\` directory. (Learn more at https://bit.ly/protoschool-content.)"`;
exports[`protowizard 2. create lesson 2.3. should list the lessons created so far 11`] = `"To create the content of your lessons, edit the files in the \`src/tutorials/0011-new-tut-11/\` directory. (Learn more at https://bit.ly/protoschool-content.)"`;

exports[`protowizard 2. create lesson 2.3. should list the lessons created so far 12`] = `"To update your tutorial's title, description, or resources, edit its entry in the \`src/static/tutorials.json\` file. (Learn more at https://bit.ly/protoschool-metadata.)"`;

Expand Down
36 changes: 18 additions & 18 deletions scripts/__tests__/protowizard/__snapshots__/quizzes.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ exports[`protowizard 4. create quiz 4.1 should add quiz to pristine lesson 1`] =

exports[`protowizard 4. create quiz 4.1 should add quiz to pristine lesson 2`] = `
"Great! You've chosen to build a quiz for:
‣ Tutorial: New Tutorial (10)
‣ Tutorial: New Tutorial (11)
‣ Lesson: Lesson 1"
`;

exports[`protowizard 4. create quiz 4.1 should add quiz to pristine lesson 3`] = `"When we create a quiz together, it will overwrite any existing content. If you think you may have previously updated this quiz manually, you may want to double check before proceeding."`;

exports[`protowizard 4. create quiz 4.1 should add quiz to pristine lesson 4`] = `"To preview the quiz in its current state, first run \`npm start\` in a separate terminal window or tab, then visit this page in your web browser: http://localhost:3000/new-tut-10/01"`;
exports[`protowizard 4. create quiz 4.1 should add quiz to pristine lesson 4`] = `"To preview the quiz in its current state, first run \`npm start\` in a separate terminal window or tab, then visit this page in your web browser: http://localhost:3000/new-tut-11/01"`;

exports[`protowizard 4. create quiz 4.1 should add quiz to pristine lesson 5`] = `"Now it's time to write the question for your multiple-choice quiz and provide answer choices, with positive or negative feedback for each. Wrong answers, and the feedback associated with them, are a great way to address common misconceptions about the topic. Be sure to make your feedback as helpful as possible, to guide the learner to the right choice. You'll need to create 1 correct answer and 2-3 incorrect answers. (I'll take care of randomizing their order later.)"`;

Expand All @@ -32,9 +32,9 @@ exports[`protowizard 4. create quiz 4.1 should add quiz to pristine lesson 13`]

exports[`protowizard 4. create quiz 4.1 should add quiz to pristine lesson 14`] = `"You currently have 1 correct answer and 2 wrong answers. (I recommend providing 2-3 incorrect options.)"`;

exports[`protowizard 4. create quiz 4.1 should add quiz to pristine lesson 15`] = `"To preview your quiz, first run \`npm start\` in a separate terminal window or tab, then visit this page in your web browser: http://localhost:3000/new-tut-10/01"`;
exports[`protowizard 4. create quiz 4.1 should add quiz to pristine lesson 15`] = `"To preview your quiz, first run \`npm start\` in a separate terminal window or tab, then visit this page in your web browser: http://localhost:3000/new-tut-11/01"`;

exports[`protowizard 4. create quiz 4.1 should add quiz to pristine lesson 16`] = `"To make changes to your quiz, you can edit this file directly: src/tutorials/0010-new-tut-10/01.js"`;
exports[`protowizard 4. create quiz 4.1 should add quiz to pristine lesson 16`] = `"To make changes to your quiz, you can edit this file directly: src/tutorials/0011-new-tut-11/01.js"`;

exports[`protowizard 4. create quiz 4.1 should add quiz to pristine lesson 17`] = `"Okay, no problem. You can summon me later to add more quizzes."`;

Expand All @@ -46,13 +46,13 @@ exports[`protowizard 4. create quiz 4.2 should add quiz to existing lesson 2`] =

exports[`protowizard 4. create quiz 4.2 should add quiz to existing lesson 3`] = `
"Great! You've chosen to build a quiz for:
‣ Tutorial: New Tutorial (10)
‣ Tutorial: New Tutorial (11)
‣ Lesson: Lesson 1"
`;

exports[`protowizard 4. create quiz 4.2 should add quiz to existing lesson 4`] = `"When we create a quiz together, it will overwrite any existing content. If you think you may have previously updated this quiz manually, you may want to double check before proceeding."`;

exports[`protowizard 4. create quiz 4.2 should add quiz to existing lesson 5`] = `"To preview the quiz in its current state, first run \`npm start\` in a separate terminal window or tab, then visit this page in your web browser: http://localhost:3000/new-tut-10/01"`;
exports[`protowizard 4. create quiz 4.2 should add quiz to existing lesson 5`] = `"To preview the quiz in its current state, first run \`npm start\` in a separate terminal window or tab, then visit this page in your web browser: http://localhost:3000/new-tut-11/01"`;

exports[`protowizard 4. create quiz 4.2 should add quiz to existing lesson 6`] = `"Now it's time to write the question for your multiple-choice quiz and provide answer choices, with positive or negative feedback for each. Wrong answers, and the feedback associated with them, are a great way to address common misconceptions about the topic. Be sure to make your feedback as helpful as possible, to guide the learner to the right choice. You'll need to create 1 correct answer and 2-3 incorrect answers. (I'll take care of randomizing their order later.)"`;

Expand All @@ -68,21 +68,21 @@ exports[`protowizard 4. create quiz 4.2 should add quiz to existing lesson 11`]

exports[`protowizard 4. create quiz 4.2 should add quiz to existing lesson 12`] = `"You currently have 1 correct answer and 1 wrong answer. (I recommend providing 2-3 incorrect options.)"`;

exports[`protowizard 4. create quiz 4.2 should add quiz to existing lesson 13`] = `"To preview your quiz, first run \`npm start\` in a separate terminal window or tab, then visit this page in your web browser: http://localhost:3000/new-tut-10/01"`;
exports[`protowizard 4. create quiz 4.2 should add quiz to existing lesson 13`] = `"To preview your quiz, first run \`npm start\` in a separate terminal window or tab, then visit this page in your web browser: http://localhost:3000/new-tut-11/01"`;

exports[`protowizard 4. create quiz 4.2 should add quiz to existing lesson 14`] = `"To make changes to your quiz, you can edit this file directly: src/tutorials/0010-new-tut-10/01.js"`;
exports[`protowizard 4. create quiz 4.2 should add quiz to existing lesson 14`] = `"To make changes to your quiz, you can edit this file directly: src/tutorials/0011-new-tut-11/01.js"`;

exports[`protowizard 4. create quiz 4.2 should add quiz to existing lesson 15`] = `"Let's create a multiple-choice quiz! This will only work if you've already created the tutorial and lesson files."`;

exports[`protowizard 4. create quiz 4.2 should add quiz to existing lesson 16`] = `
"Great! You've chosen to build a quiz for:
‣ Tutorial: New Tutorial (10)
‣ Tutorial: New Tutorial (11)
‣ Lesson: Lesson 1"
`;

exports[`protowizard 4. create quiz 4.2 should add quiz to existing lesson 17`] = `"It looks like you've already created the quiz for this lesson."`;

exports[`protowizard 4. create quiz 4.2 should add quiz to existing lesson 18`] = `"To preview the existing version, first run \`npm start\` in a separate terminal window or tab, then visit this page in your web browser: http://localhost:3000/new-tut-10/01"`;
exports[`protowizard 4. create quiz 4.2 should add quiz to existing lesson 18`] = `"To preview the existing version, first run \`npm start\` in a separate terminal window or tab, then visit this page in your web browser: http://localhost:3000/new-tut-11/01"`;

exports[`protowizard 4. create quiz 4.2 should add quiz to existing lesson 19`] = `"Now it's time to write the question for your multiple-choice quiz and provide answer choices, with positive or negative feedback for each. Wrong answers, and the feedback associated with them, are a great way to address common misconceptions about the topic. Be sure to make your feedback as helpful as possible, to guide the learner to the right choice. You'll need to create 1 correct answer and 2-3 incorrect answers. (I'll take care of randomizing their order later.)"`;

Expand All @@ -104,9 +104,9 @@ exports[`protowizard 4. create quiz 4.2 should add quiz to existing lesson 27`]

exports[`protowizard 4. create quiz 4.2 should add quiz to existing lesson 28`] = `"You currently have 1 correct answer and 2 wrong answers. (I recommend providing 2-3 incorrect options.)"`;

exports[`protowizard 4. create quiz 4.2 should add quiz to existing lesson 29`] = `"To preview your quiz, first run \`npm start\` in a separate terminal window or tab, then visit this page in your web browser: http://localhost:3000/new-tut-10/01"`;
exports[`protowizard 4. create quiz 4.2 should add quiz to existing lesson 29`] = `"To preview your quiz, first run \`npm start\` in a separate terminal window or tab, then visit this page in your web browser: http://localhost:3000/new-tut-11/01"`;

exports[`protowizard 4. create quiz 4.2 should add quiz to existing lesson 30`] = `"To make changes to your quiz, you can edit this file directly: src/tutorials/0010-new-tut-10/01.js"`;
exports[`protowizard 4. create quiz 4.2 should add quiz to existing lesson 30`] = `"To make changes to your quiz, you can edit this file directly: src/tutorials/0011-new-tut-11/01.js"`;

exports[`protowizard 4. create quiz 4.2 should add quiz to existing lesson 31`] = `"Okay, no problem. You can summon me later to add more quizzes."`;

Expand All @@ -118,15 +118,15 @@ exports[`protowizard 4. create quiz 4.3 should cancel overwrite of non-pristine

exports[`protowizard 4. create quiz 4.3 should cancel overwrite of non-pristine lesson 3`] = `
"Great! You've chosen to build a quiz for:
‣ Tutorial: New Tutorial (10)
‣ Tutorial: New Tutorial (11)
‣ Lesson: Lesson 1"
`;

exports[`protowizard 4. create quiz 4.3 should cancel overwrite of non-pristine lesson 4`] = `"It looks like you've already created the quiz for this lesson."`;

exports[`protowizard 4. create quiz 4.3 should cancel overwrite of non-pristine lesson 5`] = `"To preview the existing version, first run \`npm start\` in a separate terminal window or tab, then visit this page in your web browser: http://localhost:3000/new-tut-10/01"`;
exports[`protowizard 4. create quiz 4.3 should cancel overwrite of non-pristine lesson 5`] = `"To preview the existing version, first run \`npm start\` in a separate terminal window or tab, then visit this page in your web browser: http://localhost:3000/new-tut-11/01"`;

exports[`protowizard 4. create quiz 4.3 should cancel overwrite of non-pristine lesson 6`] = `"Okay, no problem. You can edit your existing quiz directly in this file: src/tutorials/0010-new-tut-10/01.js"`;
exports[`protowizard 4. create quiz 4.3 should cancel overwrite of non-pristine lesson 6`] = `"Okay, no problem. You can edit your existing quiz directly in this file: src/tutorials/0011-new-tut-11/01.js"`;

exports[`protowizard 4. create quiz 4.3 should cancel overwrite of non-pristine lesson 7`] = `
"
Expand Down Expand Up @@ -169,12 +169,12 @@ exports[`protowizard 4. create quiz 4.4 should cancel overwrite of pristine less

exports[`protowizard 4. create quiz 4.4 should cancel overwrite of pristine lesson 3`] = `
"Great! You've chosen to build a quiz for:
‣ Tutorial: New Tutorial (10)
‣ Tutorial: New Tutorial (11)
‣ Lesson: Lesson 1"
`;

exports[`protowizard 4. create quiz 4.4 should cancel overwrite of pristine lesson 4`] = `"When we create a quiz together, it will overwrite any existing content. If you think you may have previously updated this quiz manually, you may want to double check before proceeding."`;

exports[`protowizard 4. create quiz 4.4 should cancel overwrite of pristine lesson 5`] = `"To preview the quiz in its current state, first run \`npm start\` in a separate terminal window or tab, then visit this page in your web browser: http://localhost:3000/new-tut-10/01"`;
exports[`protowizard 4. create quiz 4.4 should cancel overwrite of pristine lesson 5`] = `"To preview the quiz in its current state, first run \`npm start\` in a separate terminal window or tab, then visit this page in your web browser: http://localhost:3000/new-tut-11/01"`;

exports[`protowizard 4. create quiz 4.4 should cancel overwrite of pristine lesson 6`] = `"Okay, no problem. You can edit your existing quiz directly in this file: src/tutorials/0010-new-tut-10/01.js"`;
exports[`protowizard 4. create quiz 4.4 should cancel overwrite of pristine lesson 6`] = `"Okay, no problem. You can edit your existing quiz directly in this file: src/tutorials/0011-new-tut-11/01.js"`;
Loading