-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* pytest usage * Update test and environment * Update README
- Loading branch information
Showing
10 changed files
with
66 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 14 additions & 17 deletions
31
addons/template/template_module/static/tests/tours/test_tour.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,14 @@ | ||
odoo.define('sale.tour', function(require) { | ||
"use strict"; | ||
|
||
const {_t} = require('web.core'); | ||
var tour = require('web_tour.tour'); | ||
|
||
tour.register('template_tour', { | ||
url: '/web', // Here, you can specify any other starting url | ||
test: true, | ||
}, [ | ||
tour.stepUtils.showAppsMenuItem(), | ||
{ | ||
trigger: ".o_app[data-menu-xmlid='base.menu_management']", | ||
content: _t("Open Apps"), | ||
}, | ||
]); | ||
}); | ||
/** @odoo-module */ | ||
import tour from 'web_tour.tour'; | ||
tour.register('template_tour', { | ||
url: "/web", | ||
test: true, | ||
}, [ | ||
// tour.stepUtils.showAppsMenuItem(), | ||
...tour.stepUtils.goToAppSteps('base.menu_management', 'Open apps'), | ||
{ | ||
content: "Find something", | ||
trigger: 'a', | ||
run: function() {}, // do nothing | ||
}, | ||
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,15 @@ | ||
# https://www.odoo.com/documentation/16.0/developer/reference/backend/testing.html | ||
from odoo.tests.common import TransactionCase | ||
from odoo.tests.common import Form, TransactionCase | ||
|
||
|
||
class ExampleCase(TransactionCase): | ||
def test_create(self): | ||
"""Default create""" | ||
obj = self.env['template.template'].create({'name': 'test'}) | ||
self.assertEqual(len(obj), 1) | ||
|
||
def test_form(self): | ||
f = Form(self.env['template.template']) | ||
f.name = 'abc' | ||
self.assertEqual(f.hello, "Hello abc") | ||
f.save() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters