{"id":17285147,"url":"https://github.com/upgundecha/cypress-sendria","last_synced_at":"2025-03-26T16:42:22.598Z","repository":{"id":146177753,"uuid":"463780946","full_name":"upgundecha/cypress-sendria","owner":"upgundecha","description":"Cypress Plugin for Sendria Fake SMTP Server. Use this plugin for email testing.","archived":false,"fork":false,"pushed_at":"2022-09-06T03:12:22.000Z","size":66,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-17T11:09:36.158Z","etag":null,"topics":["cypress-plugin","email","email-testing","fake-smtp-server","sendira"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/cypress-sendria","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/upgundecha.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-26T07:06:16.000Z","updated_at":"2022-10-27T03:44:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"ba0ccea3-9a3c-4d8d-a7ef-83e11e0248a8","html_url":"https://github.com/upgundecha/cypress-sendria","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upgundecha%2Fcypress-sendria","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upgundecha%2Fcypress-sendria/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upgundecha%2Fcypress-sendria/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upgundecha%2Fcypress-sendria/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/upgundecha","download_url":"https://codeload.github.com/upgundecha/cypress-sendria/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245697680,"owners_count":20657944,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cypress-plugin","email","email-testing","fake-smtp-server","sendira"],"created_at":"2024-10-15T09:55:53.718Z","updated_at":"2025-03-26T16:42:22.575Z","avatar_url":"https://github.com/upgundecha.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cypress Sendria\n\nCypress Plugin for [Sendria Fake SMTP Server](https://github.com/msztolcman/sendria). Use this plugin for tests like Account confirmation \u0026 verification emails, one time passwords (OTPs) in email or general email testing.\n\nThis plugin uses Sendria API to retrive the messages.\n\n## Installation\n\n```bash\nnpm install cypress-sendria --save-dev\nyarn add cypress-sendria --dev\n```\n\n## Usage\n\n### 1. Register the plugin :\n\n```JavaScript\n// cypress/support/index.js\n\nrequire('cypress-sendria');\n```\n\n### 2. Specify your Sendria host address\n\n\u003e By default, Sendria API is started at the `http://localhost:1080`. If you are using default Sendria instace, you have nothing to configure.\n\nYou can also use env vars in your `cypress.json` as below :\n\n```json\n// cypress/cypress.json\n\n{\n  \"env\": {\n    \"SENDRIA_PROTOCOL\": \"http\",\n    \"SENDRIA_HOST\": \"localhost\",\n    \"SENDRIA_SMTP_PORT\": \"1025\",\n    \"SENDRIA_API_PORT\": \"1080\"\n  }\n}\n```\n\n## Commands\n\n\u003e Cypress-Sendria commands use `cy.request()` which return a Cypress promise. Check Cypress [documentation](https://docs.cypress.io/api/commands/request.html) for requests\n\nYou can use the commands as shown below example:\n\n```JavaScript\n  cy.sendriaGetAllMessages().then((messages) =\u003e {\n    expect(messages.length).to.equal(3);\n  });\n```\n\nFor more examples refer the [spec file](./cypress/integration/sendria.spec.js).\n\n### Commands\n\nGet all messages received in the Sendria server.\n\n```JavaScript\ncy.sendriaGetAllMessages()\n```\n---\n\nGet all messages and find one by containing a specific receipent email address and subject.\n\n```JavaScript\ncy.sendriaGetMessageByEmailAddressAndSubject(address: string, subject: string)\n```\n---\n\nDelete all message in order to clear the\nSendria mailbox\n\n```JavaScript\ncy.sendriaDeleteAllMessages()\n```\n---\n\nAccess the message html using Id\n\n```JavaScript\ncy.sendriaGetMessageHtmlById()\n```\n---\n\nDelete a message using Id\n\n```JavaScript\ncy.sendriaDeleteMessageById()\n```\n---\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\n- Clone the repo\n\n- Install dependencies: `npm install`\n\n- Run local Sendria instance. Find more [here](https://github.com/upgundecha/cypress-sendria) for installation options\n\n- Sendria API is documented [here](https://github.com/msztolcman/sendria#api)\n\nPlease make sure to update tests as appropriate and run `npm test` command\n\n---\n\n\u003e Inspired by the [cypress-maildev](https://github.com/Clebiez/cypress-maildev) plugin\n\n---\n\n## License\n\n[Apache- 2.0](https://choosealicense.com/licenses/apache-2.0/)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fupgundecha%2Fcypress-sendria","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fupgundecha%2Fcypress-sendria","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fupgundecha%2Fcypress-sendria/lists"}