increase sales order workspace test timeout
authorTravis Webb <me@traviswebb.com>
Tue, 17 Jun 2014 17:34:41 +0000 (13:34 -0400)
committerTravis Webb <me@traviswebb.com>
Tue, 17 Jun 2014 17:34:41 +0000 (13:34 -0400)
test/extensions/sales/sales_order_workspace.js

index 5366e94..1a9ef90 100644 (file)
@@ -45,7 +45,7 @@
     };
 
   describe('Sales Order Workspace', function () {
-    this.timeout(20 * 1000);
+    this.timeout(60 * 1000);
 
     //
     // We'll want to have TTOYS, BTRUCK1, and WH1 onhand and ready for the test to work.
@@ -65,6 +65,8 @@
         smoke.navigateToNewWorkspace(XT.app, "XV.SalesOrderList", function (workspaceContainer) {
           workspace = workspaceContainer.$.workspace;
 
+          workspace.value.once("change:total", done);
+
           assert.equal(workspace.value.recordType, "XM.SalesOrder");
           //
           // Set the customer from the appropriate workspace quantityWidget
           // know that the workspace is ready to save.
           // It's good practice to set this trigger *before* we change the line
           // item fields, so that we're 100% sure we're ready for the responses.
-          workspace.value.once("change:total", function () {
-            done();
-            /* The following save was moved to the second test
-            smoke.saveWorkspace(workspace, function (err, model) {
-              assert.isNull(err);
-              // TODO: sloppy
-              setTimeout(function () {
-                smoke.deleteFromList(XT.app, model, done);
-              }, 2000);
-            });*/
-          });
 
           //
           // Set the line item fields