pushpak1300 / cypress-mailpit

Cypress Commands for Mailpit ✉️
MIT License
15 stars 1 forks source link

README.md #45

Closed TobiasHH closed 4 days ago

TobiasHH commented 4 days ago

There are some misinformations in the README.md about the usage of some commands.

The hasEmails and notHasEmails commands should not have a chaining like this. The command itself perform the check.

actual usage advice cy.mailpitHasEmailsBySearch('subject:My Test').should('be.true'); expected usage advice cy.mailpitHasEmailsBySearch('subject:My Test');

It didn't make sense either in version 1.2.1 nor in version 1.3.0.

Version 1.2.1 yielded a Number (messages_count) Version 1.3.0 yields MessagesSummary object (in the notHasEmails commands containing no messages)

The READMe.md should be corrected.

pushpak1300 commented 4 days ago

Thanks for reporting it. I understand.

Version 1.2.1 yielded a Number (messages_count) nope it was again chain-able property.

But that will be braking change if we change the implementation of method so I'm gonna defer the change till we make the major update to the repo.

But I have update the readme so no one use chaining with assertion commands. https://github.com/pushpak1300/cypress-mailpit/commit/cadbd6a84a9f9e5b28cdf4232c9dc40c1f19cdc7

TobiasHH commented 4 days ago

It was just a recommendation to change the README.md file because the example is missleading. :)

TobiasHH commented 4 days ago

Version 1.2.1 yielded a Number (messages_count) nope it was again chain-able property.

Yes, it was of type Chainable which validates to false using should('be.true');

pushpak1300 commented 4 days ago

Thanks @TobiasHH I already update the readme for correct usage let me know if anything else need to be changed.