Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMP] *: add test tours for customizations #142

Open
wants to merge 1 commit into
base: saas-17.3
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
14 changes: 14 additions & 0 deletions tests/test_condominium/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
'name': 'test condominium industry',
'version': '1.0',
'category': 'Hidden/Tests',
'description': """A module to test Condominium business flows.""",
'depends': ['base'],
'assets': {
'web.assets_tests': [
'test_condominium/static/src/**/*',
],
},
'installable': True,
'license': 'LGPL-3',
}
99 changes: 99 additions & 0 deletions tests/test_condominium/static/src/js/tours/fields_and_views.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
import { registry } from '@web/core/registry';

registry.category("web_tour.tours").add("condominium_properties_and_units", {
url: "/odoo",
steps: () => [
{
"trigger": ".o_app[data-menu-xmlid='contacts\\.menu_contacts']",
"run": "click"
},
{
"trigger": ".o-dropdown-item[data-menu-xmlid='condominium\\.contacts_property_config_menu']",
"run": "click"
},
{
"trigger": ".o_facet_remove",
"run": "click"
},
{
"trigger": ".o-dropdown[data-menu-xmlid='contacts\\.res_partner_menu_config']",
"run": "click"
},
{
"trigger": ".o-dropdown-item[data-menu-xmlid='condominium\\.contacts_property_tags_config_menu']",
"run": "click"
},
{
"trigger": ".o_list_button_add",
"run": "click"
},
{
"trigger": ".o_field_widget[name='x_name'] > .o_input",
"run": "edit Tag"
},
{
"trigger": ".o-dropdown-item[data-menu-xmlid='condominium\\.contacts_property_config_menu']",
"run": "click"
},
{
"trigger": ".o_kanban_header input",
"run": "edit New Condominium"
},
{
"trigger": ".o_kanban_add",
"run": "click"
},
{
"trigger": ".o-kanban-button-new",
"run": "click"
},
{
"trigger": ".o_field_widget[name='x_name'] > .o_input",
"run": "edit New Property"
},
{
"trigger": ".o_field_widget[name='x_condominium_id'] .o-autocomplete--input",
"run": "click "
},
{
"trigger": ".o-autocomplete--dropdown-item:contains('My ') > a",
"run": "click"
},
{
"trigger": ".o_field_widget[name='x_partner_id'] .o-autocomplete--input",
"run": "click"
},
{
"trigger": ".o-autocomplete--dropdown-item:nth-child(3) > a",
"run": "click"
},
{
"trigger": ".o_field_widget[name='x_tenant_id'] .o-autocomplete--input",
"run": "click"
},
{
"trigger": ".o-autocomplete--dropdown-item:nth-child(3) > a",
"run": "click"
},
{
"trigger": ".o_field_widget[name='x_area'] > .o_input",
"run": "edit 120"
},
{
"trigger": ".o_field_many2many_selection .o-autocomplete--input",
"run": "click"
},
{
"trigger": ".o_field_widget[name='x_notes'] div[contenteditable='true']",
"run": "editor Some notes"
},
{
"trigger": ".o_back_button > a",
"run": "click"
},
{
"trigger": ".o_kanban_card_content",
"run": "click"
}
],
});
1 change: 1 addition & 0 deletions tests/test_condominium/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import test_condominium
8 changes: 8 additions & 0 deletions tests/test_condominium/tests/test_condominium.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from odoo.tests import HttpCase, tagged


@tagged('post_install', '-at_install')
class TestUi(HttpCase):

def test_fields_and_views(self):
self.start_tour("/web", 'condominium_properties_and_units', login="admin")