Commit Graph
6 Commits
Author SHA1 Message Date
Thibault Delavallée cc7daf27c9 [MOV] (website_)mass_mailing: reorder, rename and link UI tests / tours
Rename tours, reorder tests and test files, perform a quick linting of UI
or tours related tests. Purpose is to prepare files to add some new tests
in mass mailing.

Each tour now belongs to a single file to ease maintenance and update as
well as seeing feature coverage. No real change should occur with this
commit except some test data (setup, test input).

Prepares Task-2150462 (Mass Mailing: Improve subscription management)

Part-of: odoo/odoo#122106
2023-05-23 18:02:03 +02:00
Arthur Detroux (ard) ff66035b26 [IMP] website_mass_mailing: improve the newsletter block test
Prior to this commit, starting this test individually would not work as
the admin user is subscribed to the mailing list used during the test.

The reason the test has passed our test suite is because on runbot the
`mass_mailing_sms` module is installed, which adds a new mailing list to
 which the admin user is not subscribed.

 This commit changes the test to always ensure that the admin is not
 subscribed to any newsletter, making the test a bit more robust.

closes odoo/odoo#121200

X-original-commit: f7465d0f13236518ee79e43e65222d0ca0c0b0fb
Signed-off-by: Outagant Mehdi (mou) <mou@odoo.com>
2023-05-15 15:07:22 +02:00
Guillaume (gdi) 89af36516f [FIX] website, *: add a robust utility to enter in edit mode
*: test_website, website_blog, website_crm, website_hr_recruitment,
website_mass_mailing, website_sale, website_sale_wishlist,
website_slides

This commit creates a new util which clicks on edit and waits for the
edit mode to be started. This way, we make sure that the edit mode is
enabled before testing the next step of the test. This avoids race
conditions during tests.

This commit replaces all the uses of the old util with the new one, it
also removes the steps that are waiting for the edit mode to start.
Finally, from [this other commit], we can start a tour in edit mode. For
these tests (which have `edition: true`), it is useless to check if the
edit mode has started at the beginning of the test because this check is
already done by default. This commit removes unnecessary / duplicated
steps.

[this other commit]: https://github.com/odoo/odoo/commit/99b50d18e220aedf14de806f4bf1b2d35c32de35#diff-c7720501ec33f5f92c907d8bb41de50edd832a4564317073e801a6915796a6bdR278

task-3203820

closes odoo/odoo#120481

X-original-commit: https://github.com/odoo/odoo/commit/9fd5d25f59578abc9c608578a7d2e2953880b582
Related: odoo/design-themes#656
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Guillaume-gdi <gdi@odoo.com>
2023-05-04 20:33:55 +02:00
99b50d18e2 [REF] test_website, *: adapt tours to new client action
*: website, website_blog, website_crm, website_event, website_forum,
   website_hr_recruitment, website_mass_mailing, website_sale,
   website_sale_loyalty, website_slides

This commit adds the current website displayed view xmlid outside of the
iframe, on its container, so that the tours registered with
registerThemeHomepageTour can continue to prepend their triggers with
the view xml id.

Introduce registerEditionTour: this function will allow tour maker to
more easily register a tour that needs to start in the iframe's backend
and go in edit mode.

See merge commit for more information.

task-2687506

Co-authored-by: Benjamin Vray <bvr@odoo.com>
Co-authored-by: Younn Olivier <yol@odoo.com>
2022-06-24 10:28:07 +02:00
Guillaume (gdi) b5c0b11df1 [FIX] web_editor, *: allow to manage all types of buttons
*: website_mass_mailing

Before this commit, some types of buttons were not managed by the
editor, only the primary, secondary and link buttons were supported.
However, if there is another type of btn in the DOM, the editor must be
able to handle it. This commit allows to manage all types of buttons in
the editor. This commit also adds a test so that the bug does not come
back.

Steps to reproduce the fixed bug:
 - Drop a block with a <a> with the btn-success class
 - Click on the button to edit it
 - The link tool part in the editor does not work properly
or
 - Drop the newsletter block
 - Save and register to the newsletter
 - Edit the new "Thanks" button
 - The link tool part in the editor does not work properly

opw-2802139

closes odoo/odoo#92325

X-original-commit: 4c68b3e923610e1d573b4bd2b241b2fc5923c412
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-05-25 22:31:23 +02:00
qsm-odoo 98d8d51100 [FIX] website_mass_mailing, *: add test for newsletter popup
*: website

This is the forward-port of a stable dependency fix, needed as it
includes a test. The dependency was properly fixed with [1].

[1]: https://github.com/odoo/odoo/commit/d4984b81e6b244297e192f2be2768ed11da170aa

closes odoo/odoo#65530

X-original-commit: 76e1495b0d5eab8fc03b6daf51dbc1c148c7de53
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-02-04 12:10:51 +00:00