-
Notifications
You must be signed in to change notification settings - Fork 521
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
Workflow #270
base: master
Are you sure you want to change the base?
Workflow #270
Conversation
This reverts commit a436945.
WalkthroughThis update introduces a comprehensive workflow for the social-media-client project, including deployment to GitHub Pages, unit and end-to-end testing, and commit hooks. It also enhances the README with badges, detailed test instructions, and expected behaviors. Changes
Uplevel your code reviews with CodeRabbit ProCodeRabbit ProIf you like this project, please support us by purchasing the Pro version. The Pro version has advanced context, superior noise reduction and several proprietary improvements compared to the open source version. Moreover, CodeRabbit Pro is free for open source projects. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Files selected (97)
- .eslintrc.json (1)
- .github/workflows/e2e-test.yml (1)
- .github/workflows/unit-test.yml (1)
- .gitignore (1)
- .husky/pre-commit (1)
- .vscode/settings.json (1)
- .vscode/settings.json.default (1)
- 6 (1)
- cypress.config.js (1)
- cypress/e2e/3-testing/login.cy.js (1)
- cypress/plugins/index.js (1)
- cypress/support/commands.js (1)
- cypress/support/e2e.js (1)
- readme.md (1)
- src/js/api/apiBase.js (1)
- src/js/api/auth/index.js (1)
- src/js/api/auth/login.js (1)
- src/js/api/auth/login.test.js (1)
- src/js/api/auth/logout.js (1)
- src/js/api/auth/logout.test.js (1)
- src/js/api/auth/register.js (1)
- src/js/api/auth/state.js (1)
- src/js/api/constants.js (1)
- src/js/api/headers.js (2)
- src/js/api/index.js (1)
- src/js/api/posts/comment.js (1)
- src/js/api/posts/create.js (1)
- src/js/api/posts/delete.js (1)
- src/js/api/posts/index.js (1)
- src/js/api/posts/react.js (1)
- src/js/api/posts/read.js (1)
- src/js/api/posts/update.js (1)
- src/js/api/profiles/delete.js (1)
- src/js/api/profiles/follow.js (1)
- src/js/api/profiles/index.js (1)
- src/js/api/profiles/read.js (1)
- src/js/api/profiles/unfollow.js (1)
- src/js/api/profiles/update.js (1)
- src/js/data/blank/post.js (1)
- src/js/index.js (1)
- src/js/listeners/auth/index.js (1)
- src/js/listeners/auth/login.js (1)
- src/js/listeners/auth/logout.js (1)
- src/js/listeners/auth/register.js (1)
- src/js/listeners/index.js (1)
- src/js/listeners/post/comment.js (1)
- src/js/listeners/post/index.js (1)
- src/js/listeners/post/reaction.js (1)
- src/js/listeners/profile/follow.js (1)
- src/js/listeners/profile/index.js (1)
- src/js/listeners/profile/unfollow.js (1)
- src/js/mock/localStorage.mock.js (1)
- src/js/router/index.js (1)
- src/js/router/searchParams.js (1)
- src/js/storage/index.js (1)
- src/js/storage/load.js (1)
- src/js/storage/save.js (1)
- src/js/templates/comment/badge.js (1)
- src/js/templates/comment/comment.js (3)
- src/js/templates/comment/form.js (1)
- src/js/templates/comment/index.js (1)
- src/js/templates/index.js (1)
- src/js/templates/instance.js (1)
- src/js/templates/post/actions.js (1)
- src/js/templates/post/comments.js (1)
- src/js/templates/post/footer.js (1)
- src/js/templates/post/form.js (3)
- src/js/templates/post/header.js (1)
- src/js/templates/post/index.js (1)
- src/js/templates/post/loader.js (1)
- src/js/templates/post/media.js (2)
- src/js/templates/post/page.js (1)
- src/js/templates/post/reactions.js (1)
- src/js/templates/post/tabs.js (1)
- src/js/templates/post/tags.js (1)
- src/js/templates/post/thumbnail.js (1)
- src/js/templates/profile/button.js (1)
- src/js/templates/profile/followers.js (1)
- src/js/templates/profile/following.js (1)
- src/js/templates/profile/follows.js (1)
- src/js/templates/profile/index.js (1)
- src/js/templates/profile/page.js (1)
- src/js/templates/profile/thumbnail.js (1)
- src/js/tools/clear.js (1)
- src/js/tools/emojiSubset.js (1)
- src/js/tools/index.js (1)
- src/js/ui/auth.js (1)
- src/js/ui/footer.js (1)
- src/js/ui/header.js (1)
- src/js/ui/index.js (1)
- src/js/ui/modals.js (1)
- src/js/ui/renderView.js (1)
- src/js/views/index.js (1)
- src/js/views/postList.js (1)
- src/js/views/postPage.js (2)
- src/js/views/profileList.js (1)
- src/js/views/profilePage.js (1)
Files ignored due to filter (10)
- babel.config.json
- cypress/fixtures/example.json
- cypress/fixtures/profile.json
- cypress/fixtures/users.json
- cypress/screenshots/2-advanced-examples/misc.cy.js/my-image (1).png
- cypress/screenshots/2-advanced-examples/misc.cy.js/my-image.png
- cypress/screenshots/3-testing/login.cy.js/login test -- can search for Social Media Website, swich from register page to login page, log in (failed) (1).png
- cypress/screenshots/3-testing/login.cy.js/login test -- can search for Social Media Website, swich from register page to login page, log in (failed).png
- package-lock.json
- package.json
Files not summarized due to errors (97)
- .vscode/settings.json (nothing obtained from openai)
- .eslintrc.json (nothing obtained from openai)
- .github/workflows/e2e-test.yml (nothing obtained from openai)
- .gitignore (nothing obtained from openai)
- .husky/pre-commit (nothing obtained from openai)
- .github/workflows/unit-test.yml (nothing obtained from openai)
- cypress/plugins/index.js (nothing obtained from openai)
- 6 (nothing obtained from openai)
- cypress/e2e/3-testing/login.cy.js (nothing obtained from openai)
- cypress.config.js (nothing obtained from openai)
- .vscode/settings.json.default (nothing obtained from openai)
- cypress/support/commands.js (nothing obtained from openai)
- cypress/support/e2e.js (nothing obtained from openai)
- readme.md (nothing obtained from openai)
- src/js/api/apiBase.js (nothing obtained from openai)
- src/js/api/auth/index.js (nothing obtained from openai)
- src/js/api/auth/login.js (nothing obtained from openai)
- src/js/api/auth/login.test.js (nothing obtained from openai)
- src/js/api/auth/logout.js (nothing obtained from openai)
- src/js/api/auth/logout.test.js (nothing obtained from openai)
- src/js/api/auth/register.js (nothing obtained from openai)
- src/js/api/auth/state.js (nothing obtained from openai)
- src/js/api/constants.js (nothing obtained from openai)
- src/js/api/headers.js (nothing obtained from openai)
- src/js/api/index.js (nothing obtained from openai)
- src/js/api/posts/comment.js (nothing obtained from openai)
- src/js/api/posts/delete.js (nothing obtained from openai)
- src/js/api/posts/create.js (nothing obtained from openai)
- src/js/api/posts/index.js (nothing obtained from openai)
- src/js/api/posts/react.js (nothing obtained from openai)
- src/js/api/posts/update.js (nothing obtained from openai)
- src/js/api/posts/read.js (nothing obtained from openai)
- src/js/api/profiles/follow.js (nothing obtained from openai)
- src/js/api/profiles/index.js (nothing obtained from openai)
- src/js/api/profiles/delete.js (nothing obtained from openai)
- src/js/api/profiles/read.js (nothing obtained from openai)
- src/js/api/profiles/unfollow.js (nothing obtained from openai)
- src/js/index.js (nothing obtained from openai)
- src/js/api/profiles/update.js (nothing obtained from openai)
- src/js/listeners/auth/index.js (nothing obtained from openai)
- src/js/data/blank/post.js (nothing obtained from openai)
- src/js/listeners/auth/login.js (nothing obtained from openai)
- src/js/listeners/auth/logout.js (nothing obtained from openai)
- src/js/listeners/index.js (nothing obtained from openai)
- src/js/listeners/auth/register.js (nothing obtained from openai)
- src/js/listeners/post/comment.js (nothing obtained from openai)
- src/js/listeners/post/index.js (nothing obtained from openai)
- src/js/listeners/post/reaction.js (nothing obtained from openai)
- src/js/listeners/profile/follow.js (nothing obtained from openai)
- src/js/listeners/profile/index.js (nothing obtained from openai)
- src/js/listeners/profile/unfollow.js (nothing obtained from openai)
- src/js/mock/localStorage.mock.js (nothing obtained from openai)
- src/js/router/index.js (nothing obtained from openai)
- src/js/router/searchParams.js (nothing obtained from openai)
- src/js/storage/index.js (nothing obtained from openai)
- src/js/storage/load.js (nothing obtained from openai)
- src/js/storage/save.js (nothing obtained from openai)
- src/js/templates/comment/badge.js (nothing obtained from openai)
- src/js/templates/comment/comment.js (nothing obtained from openai)
- src/js/templates/comment/form.js (nothing obtained from openai)
- src/js/templates/comment/index.js (nothing obtained from openai)
- src/js/templates/instance.js (nothing obtained from openai)
- src/js/templates/index.js (nothing obtained from openai)
- src/js/templates/post/actions.js (nothing obtained from openai)
- src/js/templates/post/comments.js (nothing obtained from openai)
- src/js/templates/post/footer.js (nothing obtained from openai)
- src/js/templates/post/form.js (nothing obtained from openai)
- src/js/templates/post/header.js (nothing obtained from openai)
- src/js/templates/post/index.js (nothing obtained from openai)
- src/js/templates/post/loader.js (nothing obtained from openai)
- src/js/templates/post/media.js (nothing obtained from openai)
- src/js/templates/post/page.js (nothing obtained from openai)
- src/js/templates/post/tags.js (nothing obtained from openai)
- src/js/templates/post/reactions.js (nothing obtained from openai)
- src/js/templates/post/tabs.js (nothing obtained from openai)
- src/js/templates/post/thumbnail.js (nothing obtained from openai)
- src/js/templates/profile/button.js (nothing obtained from openai)
- src/js/templates/profile/followers.js (nothing obtained from openai)
- src/js/templates/profile/follows.js (nothing obtained from openai)
- src/js/templates/profile/index.js (nothing obtained from openai)
- src/js/templates/profile/following.js (nothing obtained from openai)
- src/js/templates/profile/page.js (nothing obtained from openai)
- src/js/templates/profile/thumbnail.js (nothing obtained from openai)
- src/js/tools/clear.js (nothing obtained from openai)
- src/js/tools/emojiSubset.js (nothing obtained from openai)
- src/js/tools/index.js (nothing obtained from openai)
- src/js/ui/auth.js (nothing obtained from openai)
- src/js/ui/header.js (nothing obtained from openai)
- src/js/ui/footer.js (nothing obtained from openai)
- src/js/ui/index.js (nothing obtained from openai)
- src/js/ui/modals.js (nothing obtained from openai)
- src/js/ui/renderView.js (nothing obtained from openai)
- src/js/views/index.js (nothing obtained from openai)
- src/js/views/postPage.js (nothing obtained from openai)
- src/js/views/postList.js (nothing obtained from openai)
- src/js/views/profileList.js (nothing obtained from openai)
- src/js/views/profilePage.js (nothing obtained from openai)
Files not reviewed due to errors (97)
- .eslintrc.json (no response)
- .vscode/settings.json (no response)
- .github/workflows/unit-test.yml (no response)
- .husky/pre-commit (no response)
- .gitignore (no response)
- .github/workflows/e2e-test.yml (no response)
- .vscode/settings.json.default (no response)
- cypress/support/commands.js (no response)
- cypress/plugins/index.js (no response)
- cypress.config.js (no response)
- cypress/e2e/3-testing/login.cy.js (no response)
- 6 (no response)
- src/js/api/auth/index.js (no response)
- cypress/support/e2e.js (no response)
- readme.md (no response)
- src/js/api/apiBase.js (no response)
- src/js/api/auth/login.js (no response)
- src/js/api/auth/login.test.js (no response)
- src/js/api/auth/logout.js (no response)
- src/js/api/auth/logout.test.js (no response)
- src/js/api/constants.js (no response)
- src/js/api/auth/register.js (no response)
- src/js/api/auth/state.js (no response)
- src/js/api/headers.js (no response)
- src/js/api/index.js (no response)
- src/js/api/posts/comment.js (no response)
- src/js/api/posts/delete.js (no response)
- src/js/api/posts/create.js (no response)
- src/js/api/posts/index.js (no response)
- src/js/api/posts/react.js (no response)
- src/js/api/posts/update.js (no response)
- src/js/api/posts/read.js (no response)
- src/js/api/profiles/index.js (no response)
- src/js/api/profiles/read.js (no response)
- src/js/api/profiles/delete.js (no response)
- src/js/api/profiles/follow.js (no response)
- src/js/api/profiles/update.js (no response)
- src/js/data/blank/post.js (no response)
- src/js/api/profiles/unfollow.js (no response)
- src/js/listeners/auth/login.js (no response)
- src/js/listeners/auth/index.js (no response)
- src/js/index.js (no response)
- src/js/listeners/auth/logout.js (no response)
- src/js/listeners/auth/register.js (no response)
- src/js/listeners/index.js (no response)
- src/js/listeners/post/comment.js (no response)
- src/js/listeners/post/index.js (no response)
- src/js/listeners/post/reaction.js (no response)
- src/js/listeners/profile/follow.js (no response)
- src/js/listeners/profile/index.js (no response)
- src/js/router/index.js (no response)
- src/js/listeners/profile/unfollow.js (no response)
- src/js/mock/localStorage.mock.js (no response)
- src/js/router/searchParams.js (no response)
- src/js/storage/index.js (no response)
- src/js/storage/load.js (no response)
- src/js/templates/comment/badge.js (no response)
- src/js/storage/save.js (no response)
- src/js/templates/comment/comment.js (no response)
- src/js/templates/comment/form.js (no response)
- src/js/templates/comment/index.js (no response)
- src/js/templates/index.js (no response)
- src/js/templates/post/actions.js (no response)
- src/js/templates/post/comments.js (no response)
- src/js/templates/post/footer.js (no response)
- src/js/templates/instance.js (no response)
- src/js/templates/post/form.js (no response)
- src/js/templates/post/header.js (no response)
- src/js/templates/post/index.js (no response)
- src/js/templates/post/media.js (no response)
- src/js/templates/post/loader.js (no response)
- src/js/templates/post/page.js (no response)
- src/js/templates/post/reactions.js (no response)
- src/js/templates/post/tabs.js (no response)
- src/js/templates/post/tags.js (no response)
- src/js/templates/profile/button.js (no response)
- src/js/templates/post/thumbnail.js (no response)
- src/js/templates/profile/followers.js (no response)
- src/js/templates/profile/following.js (no response)
- src/js/templates/profile/follows.js (no response)
- src/js/templates/profile/thumbnail.js (no response)
- src/js/templates/profile/index.js (no response)
- src/js/templates/profile/page.js (no response)
- src/js/tools/clear.js (no response)
- src/js/tools/emojiSubset.js (no response)
- src/js/tools/index.js (no response)
- src/js/ui/auth.js (no response)
- src/js/ui/footer.js (no response)
- src/js/ui/header.js (no response)
- src/js/ui/index.js (no response)
- src/js/ui/renderView.js (no response)
- src/js/ui/modals.js (no response)
- src/js/views/index.js (no response)
- src/js/views/postList.js (no response)
- src/js/views/postPage.js (no response)
- src/js/views/profileList.js (no response)
- src/js/views/profilePage.js (no response)
Review comments generated (0)
- Review: 0
- LGTM: 0
Tips
Chat with CodeRabbit Bot (@coderabbitai
)
- Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
- Invite the bot into a review comment chain by tagging
@coderabbitai
in a reply.
Code suggestions
- The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
- You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.
Pausing incremental reviews
- Add
@coderabbitai: ignore
anywhere in the PR description to pause further reviews from the bot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Files selected (1)
- readme.md (1)
Review comments generated (1)
- Review: 1
- LGTM: 0
Tips
Chat with CodeRabbit Bot (@coderabbitai
)
- Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
- Invite the bot into a review comment chain by tagging
@coderabbitai
in a reply.
Code suggestions
- The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
- You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.
Pausing incremental reviews
- Add
@coderabbitai: ignore
anywhere in the PR description to pause further reviews from the bot.
readme.md
Outdated
# social-media-client Workflow CA | ||
|
||
[![Deploy static content to Pages](https://github.com/corrado1982/social-media-client-CA/actions/workflows/pages.yml/badge.svg)](https://github.com/corrado1982/social-media-client-CA/actions/workflows/pages.yml) | ||
|
||
## Tests | ||
|
||
Running tests from your terminal editor | ||
|
||
Run a jest unit-test: | ||
|
||
``` | ||
npm run test | ||
``` | ||
|
||
Cypres for a visual testing on a browser | ||
|
||
``` | ||
npm test-e2e | ||
``` | ||
|
||
Run end 2 end test and display it on the terminal | ||
|
||
``` | ||
npm test-e2e-cli | ||
``` | ||
|
||
## Unit tests will check if | ||
|
||
- The login function fetches and stores a token in browser storage | ||
- The logout function clears the token from the local storage | ||
|
||
## End-to-end tests will check if | ||
|
||
- The user can log in and access their profile | ||
- The user cannot submit the login form with invalid credentials and is shown a message | ||
- The user can log out with the logout button | ||
|
||
## Hooks on commit | ||
|
||
- To allow a fixing hook on commit you shoud add "eslint --fix". | ||
Inside the package.json under "lint-staged" you can chose where to use it, | ||
under "_.js", "_.html" and "\*.scss" if you chose to do it make sure is after "prettier --write". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes in the readme.md
file look good. The instructions for running tests and the details about what the unit and end-to-end tests cover are clear. However, there's a minor typo in line 40 that should be corrected for clarity.
- To allow a fixing hook on commit you shoud add "eslint --fix".
+ To allow a fixing hook on commit you should add "eslint --fix".
Also, it would be helpful to provide an example of how to add the "eslint --fix" command under "lint-staged" in the package.json file. This will make it easier for other developers to understand exactly where and how to add this command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Files selected (1)
- readme.md (1)
Review comments generated (1)
- Review: 0
- LGTM: 1
Tips
Chat with CodeRabbit Bot (@coderabbitai
)
- Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
- Invite the bot into a review comment chain by tagging
@coderabbitai
in a reply.
Code suggestions
- The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
- You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.
Pausing incremental reviews
- Add
@coderabbitai: ignore
anywhere in the PR description to pause further reviews from the bot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Files selected (1)
- index.html (1)
Files not summarized due to errors (1)
- index.html (diff tokens exceeds limit)
Files skipped from review due to trivial changes (1)
- index.html (diff too large)
Review comments generated (0)
- Review: 0
- LGTM: 0
Tips
Chat with CodeRabbit Bot (@coderabbitai
)
- Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
- Invite the bot into a review comment chain by tagging
@coderabbitai
in a reply.
Code suggestions
- The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
- You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.
Pausing incremental reviews
- Add
@coderabbitai: ignore
anywhere in the PR description to pause further reviews from the bot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Files selected (1)
- index.html (1)
Files not summarized due to errors (1)
- index.html (diff tokens exceeds limit)
Files skipped from review due to trivial changes (1)
- index.html (diff too large)
Review comments generated (0)
- Review: 0
- LGTM: 0
Tips
Chat with CodeRabbit Bot (@coderabbitai
)
- Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
- Invite the bot into a review comment chain by tagging
@coderabbitai
in a reply.
Code suggestions
- The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
- You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.
Pausing incremental reviews
- Add
@coderabbitai: ignore
anywhere in the PR description to pause further reviews from the bot.
Summary by CodeRabbit