WebSorcery / testcase-generator

automates the process of generating test cases for cp. It takes input data, specified constraints, and test case conditions, and produces a set of test cases that exercise different paths and functions of the software application under test.
https://testcase-generator.vercel.app
MIT License
0 stars 6 forks source link

Email function embedded #37

Closed singhcoder694 closed 8 months ago

singhcoder694 commented 8 months ago

Description

Now on generating values a confirmation mail is sent to user using his email(coming from clerk)

Fixes #10

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

https://github.com/WebSorcery/testcase-generator/assets/114601400/1526158d-014a-472b-ab38-c24a467abf61

Checklist:

Summary by CodeRabbit

vercel[bot] commented 8 months ago

@singhcoder694 is attempting to deploy a commit to the birthday Team on Vercel.

A member of the Team first needs to authorize it.

coderabbitai[bot] commented 8 months ago

Walkthrough

The recent update introduces an email notification feature for users once test cases have been generated. This enhancement integrates an email service, leveraging nodemailer for backend email notifications, and includes new logic in various generator components to trigger emails upon successful generation of test cases.

Changes

File Path Change Summary
.gitignore Added package-lock.json to ignore list.
components/generator/.../arrayGeneratorFunc.js
.../graph/graphGeneratorFunc.js
.../integer/integerGeneratorFunc.js
.../linkedList/linkedListGeneratorFunc.js
.../palindrome/palindromeGeneratorFunc.js
.../string/stringGeneratorFunc.js
Added import of sendConfirmation, introduced Success flag and Generate function to handle email notifications on success.
config/nodemailer.js
lib/api.js
pages/api/confirm.js
Implemented nodemailer configuration, sendConfirmation function, and API endpoint for sending emails.

Assessment against linked issues

Objective Addressed Explanation
Implement Email Notifications for Test Case Generation (#10) βœ…

Poem

In the code's deep burrow, a feature stirs, With emails sent on whiskers swift as furs. Tests cases born, now users shall hear πŸ“¬ "Your data's ready!" chirps the CodeRabbit, clear.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

Tips ### Chat with CodeRabbit Bot (`@coderabbitai`) - You can directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit ``.` - You can tag CodeRabbit on specific lines of code or entire files in the PR by tagging `@coderabbitai` in a comment. Examples: - `@coderabbitai generate unit tests for this file` - `@coderabbitai modularize this function` - You can tag `@coderabbitai` in a PR comment and ask questions about the PR and the codebase. Use quoted replies to pass the context for follow-up questions. Examples: - `@coderabbitai gather interesting statistics about this repository and render them in a table.` - `@coderabbitai show all the `console.log` statements in this repository.` - `@coderabbitai generate unit tests for the `src/utils.ts` file.` ### CodeRabbit Commands (invoked as PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai help` to get help. Additionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. ### CodeRabbit Configration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - The JSON schema for the configuration file is available [here](https://coderabbit.ai/integrations/coderabbit-overrides.v2.json). - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json` ### CodeRabbit Discord Community Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback.
ghost commented 8 months ago
πŸ‘‡ Click on the image for a new way to code review #### [![Review these changes using an interactive CodeSee Map](https://s3.us-east-2.amazonaws.com/maps.codesee.io/images/github/WebSorcery/testcase-generator/37/2fb2d2e9/8ad7979ae0dd2003f6678cdcb8e8fcbcce77f48f.svg)](https://app.codesee.io/r/reviews?pr=37&src=https%3A%2F%2Fgithub.com%2FWebSorcery%2Ftestcase-generator) #### Legend CodeSee Map legend
gitstream-cm[bot] commented 8 months ago

This PR is missing a Jira ticket reference in the title or description. Please add a Jira ticket reference to the title or description of this PR.

gitstream-cm[bot] commented 8 months ago

πŸ₯· Code experts: ank1traj

ank1traj has most πŸ‘©β€πŸ’» activity in the files. ank1traj has most 🧠 knowledge in the files.

See details `.gitignore` Activity based on git-commit: | | ank1traj | | --- | --- | | DEC | | | NOV | | | OCT | | | SEP | | | AUG | | | JUL | | Knowledge based on git-blame: ank1traj: 84% `components/generator/array/arrayGeneratorFunc.js` Activity based on git-commit: | | ank1traj | | --- | --- | | DEC | | | NOV | | | OCT | | | SEP | | | AUG | | | JUL | | Knowledge based on git-blame: `components/generator/graph/graphGeneratorFunc.js` Activity based on git-commit: | | ank1traj | | --- | --- | | DEC | | | NOV | | | OCT | | | SEP | | | AUG | | | JUL | | Knowledge based on git-blame: `components/generator/integer/integerGeneratorFunc.js` Activity based on git-commit: | | ank1traj | | --- | --- | | DEC | | | NOV | | | OCT | | | SEP | | | AUG | | | JUL | | Knowledge based on git-blame: `components/generator/linkedList/linkedListGeneratorFunc.js` Activity based on git-commit: | | ank1traj | | --- | --- | | DEC | | | NOV | | | OCT | 1 additions & 1 deletions | | SEP | | | AUG | | | JUL | | Knowledge based on git-blame: `components/generator/palindrome/palindromeGeneratorFunc.js` Activity based on git-commit: | | ank1traj | | --- | --- | | DEC | | | NOV | | | OCT | | | SEP | | | AUG | | | JUL | | Knowledge based on git-blame: `components/generator/string/stringGeneratorFunc.js` Activity based on git-commit: | | ank1traj | | --- | --- | | DEC | | | NOV | | | OCT | 1 additions & 1 deletions | | SEP | | | AUG | | | JUL | | Knowledge based on git-blame: `package.json` Activity based on git-commit: | | ank1traj | | --- | --- | | DEC | 1 additions & 0 deletions | | NOV | | | OCT | | | SEP | | | AUG | | | JUL | | Knowledge based on git-blame: ank1traj: 72%

To learn more about /:\ gitStream - Visit our Docs

vercel[bot] commented 8 months ago

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
testcase-generator βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Dec 25, 2023 11:14am
ank1traj commented 8 months ago

@singhcoder694 Please check the review comments. Also, can we add generated data to be downloaded by user in the email?

singhcoder694 commented 8 months ago

@ank1traj I also thought to do the same, Ok I would try to do thisπŸ‘

ank1traj commented 8 months ago

Thanks @singhcoder694 for your contributions.