[REM] web_tests_demo: useless example module

This commit is contained in:
Antony Lesuisse
2015-08-01 19:12:18 +02:00
parent 6426648cee
commit 746046b9ea
18 changed files with 0 additions and 776 deletions
-5
View File
@@ -1111,8 +1111,3 @@ source_lang = en
file_filter = addons/web_tests/i18n/<lang>.po
source_file = addons/web_tests/i18n/web_tests.pot
source_lang = en
[odoo-9.web_tests_demo]
file_filter = addons/web_tests_demo/i18n/<lang>.po
source_file = addons/web_tests_demo/i18n/web_tests_demo.pot
source_lang = en
-13
View File
@@ -1,13 +0,0 @@
from openerp.osv import orm, fields
class TestObject(orm.TransientModel):
_name = 'web_tests_demo.model'
_columns = {
'name': fields.char("Name", required=True),
'thing': fields.char("Thing"),
'other': fields.char("Other", required=True)
}
_defaults = {
'other': "bob"
}
-15
View File
@@ -1,15 +0,0 @@
{
'name': "Demonstration of web/javascript tests",
'category': 'Hidden',
'description': """
OpenERP Web demo of a test suite
================================
Test suite example, same code as that used in the testing documentation.
""",
'depends': ['web'],
'data' : [
'views/web_tests_demo.xml',
],
'qweb': ['static/src/xml/demo.xml'],
}
-58
View File
@@ -1,58 +0,0 @@
# German translation for openerp-web
# Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014
# This file is distributed under the same license as the openerp-web package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2014.
#
msgid ""
msgstr ""
"Project-Id-Version: openerp-web\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2014-08-14 13:09+0000\n"
"PO-Revision-Date: 2014-08-18 20:05+0000\n"
"Last-Translator: Ralf Hilgenstock <rh@dialoge.info>\n"
"Language-Team: German <de@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-08-19 07:07+0000\n"
"X-Generator: Launchpad (build 17156)\n"
#. module: web_tests_demo
#: field:web_tests_demo.model,create_uid:0
msgid "Created by"
msgstr "Angelegt von"
#. module: web_tests_demo
#: field:web_tests_demo.model,create_date:0
msgid "Created on"
msgstr "Angelegt am"
#. module: web_tests_demo
#: field:web_tests_demo.model,id:0
msgid "ID"
msgstr "ID"
#. module: web_tests_demo
#: field:web_tests_demo.model,write_uid:0
msgid "Last Updated by"
msgstr "Zuletzt aktualisiert durch"
#. module: web_tests_demo
#: field:web_tests_demo.model,write_date:0
msgid "Last Updated on"
msgstr "Zuletzt aktualisiert am"
#. module: web_tests_demo
#: field:web_tests_demo.model,name:0
msgid "Name"
msgstr "Name"
#. module: web_tests_demo
#: field:web_tests_demo.model,other:0
msgid "Other"
msgstr "Andere"
#. module: web_tests_demo
#: field:web_tests_demo.model,thing:0
msgid "Thing"
msgstr "Sache"
-58
View File
@@ -1,58 +0,0 @@
# English (United Kingdom) translation for openerp-web
# Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014
# This file is distributed under the same license as the openerp-web package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2014.
#
msgid ""
msgstr ""
"Project-Id-Version: openerp-web\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2014-08-14 13:09+0000\n"
"PO-Revision-Date: 2014-09-02 15:09+0000\n"
"Last-Translator: Anthony Harrington <untaintableangel@ubuntu.com>\n"
"Language-Team: English (United Kingdom) <en_GB@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-09-03 07:30+0000\n"
"X-Generator: Launchpad (build 17196)\n"
#. module: web_tests_demo
#: field:web_tests_demo.model,create_uid:0
msgid "Created by"
msgstr "Created by"
#. module: web_tests_demo
#: field:web_tests_demo.model,create_date:0
msgid "Created on"
msgstr "Created on"
#. module: web_tests_demo
#: field:web_tests_demo.model,id:0
msgid "ID"
msgstr "ID"
#. module: web_tests_demo
#: field:web_tests_demo.model,write_uid:0
msgid "Last Updated by"
msgstr "Last Updated by"
#. module: web_tests_demo
#: field:web_tests_demo.model,write_date:0
msgid "Last Updated on"
msgstr "Last Updated on"
#. module: web_tests_demo
#: field:web_tests_demo.model,name:0
msgid "Name"
msgstr "Name"
#. module: web_tests_demo
#: field:web_tests_demo.model,other:0
msgid "Other"
msgstr "Other"
#. module: web_tests_demo
#: field:web_tests_demo.model,thing:0
msgid "Thing"
msgstr "Thing"
-58
View File
@@ -1,58 +0,0 @@
# Spanish translation for openerp-web
# Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014
# This file is distributed under the same license as the openerp-web package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2014.
#
msgid ""
msgstr ""
"Project-Id-Version: openerp-web\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2014-08-14 13:09+0000\n"
"PO-Revision-Date: 2014-08-15 07:19+0000\n"
"Last-Translator: Pedro Manuel Baeza <pedro.baeza@gmail.com>\n"
"Language-Team: Spanish <es@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-08-16 06:57+0000\n"
"X-Generator: Launchpad (build 17156)\n"
#. module: web_tests_demo
#: field:web_tests_demo.model,create_uid:0
msgid "Created by"
msgstr "Creado por"
#. module: web_tests_demo
#: field:web_tests_demo.model,create_date:0
msgid "Created on"
msgstr "Creado en"
#. module: web_tests_demo
#: field:web_tests_demo.model,id:0
msgid "ID"
msgstr "ID"
#. module: web_tests_demo
#: field:web_tests_demo.model,write_uid:0
msgid "Last Updated by"
msgstr "Última actualización de"
#. module: web_tests_demo
#: field:web_tests_demo.model,write_date:0
msgid "Last Updated on"
msgstr "Última actualización en"
#. module: web_tests_demo
#: field:web_tests_demo.model,name:0
msgid "Name"
msgstr "Nombre"
#. module: web_tests_demo
#: field:web_tests_demo.model,other:0
msgid "Other"
msgstr "Otro"
#. module: web_tests_demo
#: field:web_tests_demo.model,thing:0
msgid "Thing"
msgstr "Cosa"
-58
View File
@@ -1,58 +0,0 @@
# Hungarian translation for openerp-web
# Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014
# This file is distributed under the same license as the openerp-web package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2014.
#
msgid ""
msgstr ""
"Project-Id-Version: openerp-web\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2014-08-14 13:09+0000\n"
"PO-Revision-Date: 2014-09-04 09:17+0000\n"
"Last-Translator: krnkris <Unknown>\n"
"Language-Team: Hungarian <hu@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-09-05 01:13+0000\n"
"X-Generator: Launchpad (build 17196)\n"
#. module: web_tests_demo
#: field:web_tests_demo.model,create_uid:0
msgid "Created by"
msgstr "Készítette"
#. module: web_tests_demo
#: field:web_tests_demo.model,create_date:0
msgid "Created on"
msgstr "Létrehozás dátuma"
#. module: web_tests_demo
#: field:web_tests_demo.model,id:0
msgid "ID"
msgstr "Azonosító ID"
#. module: web_tests_demo
#: field:web_tests_demo.model,write_uid:0
msgid "Last Updated by"
msgstr "Utoljára frissítve, által"
#. module: web_tests_demo
#: field:web_tests_demo.model,write_date:0
msgid "Last Updated on"
msgstr "Utoljára frissítve ekkor"
#. module: web_tests_demo
#: field:web_tests_demo.model,name:0
msgid "Name"
msgstr "Név"
#. module: web_tests_demo
#: field:web_tests_demo.model,other:0
msgid "Other"
msgstr "Egyéb"
#. module: web_tests_demo
#: field:web_tests_demo.model,thing:0
msgid "Thing"
msgstr "Ügy"
-58
View File
@@ -1,58 +0,0 @@
# Dutch translation for openerp-web
# Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014
# This file is distributed under the same license as the openerp-web package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2014.
#
msgid ""
msgstr ""
"Project-Id-Version: openerp-web\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2014-08-14 13:09+0000\n"
"PO-Revision-Date: 2014-08-14 19:30+0000\n"
"Last-Translator: Mario Gielissen (Openworx) <Unknown>\n"
"Language-Team: Dutch <nl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-08-15 08:24+0000\n"
"X-Generator: Launchpad (build 17156)\n"
#. module: web_tests_demo
#: field:web_tests_demo.model,create_uid:0
msgid "Created by"
msgstr "Aangemaakt door"
#. module: web_tests_demo
#: field:web_tests_demo.model,create_date:0
msgid "Created on"
msgstr "Aangemaakt op"
#. module: web_tests_demo
#: field:web_tests_demo.model,id:0
msgid "ID"
msgstr "ID"
#. module: web_tests_demo
#: field:web_tests_demo.model,write_uid:0
msgid "Last Updated by"
msgstr "Laatst bijgewerkt door"
#. module: web_tests_demo
#: field:web_tests_demo.model,write_date:0
msgid "Last Updated on"
msgstr "Laatst bijgewerkt op"
#. module: web_tests_demo
#: field:web_tests_demo.model,name:0
msgid "Name"
msgstr "Naam"
#. module: web_tests_demo
#: field:web_tests_demo.model,other:0
msgid "Other"
msgstr "Overige"
#. module: web_tests_demo
#: field:web_tests_demo.model,thing:0
msgid "Thing"
msgstr "Ding"
-58
View File
@@ -1,58 +0,0 @@
# Portuguese translation for openerp-web
# Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014
# This file is distributed under the same license as the openerp-web package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2014.
#
msgid ""
msgstr ""
"Project-Id-Version: openerp-web\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2014-08-14 13:09+0000\n"
"PO-Revision-Date: 2014-09-16 13:43+0000\n"
"Last-Translator: Opencloud - PT <Unknown>\n"
"Language-Team: Portuguese <pt@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-09-17 08:29+0000\n"
"X-Generator: Launchpad (build 17196)\n"
#. module: web_tests_demo
#: field:web_tests_demo.model,create_uid:0
msgid "Created by"
msgstr "Criada por"
#. module: web_tests_demo
#: field:web_tests_demo.model,create_date:0
msgid "Created on"
msgstr "Criado em"
#. module: web_tests_demo
#: field:web_tests_demo.model,id:0
msgid "ID"
msgstr "ID"
#. module: web_tests_demo
#: field:web_tests_demo.model,write_uid:0
msgid "Last Updated by"
msgstr "Última Actualização por"
#. module: web_tests_demo
#: field:web_tests_demo.model,write_date:0
msgid "Last Updated on"
msgstr "Última Actualização em"
#. module: web_tests_demo
#: field:web_tests_demo.model,name:0
msgid "Name"
msgstr "Nome"
#. module: web_tests_demo
#: field:web_tests_demo.model,other:0
msgid "Other"
msgstr "Outro"
#. module: web_tests_demo
#: field:web_tests_demo.model,thing:0
msgid "Thing"
msgstr "Coisa"
-59
View File
@@ -1,59 +0,0 @@
# Brazilian Portuguese translation for openerp-web
# Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014
# This file is distributed under the same license as the openerp-web package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2014.
#
msgid ""
msgstr ""
"Project-Id-Version: openerp-web\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2014-08-14 13:09+0000\n"
"PO-Revision-Date: 2014-08-30 00:30+0000\n"
"Last-Translator: Fábio Martinelli - http://zupy.com.br "
"<webmaster@zupy.com.br>\n"
"Language-Team: Brazilian Portuguese <pt_BR@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-08-30 08:40+0000\n"
"X-Generator: Launchpad (build 17176)\n"
#. module: web_tests_demo
#: field:web_tests_demo.model,create_uid:0
msgid "Created by"
msgstr "Criado por"
#. module: web_tests_demo
#: field:web_tests_demo.model,create_date:0
msgid "Created on"
msgstr "Criado em"
#. module: web_tests_demo
#: field:web_tests_demo.model,id:0
msgid "ID"
msgstr "ID"
#. module: web_tests_demo
#: field:web_tests_demo.model,write_uid:0
msgid "Last Updated by"
msgstr "Última atualização por"
#. module: web_tests_demo
#: field:web_tests_demo.model,write_date:0
msgid "Last Updated on"
msgstr "Última atualização em"
#. module: web_tests_demo
#: field:web_tests_demo.model,name:0
msgid "Name"
msgstr "Nome"
#. module: web_tests_demo
#: field:web_tests_demo.model,other:0
msgid "Other"
msgstr "Outro"
#. module: web_tests_demo
#: field:web_tests_demo.model,thing:0
msgid "Thing"
msgstr "Item"
-58
View File
@@ -1,58 +0,0 @@
# Romanian translation for openerp-web
# Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014
# This file is distributed under the same license as the openerp-web package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2014.
#
msgid ""
msgstr ""
"Project-Id-Version: openerp-web\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2014-08-14 13:09+0000\n"
"PO-Revision-Date: 2014-10-23 17:05+0000\n"
"Last-Translator: Dorin <dhongu@gmail.com>\n"
"Language-Team: Romanian <ro@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-10-24 07:08+0000\n"
"X-Generator: Launchpad (build 17203)\n"
#. module: web_tests_demo
#: field:web_tests_demo.model,create_uid:0
msgid "Created by"
msgstr "Creat de"
#. module: web_tests_demo
#: field:web_tests_demo.model,create_date:0
msgid "Created on"
msgstr "Creat la"
#. module: web_tests_demo
#: field:web_tests_demo.model,id:0
msgid "ID"
msgstr "ID"
#. module: web_tests_demo
#: field:web_tests_demo.model,write_uid:0
msgid "Last Updated by"
msgstr "Ultima actualizare făcută de"
#. module: web_tests_demo
#: field:web_tests_demo.model,write_date:0
msgid "Last Updated on"
msgstr "Ultima actualizare în"
#. module: web_tests_demo
#: field:web_tests_demo.model,name:0
msgid "Name"
msgstr "Nume"
#. module: web_tests_demo
#: field:web_tests_demo.model,other:0
msgid "Other"
msgstr "Altul"
#. module: web_tests_demo
#: field:web_tests_demo.model,thing:0
msgid "Thing"
msgstr "Lucru"
-58
View File
@@ -1,58 +0,0 @@
# Turkish translation for openerp-web
# Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014
# This file is distributed under the same license as the openerp-web package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2014.
#
msgid ""
msgstr ""
"Project-Id-Version: openerp-web\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2014-08-14 13:09+0000\n"
"PO-Revision-Date: 2014-10-03 17:18+0000\n"
"Last-Translator: Ayhan KIZILTAN <Unknown>\n"
"Language-Team: Turkish <tr@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-10-04 06:51+0000\n"
"X-Generator: Launchpad (build 17196)\n"
#. module: web_tests_demo
#: field:web_tests_demo.model,create_uid:0
msgid "Created by"
msgstr "Oluşturan"
#. module: web_tests_demo
#: field:web_tests_demo.model,create_date:0
msgid "Created on"
msgstr "Oluşturma"
#. module: web_tests_demo
#: field:web_tests_demo.model,id:0
msgid "ID"
msgstr "ID"
#. module: web_tests_demo
#: field:web_tests_demo.model,write_uid:0
msgid "Last Updated by"
msgstr "Son Güncelleyen"
#. module: web_tests_demo
#: field:web_tests_demo.model,write_date:0
msgid "Last Updated on"
msgstr "Son Güncelleme"
#. module: web_tests_demo
#: field:web_tests_demo.model,name:0
msgid "Name"
msgstr "Adı"
#. module: web_tests_demo
#: field:web_tests_demo.model,other:0
msgid "Other"
msgstr "Diğer"
#. module: web_tests_demo
#: field:web_tests_demo.model,thing:0
msgid "Thing"
msgstr "Şey"
@@ -1,57 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_tests_demo
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-01-21 14:09+0000\n"
"PO-Revision-Date: 2015-01-21 14:09+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: web_tests_demo
#: field:web_tests_demo.model,create_uid:0
msgid "Created by"
msgstr ""
#. module: web_tests_demo
#: field:web_tests_demo.model,create_date:0
msgid "Created on"
msgstr ""
#. module: web_tests_demo
#: field:web_tests_demo.model,id:0
msgid "ID"
msgstr ""
#. module: web_tests_demo
#: field:web_tests_demo.model,write_uid:0
msgid "Last Updated by"
msgstr ""
#. module: web_tests_demo
#: field:web_tests_demo.model,write_date:0
msgid "Last Updated on"
msgstr ""
#. module: web_tests_demo
#: field:web_tests_demo.model,name:0
msgid "Name"
msgstr ""
#. module: web_tests_demo
#: field:web_tests_demo.model,other:0
msgid "Other"
msgstr ""
#. module: web_tests_demo
#: field:web_tests_demo.model,thing:0
msgid "Thing"
msgstr ""
-58
View File
@@ -1,58 +0,0 @@
# Chinese (Simplified) translation for openerp-web
# Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014
# This file is distributed under the same license as the openerp-web package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2014.
#
msgid ""
msgstr ""
"Project-Id-Version: openerp-web\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2014-08-14 13:09+0000\n"
"PO-Revision-Date: 2014-08-20 02:31+0000\n"
"Last-Translator: Wei \"oldrev\" Li <oldrev@gmail.com>\n"
"Language-Team: Chinese (Simplified) <zh_CN@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-08-21 06:54+0000\n"
"X-Generator: Launchpad (build 17163)\n"
#. module: web_tests_demo
#: field:web_tests_demo.model,create_uid:0
msgid "Created by"
msgstr "创建者"
#. module: web_tests_demo
#: field:web_tests_demo.model,create_date:0
msgid "Created on"
msgstr "创建时间"
#. module: web_tests_demo
#: field:web_tests_demo.model,id:0
msgid "ID"
msgstr "ID"
#. module: web_tests_demo
#: field:web_tests_demo.model,write_uid:0
msgid "Last Updated by"
msgstr "最近更新者"
#. module: web_tests_demo
#: field:web_tests_demo.model,write_date:0
msgid "Last Updated on"
msgstr "最近更新时间"
#. module: web_tests_demo
#: field:web_tests_demo.model,name:0
msgid "Name"
msgstr "名称"
#. module: web_tests_demo
#: field:web_tests_demo.model,other:0
msgid "Other"
msgstr "其它"
#. module: web_tests_demo
#: field:web_tests_demo.model,thing:0
msgid "Thing"
msgstr "东西"
@@ -1,17 +0,0 @@
odoo.define('web_tests_demo.demo', function (require) {
"use strict";
var core = require('web.core');
var SomeType = core.Class.extend({
init: function (value) {
this.value = value;
},
});
return {
value_true: true,
SomeType: SomeType,
};
});
@@ -1,7 +0,0 @@
<templates id="template" xml:space="preserve">
<div t-name="DemoTemplate">
<t t-foreach="5" t-as="value">
<p><t t-esc="value"/></p>
</t>
</div>
</templates>
-66
View File
@@ -1,66 +0,0 @@
odoo.define_section('basic section', [], function (test, mock) {
test('my first test', function (assert) {
assert.ok(true, "this test has run");
});
test('module content', ['web_tests_demo.demo'], function (assert, tests_demo) {
assert.ok(tests_demo.value_true, "should have a true value");
var type_instance = new tests_demo.SomeType(42);
assert.strictEqual(type_instance.value, 42, "should have provided value");
});
test('DOM content', function (assert) {
var $fix = $( "#qunit-fixture");
$fix.html('<div><span class="foo bar">ok</span></div>');
assert.ok($fix.find('span').hasClass('foo'),
"should have provided class");
});
test('clean fixture', function (assert) {
var $fix = $( "#qunit-fixture");
assert.ok(!$fix.children().length, "should have no content");
assert.ok(!$fix.text(), "should have no text");
});
test('templates', ['web.core'], function (assert, core) {
var s = core.qweb.render('DemoTemplate');
var texts = $(s).find('p').map(function () {
return $(this).text();
}).get();
assert.deepEqual(texts, ['0', '1', '2', '3', '4']);
});
test('asynchronous', function (assert) {
assert.expect(1);
var d = $.Deferred();
setTimeout(function () {
assert.ok(true);
d.resolve();
}, 100);
return d;
});
test('XML-RPC', ['web.DataModel'], function (assert, Model) {
assert.expect(3);
mock.add('people.famous:name_search', function (args, kwargs) {
assert.strictEqual(kwargs.name, 'bob');
return [
[1, "Microsoft Bob"],
[2, "Bob the Builder"],
[3, "Silent Bob"]
];
});
return new Model('people.famous')
.call('name_search', {name: 'bob'}).then(function (result) {
assert.strictEqual(result.length, 3, "shoud return 3 people");
assert.strictEqual(result[0][1], "Microsoft Bob",
"the most famous bob should be Microsoft Bob");
});
});
});
@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<template id="assets_backend" name="web_tests_demo assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript" src="/web_tests_demo/static/src/js/demo.js"></script>
</xpath>
</template>
<template id="qunit_suite" name="web_tests_demo qunit" inherit_id="web.qunit_suite">
<xpath expr="//head" position="inside">
<script type="text/javascript" src="/web_tests_demo/static/test/demo.js"></script>
</xpath>
</template>
</data>
</openerp>