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

feat: allow filtering of emails in http endpoint #334

Closed
wants to merge 3 commits into from

Conversation

madflow
Copy link
Contributor

@madflow madflow commented Dec 21, 2020

  • This PR allows simple filtering in the HTTP endpoint /email
  • Use case is - when using in CI (Cypress E2E), it can be useful to only fetch specific emails. Also Retrieve emails by subject - RestAPI #330
  • You can only find emails, which correspond exactly to the query parameters.
  • Nested fields in the payload can be addressed with a (to.name, headers.x-some-header) dot syntax

http http://localhost:1080/email\?to.name\="Johnny Utah"\&subject\="The ex-presidents are surfers"

@kowalczyka
Copy link

Hello,
does this change allows filtering only for endpoint in REST API or does it also affects Web UI?

@madflow
Copy link
Contributor Author

madflow commented Jan 30, 2021

Hello,
does this change allows filtering only for endpoint in REST API or does it also affects Web UI?

Only for simple filtering in the HTTP endpoint /email.

Copy link

@pdobrosi pdobrosi left a comment

Choose a reason for hiding this comment

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

I also wanted to implement the same feature :) , I like your solution.

test/utils.test.js Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

Codecov Report

Merging #334 (1276862) into master (96248f8) will increase coverage by 1.24%.
The diff coverage is 96.29%.

❗ Current head 1276862 differs from pull request most recent head 1403818. Consider uploading reports for the commit 1403818 to get more accurate results

@@            Coverage Diff             @@
##           master     #334      +/-   ##
==========================================
+ Coverage   66.83%   68.07%   +1.24%     
==========================================
  Files          10       10              
  Lines         588      614      +26     
  Branches      125      131       +6     
==========================================
+ Hits          393      418      +25     
- Misses        195      196       +1     

@soulteary
Copy link
Member

soulteary commented Mar 23, 2022

This feature looks very useful, I agree with @pdobrosi .

But the current code seems to have some conflicts, I will perform functional verification and resolve conflicts in a private fork. #389

If everything works, your name will appear in the v2.0.2 version, as a contributor, please continue to submit and play together @madflow

@kowalczyka webui need update, we can talk it at #381

@soulteary soulteary changed the title allow filtering of emails in http endpoint feat:allow filtering of emails in http endpoint Mar 23, 2022
@soulteary soulteary changed the title feat:allow filtering of emails in http endpoint feat: allow filtering of emails in http endpoint Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants