Skip to content

Commit

Permalink
Minor enhancements.
Browse files Browse the repository at this point in the history
- Add subject and text filters
- Add non-secure connection support
- Adjust documentation
- Add more unit test
- Add backward compatible support
- Add `Delete All Emails`, `Delete Email`, `Mark All Emails As Read`,
  and `Mark Email As Read` keywords.
- Add alternative keyword to deprecated keywords.
  • Loading branch information
rickypc committed Dec 20, 2015
1 parent 4b39694 commit 8ac7f77
Show file tree
Hide file tree
Showing 6 changed files with 541 additions and 196 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
0.2.1 (2015.12.20)
==================

* Add subject and text filters
* Add non-secure connection support
* Adjust documentation
* Add more unit test
* Add backward compatible support
* Add `Delete All Emails`, `Delete Email`, `Mark All Emails As Read`, and `Mark Email As Read` keywords
* Add alternative keyword to deprecated keywords

0.2.0 (2015.12.15)
==================

Expand Down
85 changes: 39 additions & 46 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,11 @@ ImapLibrary is a IMAP email testing library for `Robot Framework`_.

More information about this library can be found in the `Keyword Documentation`_.

Non-Backward Compatible Warning
-------------------------------

There are inevitable changes to parameter names that would not be backward compatible with
release 0.1.4 downwards.
These changes are made to comply with Python code style guide on `Method Names and Instance Variables`_.

Authoritative Repository
------------------------

This repository is the new authoritative repository for robotframework-imaplibrary package,
and I am also the new project maintainer for robotframework-imaplibrary project.
This repository is the new authoritative repository for `robotframework-imaplibrary`_ package,
and I am also the new project maintainer for `robotframework-imaplibrary`_ project.

I will go through the pull requests from old repository, as well as issue list.
I will try to accomodate as much as I could as time permit. **There is no need to re-post.**
Expand All @@ -31,46 +24,46 @@ If you are interested to contribute back to this project, please see **Contribut
Example
'''''''

+----------------+----------------------------+-------------------------------+-----------------+
| Open Mailbox | server=imap.googlemail.com | user=email@gmail.com | password=secret |
+----------------+----------------------------+-------------------------------+-----------------+
| ${LATEST} = | Wait For Mail | from_email[email protected] | timeout=300 |
+----------------+----------------------------+-------------------------------+-----------------+
| ${HTML} = | Open Link From Mail | ${LATEST} |
+----------------+----------------------------+-------------------------------------------------+
| Should Contain | ${HTML} | Your email address has been updated |
+----------------+----------------------------+-------------------------------------------------+
| Close Mailbox |
+-----------------------------------------------------------------------------------------------+
+----------------+----------------------+---------------------------+-----------------+
| Open Mailbox | host=imap.domain.com | user=email@domain.com | password=secret |
+----------------+----------------------+---------------------------+-----------------+
| ${LATEST} = | Wait For Email | sender[email protected] | timeout=300 |
+----------------+----------------------+---------------------------+-----------------+
| ${HTML} = | Open Link From Email | ${LATEST} |
+----------------+----------------------+---------------------------------------------+
| Should Contain | ${HTML} | Your email address has been updated |
+----------------+----------------------+---------------------------------------------+
| Close Mailbox |
+-------------------------------------------------------------------------------------+

Multipart Email Example
'''''''''''''''''''''''

+----------------+----------------------------+-------------------------------+-----------------+
| Open Mailbox | server=imap.googlemail.com | user=email@gmail.com | password=secret |
+----------------+----------------------------+-------------------------------+-----------------+
| ${LATEST} = | Wait For Mail | from_email[email protected] | timeout=300 |
+----------------+----------------------------+-------------------------------+-----------------+
| ${parts} = | Walk Multipart Email | ${LATEST} |
+----------------+----------------------------+-------------------------------+-----------------+
| :FOR | ${i} | IN RANGE | ${parts} |
+----------------+----------------------------+-------------------------------+-----------------+
| \\ | Walk Multipart Email | ${LATEST} |
+----------------+----------------------------+-------------------------------------------------+
| \\ | ${content-type} = | Get Multipart Content Type |
+----------------+----------------------------+-------------------------------------------------+
| \\ | Continue For Loop If | '${content-type}' != 'text/html' |
+----------------+----------------------------+-------------------------------+-----------------+
| \\ | ${payload} = | Get Multipart Payload | decode=True |
+----------------+----------------------------+-------------------------------+-----------------+
| \\ | Should Contain | ${payload} | your email |
+----------------+----------------------------+-------------------------------+-----------------+
| \\ | ${HTML} = | Open Link From Mail | ${LATEST} |
+----------------+----------------------------+-------------------------------+-----------------+
| \\ | Should Contain | ${HTML} | Your email |
+----------------+----------------------------+-------------------------------+-----------------+
| Close Mailbox |
+-----------------------------------------------------------------------------------------------+
+----------------+----------------------+---------------------------+-----------------+
| Open Mailbox | host=imap.domain.com | user=email@domain.com | password=secret |
+----------------+----------------------+---------------------------+-----------------+
| ${LATEST} = | Wait For Email | sender[email protected] | timeout=300 |
+----------------+----------------------+---------------------------+-----------------+
| ${parts} = | Walk Multipart Email | ${LATEST} |
+----------------+----------------------+---------------------------+-----------------+
| :FOR | ${i} | IN RANGE | ${parts} |
+----------------+----------------------+---------------------------+-----------------+
| \\ | Walk Multipart Email | ${LATEST} |
+----------------+----------------------+---------------------------------------------+
| \\ | ${content-type} = | Get Multipart Content Type |
+----------------+----------------------+---------------------------------------------+
| \\ | Continue For Loop If | '${content-type}' != 'text/html' |
+----------------+----------------------+---------------------------+-----------------+
| \\ | ${payload} = | Get Multipart Payload | decode=True |
+----------------+----------------------+---------------------------+-----------------+
| \\ | Should Contain | ${payload} | your email |
+----------------+----------------------+---------------------------+-----------------+
| \\ | ${HTML} = | Open Link From Email | ${LATEST} |
+----------------+----------------------+---------------------------+-----------------+
| \\ | Should Contain | ${HTML} | Your email |
+----------------+----------------------+---------------------------+-----------------+
| Close Mailbox |
+-------------------------------------------------------------------------------------+

Installation
------------
Expand Down Expand Up @@ -233,12 +226,12 @@ Documentation and other similar content are provided under `Creative Commons Att
.. _Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License: http://goo.gl/SNw73V
.. _Imap Library CLA: https://goo.gl/forms/QMyqXJI2LM
.. _Keyword Documentation: https://goo.gl/ntRuxC
.. _Method Names and Instance Variables: https://goo.gl/NxxD0n
.. _pip: http://goo.gl/jlJCPE
.. _Robot Framework: http://goo.gl/lES6WM
.. _Robot Framework Documentation: http://goo.gl/zy53tf
.. _Robot Framework installed: https://goo.gl/PFbWqM
.. _Robot Framework User Guide: http://goo.gl/Q7dfPB
.. _robotframework-imaplibrary: https://goo.gl/q66LcA
.. |Docs| image:: https://img.shields.io/badge/docs-latest-brightgreen.svg
:target: https://goo.gl/ntRuxC
:alt: Keyword Documentation
Expand Down
2 changes: 1 addition & 1 deletion doc/ImapLibrary.html

Large diffs are not rendered by default.

Loading

0 comments on commit 8ac7f77

Please sign in to comment.