summaryrefslogtreecommitdiff
path: root/addons/web/static/tests/views/graph_tests.js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2018-08-21 18:48:13 +0200
committerChristophe Simonis <chs@odoo.com>2018-08-21 18:48:13 +0200
commitef6b574eda3c3c5c8e911f2e8923e24ea8b50b50 (patch)
treea7f41d2feb24bf87a80ed67e529ed25a105b6416 /addons/web/static/tests/views/graph_tests.js
parent0c34698c478ab3adc7d768ad140fa4a4dd3d0969 (diff)
parent6cc7d3f9451eb41a472053dc3c04da0bbd3c7d1e (diff)
[MERGE] forward port branch saas-11.3 up to 6cc7d3f9451
Diffstat (limited to 'addons/web/static/tests/views/graph_tests.js')
-rw-r--r--addons/web/static/tests/views/graph_tests.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/addons/web/static/tests/views/graph_tests.js b/addons/web/static/tests/views/graph_tests.js
index 5f7227815c1..4939a8c9b37 100644
--- a/addons/web/static/tests/views/graph_tests.js
+++ b/addons/web/static/tests/views/graph_tests.js
@@ -190,6 +190,25 @@ QUnit.module('Views', {
});
QUnit.test('no content helper', function (assert) {
+ assert.expect(2);
+ this.data.foo.records = [];
+
+ var graph = createView({
+ View: GraphView,
+ model: "foo",
+ data: this.data,
+ arch: '<graph string="Gloups">' +
+ '<field name="product_id"/>' +
+ '</graph>',
+ });
+ assert.strictEqual(graph.$('div.o_graph_svg_container svg.nvd3-svg').length, 0,
+ "should not contain a div with a svg element");
+ assert.strictEqual(graph.$('div.o_view_nocontent').length, 1,
+ "should display the no content helper");
+ graph.destroy();
+ });
+
+ QUnit.test('no content helper after update', function (assert) {
var done = assert.async();
assert.expect(4);