diff --git a/google_tag_manager_advanced_tracking/__manifest__.py b/google_tag_manager_advanced_tracking/__manifest__.py
index d60a74fa..e73553c2 100644
--- a/google_tag_manager_advanced_tracking/__manifest__.py
+++ b/google_tag_manager_advanced_tracking/__manifest__.py
@@ -27,6 +27,7 @@
"depends": [
"website_google_tag_manager",
"website_sale_advanced_tracking",
+ "saas_provider_upgrade",
],
"data": ["views/snippets.xml"],
"assets": {
@@ -34,6 +35,9 @@
"google_tag_manager_advanced_tracking/static/src/js/website_sale_tracking.js",
"google_tag_manager_advanced_tracking/static/src/js/website_user_tracking.js",
],
+ "web.assets_unit_tests": [
+ "google_tag_manager_advanced_tracking/static/tests/**/*",
+ ],
},
"installable": True,
}
diff --git a/google_tag_manager_advanced_tracking/static/src/js/website_user_tracking.test.js b/google_tag_manager_advanced_tracking/static/src/js/website_user_tracking.test.js
new file mode 100644
index 00000000..e38482c5
--- /dev/null
+++ b/google_tag_manager_advanced_tracking/static/src/js/website_user_tracking.test.js
@@ -0,0 +1,50 @@
+/** @odoo-module **/
+
+import { registry } from "@web/core/registry";
+import { click, insertText } from "@web/../tests/helpers/utils";
+import { makeTestEnv } from "@web/../tests/helpers/mock_env";
+import { mount } from "@web/../tests/helpers/utils";
+import { GoogleTagManagerUserAdvancedTracking } from "@website_user_tracking/js/website_user_tracking";
+import { patchWithCleanup } from "@web/../tests/helpers/utils";
+import { session } from "@web/session";
+import { expect, test } from "@odoo/hoot";
+
+const publicWidgetRegistry = registry.category("public_widgets");
+
+test("GoogleTagManagerUserAdvancedTracking: _onUserSignup", async () => {
+ publicWidgetRegistry.add(
+ "GoogleTagManagerUserAdvancedTracking",
+ GoogleTagManagerUserAdvancedTracking
+ );
+
+ const dataLayer = [];
+ patchWithCleanup(window, {
+ dataLayer: dataLayer,
+ });
+
+ const env = await makeTestEnv({ session });
+ const target = document.createElement("div");
+ target.classList.add("oe_website_login_container");
+ target.innerHTML = `
+
+ `;
+ document.body.appendChild(target);
+
+ await mount(GoogleTagManagerUserAdvancedTracking, target, { env });
+
+ await insertText("#login", "test@example.com");
+ await click("button.on_user_signup");
+
+ expect(dataLayer.length).toBe(1);
+ expect(dataLayer[0]).toEqual({
+ event: "user_signup",
+ user_email: "test@example.com",
+ });
+
+ // Cleanup
+ target.remove();
+ delete publicWidgetRegistry.get("GoogleTagManagerUserAdvancedTracking");
+});
\ No newline at end of file
diff --git a/google_tag_manager_advanced_tracking/static/tests/website_user_tracking.test.js b/google_tag_manager_advanced_tracking/static/tests/website_user_tracking.test.js
new file mode 100644
index 00000000..f55a67ad
--- /dev/null
+++ b/google_tag_manager_advanced_tracking/static/tests/website_user_tracking.test.js
@@ -0,0 +1,65 @@
+/** @odoo-module **/
+
+// import { registry } from "@web/core/registry";
+// import { click, insertText } from "@web/../tests/helpers/utils";
+// import { makeTestEnv } from "@web/../tests/helpers/mock_env";
+// import { mount } from "@web/../tests/helpers/utils";
+// import { GoogleTagManagerUserAdvancedTracking } from "@website_user_tracking/js/website_user_tracking";
+// import { patchWithCleanup } from "@web/../tests/helpers/utils";
+// import { session } from "@web/session";
+
+// const publicWidgetRegistry = registry.category("public_widgets");
+
+// describe("Upgrade Ticket Sharing Portal", () => {
+
+// function add(x,y){
+// return x + y;
+// }
+// test("should add two numbers", () => {
+// expect(add(2, 3)).toBe(5);
+// });
+// test("should render upgrade ticket sharing portal", async () => {
+// await mountWithCleanup(UpgradePortalSteps);
+// expect(".h3-fs").toHaveCount(1, {
+// message: "1 apps menu toggler present",
+// });
+// });
+// });
+
+// test("GoogleTagManagerUserAdvancedTracking: _onUserSignup", async () => {
+// publicWidgetRegistry.add(
+// "GoogleTagManagerUserAdvancedTracking",
+// GoogleTagManagerUserAdvancedTracking
+// );
+
+// const dataLayer = [];
+// patchWithCleanup(window, {
+// dataLayer: dataLayer,
+// });
+
+// const env = await makeTestEnv({ session });
+// const target = document.createElement("div");
+// target.classList.add("oe_website_login_container");
+// target.innerHTML = `
+//
+// `;
+// document.body.appendChild(target);
+
+// await mount(GoogleTagManagerUserAdvancedTracking, target, { env });
+
+// await insertText("#login", "test@example.com");
+// await click("button.on_user_signup");
+
+// expect(dataLayer.length).toBe(1);
+// expect(dataLayer[0]).toEqual({
+// event: "user_signup",
+// user_email: "test@example.com",
+// });
+
+// // Cleanup
+// target.remove();
+// delete publicWidgetRegistry.get("GoogleTagManagerUserAdvancedTracking");
+// });
diff --git a/website_product_attribute_link/README.rst b/website_product_attribute_link/README.rst
deleted file mode 100644
index d35514be..00000000
--- a/website_product_attribute_link/README.rst
+++ /dev/null
@@ -1,73 +0,0 @@
-.. |company| replace:: ADHOC SA
-
-.. |company_logo| image:: https://raw.githubusercontent.com/ingadhoc/maintainer-tools/master/resources/adhoc-logo.png
- :alt: ADHOC SA
- :target: https://www.adhoc.com.ar
-
-.. |icon| image:: https://raw.githubusercontent.com/ingadhoc/maintainer-tools/master/resources/adhoc-icon.png
-
-.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png
- :target: https://www.gnu.org/licenses/agpl
- :alt: License: AGPL-3
-
-==============================================
-Product Attribute Link on Website Product view
-==============================================
-
-This module adds a list of attribute values related to a product on the Product page from website frontend.
-Each attribute value is added on Product page as a link which redirects the user to the shop page already filtered by this attribute value.
-Please take in mind that only the attributes with one value set on product would be added on Product page. Those attribute with more than one value set (which generate variants of product) would not be added.
-
-Installation
-============
-
-To install this module, you need to:
-
-#. Just install it
-
-Configuration
-=============
-
-To configure this module, you need to:
-
-#. Go to Website > eCommerce > Products > Attributes and set which attribute you would like to show on website as a link by toggling the field Website Link On Product.
-
-Usage
-=====
-
-To use this module, you need to:
-
-#. Go to a product on website
-#. Click on any attribute value link
-
-.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
- :alt: Try me on Runbot
- :target: http://runbot.adhoc.com.ar/
-
-Bug Tracker
-===========
-
-Bugs are tracked on `GitHub Issues
-`_. In case of trouble, please
-check there if your issue has already been reported. If you spotted it first,
-help us smashing it by providing a detailed and welcomed feedback.
-
-Credits
-=======
-
-Images
-------
-
-* |company| |icon|
-
-Contributors
-------------
-
-Maintainer
-----------
-
-|company_logo|
-
-This module is maintained by the |company|.
-
-To contribute to this module, please visit https://www.adhoc.com.ar.
diff --git a/website_product_attribute_link/__init__.py b/website_product_attribute_link/__init__.py
deleted file mode 100644
index d0337769..00000000
--- a/website_product_attribute_link/__init__.py
+++ /dev/null
@@ -1,5 +0,0 @@
-##############################################################################
-# For copyright and license notices, see __manifest__.py file in module root
-# directory
-##############################################################################
-from . import models
diff --git a/website_product_attribute_link/__manifest__.py b/website_product_attribute_link/__manifest__.py
deleted file mode 100644
index b7cf6c1d..00000000
--- a/website_product_attribute_link/__manifest__.py
+++ /dev/null
@@ -1,40 +0,0 @@
-##############################################################################
-#
-# Copyright (C) 2016 ADHOC SA (http://www.adhoc.com.ar)
-# All Rights Reserved.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as
-# published by the Free Software Foundation, either version 3 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-#
-##############################################################################
-{
- "name": "Product Attribute Link on Website Product view",
- "version": "16.0.1.0.0",
- "category": "Product",
- "sequence": 14,
- "summary": "",
- "author": "ADHOC SA",
- "website": "www.adhoc.com.ar",
- "license": "AGPL-3",
- "images": [],
- "depends": [
- "website_sale",
- ],
- "data": [
- "views/product_attribute_views.xml",
- "views/product_attributes_templates.xml",
- "security/product_group_security.xml",
- ],
- "installable": False,
- "application": False,
-}
diff --git a/website_product_attribute_link/i18n/es.po b/website_product_attribute_link/i18n/es.po
deleted file mode 100644
index 1ae91f16..00000000
--- a/website_product_attribute_link/i18n/es.po
+++ /dev/null
@@ -1,40 +0,0 @@
-# Translation of Odoo Server.
-# This file contains the translation of the following modules:
-# * website_product_attribute_link
-#
-# Translators:
-# Juan José Scarafía , 2022
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Odoo Server 15.0+e\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-04-25 14:42+0000\n"
-"PO-Revision-Date: 2022-04-19 18:58+0000\n"
-"Last-Translator: Juan José Scarafía , 2022\n"
-"Language-Team: Spanish (https://www.transifex.com/adhoc/teams/133229/es/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: \n"
-"Language: es\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#. module: website_product_attribute_link
-#: model:ir.model.fields,help:website_product_attribute_link.field_product_attribute__website_link_on_product
-msgid ""
-"Add a link on website product view so that user can click on an attribute "
-"value and go to a search of products of that value"
-msgstr ""
-"Agregue un vínculo en la vista de producto del sitio web para que el usuario"
-" pueda hacer click en un valor de atributo e ir a una búsqueda de productos "
-"de ese valor"
-
-#. module: website_product_attribute_link
-#: model:ir.model,name:website_product_attribute_link.model_product_attribute
-msgid "Product Attribute"
-msgstr "Atributo de producto"
-
-#. module: website_product_attribute_link
-#: model:ir.model.fields,field_description:website_product_attribute_link.field_product_attribute__website_link_on_product
-msgid "Website Link On Product"
-msgstr "Enlace al sitio web en el producto"
diff --git a/website_product_attribute_link/i18n/ru.po b/website_product_attribute_link/i18n/ru.po
deleted file mode 100644
index cc460eea..00000000
--- a/website_product_attribute_link/i18n/ru.po
+++ /dev/null
@@ -1,37 +0,0 @@
-# Translation of Odoo Server.
-# This file contains the translation of the following modules:
-# * website_product_attribute_link
-#
-# Translators:
-# Ekaterina , 2020
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Odoo Server 13.0\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2021-01-04 20:33+0000\n"
-"PO-Revision-Date: 2020-07-07 03:04+0000\n"
-"Last-Translator: Ekaterina , 2020\n"
-"Language-Team: Russian (https://www.transifex.com/adhoc/teams/46451/ru/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: \n"
-"Language: ru\n"
-"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n"
-
-#. module: website_product_attribute_link
-#: model:ir.model.fields,help:website_product_attribute_link.field_product_attribute__website_link_on_product
-msgid ""
-"Add a link on website product view so that user can click on an attribute "
-"value and go to a search of products of that value"
-msgstr ""
-
-#. module: website_product_attribute_link
-#: model:ir.model,name:website_product_attribute_link.model_product_attribute
-msgid "Product Attribute"
-msgstr ""
-
-#. module: website_product_attribute_link
-#: model:ir.model.fields,field_description:website_product_attribute_link.field_product_attribute__website_link_on_product
-msgid "Website Link On Product"
-msgstr "Ссылка на продукт"
diff --git a/website_product_attribute_link/models/__init__.py b/website_product_attribute_link/models/__init__.py
deleted file mode 100644
index 8afd9282..00000000
--- a/website_product_attribute_link/models/__init__.py
+++ /dev/null
@@ -1,5 +0,0 @@
-##############################################################################
-# For copyright and license notices, see __manifest__.py file in module root
-# directory
-##############################################################################
-from . import product_attribute
diff --git a/website_product_attribute_link/models/product_attribute.py b/website_product_attribute_link/models/product_attribute.py
deleted file mode 100644
index 3c9caab2..00000000
--- a/website_product_attribute_link/models/product_attribute.py
+++ /dev/null
@@ -1,19 +0,0 @@
-##############################################################################
-# For copyright and license notices, see __manifest__.py file in module root
-# directory
-##############################################################################
-import logging
-
-from odoo import fields, models
-
-_logger = logging.getLogger(__name__)
-
-
-class ProductAttribute(models.Model):
- _inherit = "product.attribute"
-
- website_link_on_product = fields.Boolean(
- default=True,
- help="Add a link on website product view so that user can click on an "
- "attribute value and go to a search of products of that value",
- )
diff --git a/website_product_attribute_link/security/product_group_security.xml b/website_product_attribute_link/security/product_group_security.xml
deleted file mode 100644
index cbccd230..00000000
--- a/website_product_attribute_link/security/product_group_security.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/website_product_attribute_link/views/product_attribute_views.xml b/website_product_attribute_link/views/product_attribute_views.xml
deleted file mode 100644
index d67d6c9f..00000000
--- a/website_product_attribute_link/views/product_attribute_views.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
- product.attribute.tree.type
- product.attribute
-
-
-
-
-
-
-
-
-
- product.attribute.form.type
- product.attribute
-
-
-
-
-
-
-
-
diff --git a/website_product_attribute_link/views/product_attributes_templates.xml b/website_product_attribute_link/views/product_attributes_templates.xml
deleted file mode 100644
index dc50b1b2..00000000
--- a/website_product_attribute_link/views/product_attributes_templates.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
- $0
-
- $0
-
-
-