summaryrefslogtreecommitdiff
path: root/addons/link_tracker/tests/common.py
AgeCommit message (Collapse)Author
2021-04-19[IMP] event_sms, link_tracker, sms, test_mail_full: improve SMS-based ↵Thibault Delavallée
mailing tests PURPOSE Purpose is to have more tests when sending sms mailings, notably about canceled or failed mails or sms as well as jinja and links rendering. SPECIFICATIONS In this commit we improve SMS Marketing mailing tests. We notably * add tests for void and invalid email and numbers. It allows to check they correctly update their trace status; * add tests for unsubscribe and view links embedded in sms marketing; * add tests to simulate a click on links sent through sms marketing and ensure click statistics are effectively updated; * ensure content of sent sms are checked; Default content of mailings used in test is updated to ensure jinja is correctly rendered, including links and some corner cases. This will also helps ensuring behavior is kept when converting to QWeb. In event we now correctly use sms gateway mock to ensure SMS finding. In link_tracker a helper is added to check url tracking in plaintext content. LINKS Task ID-2508643 Followup of odoo/odoo#68874 (improve mail tests) Prepares Task ID-27033 (support QWeb in templates) Prepares Task ID-2377974 (clean trace and status management in mass mailing) COM PR odoo/odoo#69461 ENT PR odoo/enterprise#17780
2021-04-19[FIX] link_tracker: allow mock to parse HTML to find shortened linksThibault Delavallée
Some incoming tests crash if parser is not the HTML parser when trying to find a node given its ID. We also remove an unnecessary encapsulation, allowing to avoid issues like embedding a body or head tag within a div. Task ID-2508643 Prepares Task ID-27033 (support QWeb in templates) Prepares Task ID-2377974 (clean trace and status management in mass mailing) COM PR odoo/odoo#69461 ENT PR odoo/enterprise#17780
2020-08-05[IMP] mass_mailing: add preview block for mailingsstd-odoo
PURPOSE When displaying an email in a list the mail client (gmail, outlook...) computes a preview based on the content. This preview is generally not well computed as it contains a lot of garbage and tags while it should contain only relevant text. SPECIFICATIONS To build this preview, all mail clients read the content of the email. The only way to be able to customize the preview is to add an invisible HTML element at the beginning of the email with the wanted preview text. We add at the end of the preview `‌` (zero-width non-joiner) to fill the end of the preview in order to not have the beginning of the mail at the end of the preview. It doesn't work with simple space as the mail clients trim each HTML element content. Task ID-2172125 PR #49886
2020-05-26[IMP] sms, link_tracker: clean some test helpers and add an helper to click ↵Thibault Delavallée
SMS links Clean some helpers, and add a helper to simulata a click on a shortened link embedded in an SMS. Task ID 2247037 Community PR #50384
2020-04-24[IMP] link_tracker, (test_)mass_mailing: improve test tools and clean ↵Thibault Delavallée
existing tests URPOSE Prepare code cleaning and optimization in mail, mass_mailing and SMS by cleaning models for readability and code complexity and footprint reduction. SPECIFICATIONS Add tool methods and asserts for link tracker tests. Add tool methods and assets for mass mailing tests, notably about mailing traces and their link with emails. Merge existing and duplicated tests and rewrite them a bit. Rename and improve test_mass_mailing models. LINKS Prepares task ID 2238597 (notification and trace models cleaning) Task ID 1906925 (mass mailing tests cleaning) PR #50169 Related: odoo/enterprise#10180 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>