Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Coopdevs OCB mirror
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coopdevs
Odoo
Coopdevs OCB mirror
Commits
4e2dffad
Commit
4e2dffad
authored
6 years ago
by
Alexandre Kühn
Browse files
Options
Downloads
Patches
Plain Diff
[ADD] web:tests: user menu basic tests
parent
09cbe3e3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
addons/web/static/tests/chrome/user_menu_tests.js
+31
-0
31 additions, 0 deletions
addons/web/static/tests/chrome/user_menu_tests.js
addons/web/views/webclient_templates.xml
+1
-0
1 addition, 0 deletions
addons/web/views/webclient_templates.xml
with
32 additions
and
0 deletions
addons/web/static/tests/chrome/user_menu_tests.js
0 → 100644
+
31
−
0
View file @
4e2dffad
odoo
.
define
(
'
web.user_menu_tests
'
,
function
(
require
)
{
"
use strict
"
;
var
testUtils
=
require
(
'
web.test_utils
'
);
var
UserMenu
=
require
(
'
web.UserMenu
'
);
var
Widget
=
require
(
'
web.Widget
'
);
QUnit
.
module
(
'
chrome
'
,
{},
function
()
{
QUnit
.
module
(
'
UserMenu
'
);
QUnit
.
test
(
'
basic rendering
'
,
function
(
assert
)
{
assert
.
expect
(
3
);
var
parent
=
new
Widget
();
testUtils
.
addMockEnvironment
(
parent
,
{});
var
userMenu
=
new
UserMenu
(
parent
);
userMenu
.
appendTo
(
$
(
'
body
'
));
assert
.
strictEqual
(
$
(
'
.o_user_menu
'
).
length
,
1
,
"
should have a user menu in the DOM
"
);
assert
.
ok
(
userMenu
.
$el
.
hasClass
(
'
o_user_menu
'
),
"
user menu in DOM should be from user menu widget instantiation
"
);
assert
.
strictEqual
(
userMenu
.
$
(
'
.dropdown-item[data-menu="shortcuts"]
'
).
length
,
1
,
"
should have a 'Shortcuts' item
"
);
userMenu
.
destroy
();
});
});
});
This diff is collapsed.
Click to expand it.
addons/web/views/webclient_templates.xml
+
1
−
0
View file @
4e2dffad
...
...
@@ -546,6 +546,7 @@
<script
type=
"text/javascript"
src=
"/web/static/tests/chrome/search_tests.js"
></script>
<script
type=
"text/javascript"
src=
"/web/static/tests/chrome/pager_tests.js"
></script>
<script
type=
"text/javascript"
src=
"/web/static/tests/chrome/keyboard_navigation_mixin_tests.js"
></script>
<script
type=
"text/javascript"
src=
"/web/static/tests/chrome/user_menu_tests.js"
></script>
<script
type=
"text/javascript"
src=
"/web/static/tests/widgets/data_export_tests.js"
/>
<script
type=
"text/javascript"
src=
"/web/static/tests/widgets/domain_selector_tests.js"
/>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment