I have a test i'm writing which reads in a string and then takes that string and applies it to a switch statement. I then match the string to the case and set an integer value which I pass back to the spec page which then passes the int value to another test that I use for an if statement. I cannot get the int to pass so the if statement will not work properly.
The object for switch:
var appsNotPurchased = 0;
this.checksHomeSublevel = function(mmCode) {
    browser.get('https://iplan-qa.meetingmatrix.com/Home/Index/' + mmCode);
    marketingObjects.level.getText().then(function(text) {
      var homeText = text;
      browser.get('https://iplan-qa.meetingmatrix.com/Home/Apps/' + mmCode);
      expect($('div.apps-subscription > span').getText()).toEqual('iPlan Level: ' + homeText);
      switch (homeText) {
        case 'Select':
          console.log(homeText);
          appsNotPurchased = 6;
          return appsNotPurchased;
          break;
        case 'Content':
          console.log(homeText);
          appsNotPurchased = 0 || 1 || 2 || 3 || 4 || 5 || 6;
          return appsNotPurchased;
          break;
      }
    });
the testSpec describe function:
describe('should upload media: ', function() {
  it('should select add media', function() {
    var mmCode = "ACC0572";
    var appsNotPurchased = appsObjects.checksHomeSublevel(mmCode);
    appsObjects.checksSubLevelSelect(mmCode, appsNotPurchased);
  });
});
The object I am passing the value to:
    this.checksSubLevelSelect = function(mmCode, appsNotPurchased) {
      //counts the apps
      apps.count().then(function(count) {
        expect(count).toEqual(7);
        for (var i = 0; i < count; i++) {
          if (appsPlace == appsNotPurchased) {
            //does something here
          } else {
            //does something here
          }
          appsPlace++;
        }
      });
    };
 
     
    