sales order workspace test tweak
authorjulesstp <julianmcarlin@gmail.com>
Thu, 19 Jun 2014 03:46:34 +0000 (21:46 -0600)
committerjulesstp <julianmcarlin@gmail.com>
Thu, 19 Jun 2014 03:46:34 +0000 (21:46 -0600)
test/extensions/sales/sales_order_workspace.js

index 4635708..939e283 100644 (file)
         });
       });
       it('Supply list should have action to open Item Workbench', function (done) {
-        if (!XT.extensions.inventory) {
-          done();
-          return;
-        }
+        if (!XT.extensions.inventory) {return done(); }
         var verify,
           action = _.find(gridBox.$.supplyList.actions, function (action) {
             return action.name === "openItemWorkbench";
         */
       });
       it('after saving, should not be able to Open and have edit privs in Item Site Workspace', function (done) {
-        if (!XT.extensions.inventory) {done(); }
+        if (!XT.extensions.inventory) {return done(); }
         var originator = {}, statusReadyClean, workspaceContainer;
         originator.name = "openItem";
         // It's NOT a new order, go and make sure that we can't edit (after opening) Item Site WS
       it('changing the Schedule Date updates the line item\'s schedule date', function (done) {
         // Skip if no mfg ext or site cal not enabled... 
         // TODO - temporary until second notifyPopup (_nextWorkingDate) is handled properly in test
-        if (!XT.extensions.manufacturing || !XT.session.settings.get("UseSiteCalendar")) {done(); }
+        if (!(XT.extensions.manufacturing) || !(XT.session.settings.get("UseSiteCalendar"))) {return done(); }
         var getDowDate = function (dow) {
             var date = new Date(),
               currentDow = date.getDay(),
         workspace.value.set("scheduleDate", newScheduleDate);
       });
       it('save, then delete order', function (done) {
-        assert.isTrue(workspace.value.status === XM.Model.READY_DIRTY ||
-          workspace.value.status === XM.Model.READY_NEW);
+        assert.isTrue((workspace.value.status === XM.Model.READY_DIRTY ||
+          workspace.value.status === XM.Model.READY_NEW));
         smoke.saveWorkspace(workspace, function (err, model) {
           assert.isNull(err);
           // XXX - sloppy