From 9f6230490e67e733d91bad3e60f6a043fe4d9728 Mon Sep 17 00:00:00 2001 From: bfederle Date: Fri, 9 Mar 2012 11:27:34 -0800 Subject: [PATCH] Add list view async action test --- ui/tests/test.listView.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/ui/tests/test.listView.js b/ui/tests/test.listView.js index 48dd0b673b6..f2894aea0ae 100644 --- a/ui/tests/test.listView.js +++ b/ui/tests/test.listView.js @@ -2,6 +2,7 @@ module('List view', { setup: function() { $.fx.off = true; + cloudStack.debug = true; }, teardown: function() { // Cleanup notification box @@ -339,7 +340,7 @@ var $cloudStack = $('
').appendTo('#qunit-fixture'); var listView = { listView: { - section: 'test123', + id: 'job123', fields: { fieldA: { label: 'testFieldA' }, fieldB: { label: 'testFieldB' } @@ -356,7 +357,19 @@ } }, action: function(args) { - args.response.success(); + args.response.success({ + _custom: { + jobId: 'job123' + } + }); + }, + notification: { + interval: 0, + poll: function(args) { + start(); + equal(args._custom.jobId, 'job123', 'Job ID passed correctly'); + args.complete(); + } } } },