Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Sep 1, 2022. It is now read-only.

added validations to every step #50

Merged
hectorsector merged 6 commits into master from validations
Aug 20, 2019
Merged
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
55 changes: 55 additions & 0 deletions config.yml
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,17 @@ steps:
- type: getPullRequest
pullRequest: Changes
action_id: metaPR2
- type: getFileContents
action_id: fileContents
filename: 'src/App.jsx'
- type: gate
left: '/^\s*<\s*h3\s*className\s*=\s*"\s*Box-title\s*d-flex\s*flex-justify-center\s*"\s*>\s*GradeBook\s*<\s*\/\s*h3\s*>/gm'
Copy link
Contributor

@hectorsector hectorsector Aug 16, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

operator: test
right: '%actions.fileContents%'
else:
- type: respond
with: bad-header.md
issue: Changes
- type: respond
with: 02-props.md
issue: Changes
Expand All @@ -74,6 +85,17 @@ steps:
- type: getPullRequest
pullRequest: Changes
action_id: metaPR2
- type: getFileContents
action_id: fileContents
filename: 'src/App.jsx'
- type: gate
left: '/^\s*import\s*List\s*from\s*"\s*\.\/List\s*"\s*;\s*/gm'
Copy link
Contributor

@hectorsector hectorsector Aug 16, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

operator: test
right: '%actions.fileContents%'
else:
- type: respond
with: bad-import.md
issue: Changes
- type: createPullRequestComment
body: uncomment-assignments-activity.md
file: src/App.jsx
Expand Down Expand Up @@ -121,6 +143,17 @@ steps:
- type: getPullRequest
pullRequest: Changes
action_id: metaPR2
- type: getFileContents
action_id: fileContents
filename: 'src/List.jsx'
- type: gate
left: '/>\s*{\s*this\.props\.title\s*}\s*<\s*/gm'
Copy link
Contributor

@hectorsector hectorsector Aug 16, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one isn't validating for me, https://github.com/hectorsector/intro-react/pull/2#pullrequestreview-276208944. Let's leave that issue open and close the rest when we ship this.

operator: test
right: '%actions.fileContents%'
else:
- type: respond
with: bad-prop.md
issue: Changes
- type: respond
with: 03-state.md
issue: Changes
Expand All @@ -142,6 +175,17 @@ steps:
- type: getPullRequest
pullRequest: Changes
action_id: metaPR2
- type: getFileContents
action_id: fileContents
filename: 'src/App.jsx'
- type: gate
left: '/\s*students\s*:\s*\[\s*\]\s*,\s*/gm'
Copy link
Contributor

@hectorsector hectorsector Aug 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

operator: test
right: '%actions.fileContents%'
else:
- type: respond
with: bad-state.md
issue: Changes
- type: createPullRequestComment
body: explaining-this-state-activity.md
file: src/App.jsx
Expand Down Expand Up @@ -231,6 +275,17 @@ steps:
- type: getPullRequest
pullRequest: Changes
action_id: metaPR2
- type: getFileContents
action_id: fileContents
filename: 'src/App.jsx'
- type: gate
left: '/\s*placeholder\s*=\s*"Add\sStudent\.\.\."\s*\n\s*currList\s*=\s*{\s*this\.state\.students\s*}\n\s*addFunction\s*=\s*{\s*this\.addStudent\s*}\s*\n/gm'
Copy link
Contributor

@hectorsector hectorsector Aug 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

operator: test
right: '%actions.fileContents%'
else:
- type: respond
with: bad-replace.md
issue: Changes
- type: createPullRequestComment
body: uncomment-grades-activity.md
file: src/App.jsx
Expand Down
2 changes: 1 addition & 1 deletion responses/bad-function.md
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Looks you did not create an `addStudent` function with the parameter: `studentName`.
Looks like you did not create an `addStudent` function with the parameter: `studentName`.

Try again!
3 changes: 3 additions & 0 deletions responses/bad-header.md
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Looks like you did not correctly add an `h3` component in the right place in `src/App.jsx`.

Try again!
3 changes: 3 additions & 0 deletions responses/bad-import.md
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Looks like you did not import the `List` component into `App`.

Try again!
3 changes: 3 additions & 0 deletions responses/bad-prop.md
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Looks like you did not replace the title with a prop in the correct place in `src/List.jsx`

Try again!
3 changes: 3 additions & 0 deletions responses/bad-replace.md
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Looks like you did not replace the props for student rendering.

Try again!
3 changes: 3 additions & 0 deletions responses/bad-state.md
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Looks like you did not add a `students` state variable.

Try again!

AltStyle によって変換されたページ (->オリジナル) /