Example #1
0
 public static addTagsToSecurityGroups(application: Application): void {
   if (!SETTINGS.feature.entityTags) {
     return;
   }
   const allTags = application.getDataSource('entityTags').data;
   const securityGroupTags: IEntityTags[] = allTags.filter(t => t.entityRef.entityType === 'securitygroup');
   application.getDataSource('securityGroups').data.forEach((securityGroup: ISecurityGroup) => {
     securityGroup.entityTags = securityGroupTags.find(
       t =>
         t.entityRef.entityId === securityGroup.name &&
         t.entityRef.account === securityGroup.account &&
         t.entityRef.region === securityGroup.region,
     );
   });
 }
Example #2
0
 public static addTagsToServerGroupManagers(application: Application): void {
   if (!SETTINGS.feature.entityTags) {
     return;
   }
   const allTags = application.getDataSource('entityTags').data;
   const serverGroupManagerTags: IEntityTags[] = allTags.filter(t => t.entityRef.entityType === 'servergroupmanager');
   application.getDataSource('serverGroupManagers').data.forEach((serverGroupManager: IServerGroupManager) => {
     serverGroupManager.entityTags = serverGroupManagerTags.find(
       t =>
         t.entityRef.entityId === serverGroupManager.name &&
         t.entityRef.account === serverGroupManager.account &&
         t.entityRef.region === serverGroupManager.region,
     );
   });
 }
Example #3
0
 public static addTagsToLoadBalancers(application: Application): void {
   if (!SETTINGS.feature.entityTags) {
     return;
   }
   const allTags = application.getDataSource('entityTags').data;
   const loadBalancerTags: IEntityTags[] = allTags.filter(t => t.entityRef.entityType === 'loadbalancer');
   application.getDataSource('loadBalancers').data.forEach((loadBalancer: ILoadBalancer) => {
     loadBalancer.entityTags = loadBalancerTags.find(
       t =>
         t.entityRef.entityId === loadBalancer.name &&
         t.entityRef.account === loadBalancer.account &&
         t.entityRef.region === loadBalancer.region,
     );
   });
 }
  it('attaches load balancer to firewall usages', function() {
    let data: any[] = null;

    const application: Application = ApplicationModelBuilder.createApplicationForTests(
      'app',
      {
        key: 'securityGroups',
        loader: () => $q.resolve([]),
        onLoad: (_app, _data) => $q.resolve(_data),
      },
      {
        key: 'serverGroups',
        loader: () => $q.resolve([]),
        onLoad: (_app, _data) => $q.resolve(_data),
      },
      {
        key: 'loadBalancers',
        loader: () =>
          $q.resolve([
            {
              name: 'my-elb',
              account: 'test',
              region: 'us-east-1',
              securityGroups: ['not-cached'],
            },
          ]),
        onLoad: (_app, _data) => $q.resolve(_data),
      },
    );

    application.serverGroups.refresh();
    application.loadBalancers.refresh();
    $scope.$digest();

    $http.expectGET(`${API.baseUrl}/securityGroups`).respond(200, {
      test: {
        aws: {
          'us-east-1': [{ name: 'not-cached' }],
        },
      },
    });
    reader.getApplicationSecurityGroups(application, null).then((results: any[]) => (data = results));
    $http.flush();
    $scope.$digest();
    const group: ISecurityGroup = data[0];
    expect(group.name).toBe('not-cached');
    expect(group.usages.loadBalancers[0]).toEqual({ name: application.getDataSource('loadBalancers').data[0].name });
  });
  it('should clear cache, then reload security groups and try again if a security group is not found', function () {
    let data: ISecurityGroup[] = null;
    const application: Application = applicationModelBuilder.createApplication(
      {
        key: 'securityGroups',
      },
      {
        key: 'serverGroups',
        ready: () => $q.when(null),
        loaded: true
      },
      {
        securityGroupsIndex: {}
      },
      {
        key: 'loadBalancers',
        ready: () => $q.when(null),
        loaded: true
      });
    application.getDataSource('securityGroups').data = [];
    application.getDataSource('serverGroups').data = [];
    application.getDataSource('loadBalancers').data = [
      {
        name: 'my-elb',
        account: 'test',
        region: 'us-east-1',
        securityGroups: [
          'not-cached',
        ]
      }
    ];

    $http.expectGET(API.baseUrl + '/securityGroups').respond(200, {
      test: {
        aws: {
          'us-east-1': [
            {name: 'not-cached', id: 'not-cached-id', vpcId: null}
          ]
        }
      }
    });

    reader.getApplicationSecurityGroups(application, []).then(results => data = results);
    $http.flush();
    const group: ISecurityGroup = data[0];
    expect(group.name).toBe('not-cached');
    expect(group.usages.loadBalancers[0]).toEqual({name: application.getDataSource('loadBalancers').data[0].name});
  });
 beforeEach(() => {
   application = ApplicationModelBuilder.createApplicationForTests(
     'app',
     {
       key: 'optionalSource',
       optional: true,
       visible: true,
     },
     {
       key: 'invisibleSource',
       visible: false,
     },
     {
       key: 'requiredSource',
       visible: true,
     },
     {
       key: 'optInSource',
       optional: true,
       visible: true,
       optIn: true,
     },
   );
   application.getDataSource('optInSource').disabled = true;
   application.attributes = { accounts: ['test'] };
 });
  private addServerGroupSecurityGroups(application: Application): ISecurityGroupProcessorResult {
    let notFoundCaught = false;
    const securityGroups: ISecurityGroup[] = [];
    application.getDataSource('serverGroups').data.forEach((serverGroup: IServerGroup) => {
      if (serverGroup.securityGroups) {
        serverGroup.securityGroups.forEach((securityGroupId: string) => {
          try {
            const securityGroup: ISecurityGroup = this.resolve(application['securityGroupsIndex'], serverGroup, securityGroupId);
            SecurityGroupReader.attachUsageFields(securityGroup);
            if (!securityGroup.usages.serverGroups.some((sg: IServerGroupUsage) => sg.name === serverGroup.name)) {
              securityGroup.usages.serverGroups.push({
                name: serverGroup.name,
                isDisabled: serverGroup.isDisabled,
                region: serverGroup.region,
              });
            }
            securityGroups.push(securityGroup);
          } catch (e) {
            this.$log.warn('could not attach security group to server group:', serverGroup.name, securityGroupId);
            notFoundCaught = true;
          }
        });
      }
    });

    return {notFoundCaught, securityGroups};
  }
 public addTagsToServerGroups(application: Application): void {
   if (!SETTINGS.feature.entityTags) {
     return;
   }
   const allTags = application.getDataSource('entityTags').data;
   const serverGroupTags: IEntityTags[] = allTags.filter(t => t.entityRef.entityType === 'servergroup');
   const clusterTags: IEntityTags[] = allTags.filter(t => t.entityRef.entityType === 'cluster');
   application.getDataSource('serverGroups').data.forEach((serverGroup: IServerGroup) => {
     serverGroup.entityTags = serverGroupTags.find(t => t.entityRef.entityId === serverGroup.name &&
       t.entityRef.account === serverGroup.account &&
       t.entityRef.region === serverGroup.region);
     serverGroup.clusterEntityTags = clusterTags.filter(t => t.entityRef.entityId === serverGroup.cluster &&
       (t.entityRef.account === '*' || t.entityRef.account === serverGroup.account) &&
       (t.entityRef.region === '*' || t.entityRef.region === serverGroup.region));
   });
 }
Example #9
0
 it('adds a server group when new one provided in same sub-sub-group', function(done) {
   application = this.buildApplication({
     serverGroups: {
       data: [
         this.serverGroup000,
         this.serverGroup001,
         {
           cluster: 'cluster-a',
           name: 'cluster-a-v003',
           account: 'prod',
           region: 'us-east-1',
           stringVal: 'new',
           category: 'serverGroup',
           instances: [],
         },
       ],
     },
   });
   application.clusters = clusterService.createServerGroupClusters(application.getDataSource('serverGroups').data);
   ClusterState.filterService.updateClusterGroups(application);
   setTimeout(() => {
     expect(ClusterState.filterModel.asFilterModel.groups.length).toBe(1);
     expect(ClusterState.filterModel.asFilterModel.groups[0].subgroups.length).toBe(1);
     expect(ClusterState.filterModel.asFilterModel.groups[0].subgroups[0].subgroups.length).toBe(1);
     expect(ClusterState.filterModel.asFilterModel.groups[0].subgroups[0].subgroups[0].serverGroups.length).toBe(3);
     expect(ClusterState.filterModel.asFilterModel.groups[0].subgroups[0].subgroups[0].serverGroups[2].name).toBe(
       'cluster-a-v003',
     );
     done();
   }, debounceTimeout);
 });
Example #10
0
    it('removes a group when one goes away', function(done) {
      application = this.buildApplication({
        serverGroups: {
          data: [
            this.serverGroup000,
            this.serverGroup001,
            {
              cluster: 'cluster-a',
              name: 'cluster-a-v003',
              account: 'test',
              region: 'us-east-1',
              stringVal: 'new',
              category: 'serverGroup',
              instances: [],
            },
          ],
        },
      });
      application.clusters = clusterService.createServerGroupClusters(application.getDataSource('serverGroups').data);
      ClusterState.filterService.updateClusterGroups(application);

      setTimeout(() => {
        expect(ClusterState.filterModel.asFilterModel.groups.length).toBe(2);
        application.getDataSource('serverGroups').data.splice(0, 2);
        ClusterState.filterService.updateClusterGroups(application);

        setTimeout(() => {
          expect(ClusterState.filterModel.asFilterModel.groups.length).toBe(1);
          expect(ClusterState.filterModel.asFilterModel.groups[0].heading).toBe('test');
          done();
        }, debounceTimeout);
      }, debounceTimeout);
    });
Example #11
0
  private addLoadBalancerSecurityGroups(application: Application): ISecurityGroupProcessorResult {
    let notFoundCaught = false;
    const securityGroups: ISecurityGroup[] = [];
    application.getDataSource('loadBalancers').data.forEach((loadBalancer: ILoadBalancer) => {
      if (loadBalancer.securityGroups) {
        loadBalancer.securityGroups.forEach((securityGroupId: string) => {
          try {
            const securityGroup: ISecurityGroup = this.resolve(
              application['securityGroupsIndex'],
              loadBalancer,
              securityGroupId,
            );
            SecurityGroupReader.attachUsageFields(securityGroup);
            if (!securityGroup.usages.loadBalancers.some(lb => lb.name === loadBalancer.name)) {
              securityGroup.usages.loadBalancers.push({ name: loadBalancer.name });
            }
            securityGroups.push(securityGroup);
          } catch (e) {
            this.$log.warn('could not attach firewall to load balancer:', loadBalancer.name, securityGroupId, e);
            notFoundCaught = true;
          }
        });
      }
    });

    return { notFoundCaught, securityGroups };
  }
  it('attaches load balancer to security group usages', function () {
    let data: any[] = null;

    const application: Application = applicationModelBuilder.createApplication(
      'app',
      {
        key: 'securityGroups',
        data: [],
        ready: () => $q.when(null),
      },
      {
        key: 'serverGroups',
        data: [],
        ready: () => $q.when(null),
        loaded: true
      },
      {
        key: 'loadBalancers',
        data: [
          {
            name: 'my-elb',
            account: 'test',
            region: 'us-east-1',
            securityGroups: [
              'not-cached',
            ]
          }
        ],
        ready: () => $q.when(null),
        loaded: true
      });

    $http.expectGET(`${API.baseUrl}/securityGroups`)
      .respond(200, {
        test: {
            aws: {
              'us-east-1': [{name: 'not-cached'}]
            }
        }
      });
    reader.getApplicationSecurityGroups(application, null).then((results: any[]) => data = results);
    $http.flush();
    $scope.$digest();
    const group: ISecurityGroup = data[0];
    expect(group.name).toBe('not-cached');
    expect(group.usages.loadBalancers[0]).toEqual({name: application.getDataSource('loadBalancers').data[0].name});
  });
 it('marks explicitly enabled opt-in sources from application data sources', () => {
   application.getDataSource('optInSource').disabled = false;
   initialize();
   expect(ctrl.model).toEqual({
     optionalSource: true,
     optInSource: true,
   });
 });
  it('should clear cache, then reload firewalls and try again if a firewall is not found', function() {
    let data: ISecurityGroup[] = null;
    const application: Application = ApplicationModelBuilder.createApplicationForTests(
      'app',
      {
        key: 'securityGroups',
      },
      {
        key: 'serverGroups',
        loader: () => $q.resolve([]),
        onLoad: (_app, _data) => $q.resolve(_data),
      },
      {
        key: 'loadBalancers',
        loader: () =>
          $q.resolve([
            {
              name: 'my-elb',
              account: 'test',
              region: 'us-east-1',
              securityGroups: ['not-cached'],
            },
          ]),
        onLoad: (_app, _data) => $q.resolve(_data),
      },
    );

    application.getDataSource('securityGroups').refresh();
    application.getDataSource('serverGroups').refresh();
    application.getDataSource('loadBalancers').refresh();
    $scope.$digest();

    $http.expectGET(API.baseUrl + '/securityGroups').respond(200, {
      test: {
        aws: {
          'us-east-1': [{ name: 'not-cached', id: 'not-cached-id', vpcId: null }],
        },
      },
    });

    reader.getApplicationSecurityGroups(application, []).then(results => (data = results));
    $http.flush();
    const group: ISecurityGroup = data[0];
    expect(group.name).toBe('not-cached');
    expect(group.usages.loadBalancers[0]).toEqual({ name: application.getDataSource('loadBalancers').data[0].name });
  });
Example #15
0
 function configureApplication() {
   ApplicationDataSourceRegistry.registerDataSource({ key: 'serverGroups' });
   application = ApplicationModelBuilder.createApplicationForTests(
     'app',
     ...ApplicationDataSourceRegistry.getDataSources(),
   );
   application.refresh();
   $scope.$digest();
 }
Example #16
0
    it('sets appropriate flags when task reload fails; subscriber is responsible for error checking', function() {
      spyOn(TaskReader, 'getTasks').and.returnValue($q.reject(null));
      let errorsHandled = 0,
        successesHandled = 0;
      configureApplication();
      application.getDataSource('tasks').onRefresh($scope, () => successesHandled++, () => errorsHandled++);

      application.getDataSource('tasks').refresh();
      $scope.$digest();

      expect(application.getDataSource('tasks').loading).toBe(false);
      expect(application.getDataSource('tasks').loadFailure).toBe(true);

      application.getDataSource('tasks').refresh();
      $scope.$digest();

      expect(errorsHandled).toBe(2);
      expect(successesHandled).toBe(0);
    });
Example #17
0
 it('adds executions and running tasks, even when stringVal does not change', function () {
   const runningTasks: any = [ { name: 'a' } ],
       executions: any = [ { name: 'b' } ];
   application = this.buildApplication({
     serverGroups: { data: [
       { cluster: 'cluster-a', name: 'cluster-a-v001', account: 'prod', region: 'us-east-1', stringVal: 'original',
         category: 'serverGroup', instances: []
       },
     ]}
   });
   application.getDataSource('serverGroups').data[0].runningTasks = runningTasks;
   application.getDataSource('serverGroups').data[0].runningExecutions = executions;
   application.clusters = clusterService.createServerGroupClusters(application.getDataSource('serverGroups').data);
   service.updateClusterGroups(application);
   $timeout.flush();
   expect(ClusterFilterModel.groups[0].subgroups[0].subgroups[0].serverGroups[0]).toBe(this.serverGroup001);
   expect(ClusterFilterModel.groups[0].subgroups[0].subgroups[0].serverGroups[0].runningTasks).toBe(runningTasks);
   expect(ClusterFilterModel.groups[0].subgroups[0].subgroups[0].serverGroups[0].runningExecutions).toBe(executions);
 });
Example #18
0
      setTimeout(() => {
        expect(ClusterState.filterModel.asFilterModel.groups.length).toBe(2);
        application.getDataSource('serverGroups').data.splice(0, 2);
        ClusterState.filterService.updateClusterGroups(application);

        setTimeout(() => {
          expect(ClusterState.filterModel.asFilterModel.groups.length).toBe(1);
          expect(ClusterState.filterModel.asFilterModel.groups[0].heading).toBe('test');
          done();
        }, debounceTimeout);
      }, debounceTimeout);
Example #19
0
    return application.getDataSource('loadBalancers').ready().then(() => {
      const upToDateLoadBalancer = application.getDataSource('loadBalancers').data.find((candidate: ILoadBalancer) => {
        return candidate.name === loadBalancer.name &&
          (candidate.account === loadBalancer.account || candidate.account === loadBalancer.credentials);
      });

      if (upToDateLoadBalancer) {
        loadBalancer.serverGroups = cloneDeep(upToDateLoadBalancer.serverGroups);
      }
      return loadBalancer;
    });
Example #20
0
    it('reloads executions and sets appropriate flags', function() {
      spyOn(executionService, 'getExecutions').and.returnValue($q.when([]));
      configureApplication();
      application.getDataSource('executions').activate();
      $scope.$digest();
      expect(application.getDataSource('executions').loaded).toBe(true);
      expect(application.getDataSource('executions').loading).toBe(false);
      expect(application.getDataSource('executions').loadFailure).toBe(false);

      application.getDataSource('executions').refresh();
      expect(application.getDataSource('executions').loading).toBe(true);

      $scope.$digest();
      expect(application.getDataSource('executions').loaded).toBe(true);
      expect(application.getDataSource('executions').loading).toBe(false);
      expect(application.getDataSource('executions').loadFailure).toBe(false);
    });
Example #21
0
 setTimeout(() => {
   expect(ClusterState.filterModel.asFilterModel.groups[0].subgroups[0].subgroups[0].serverGroups[0]).not.toBe(
     this.serverGroup000,
   );
   expect(ClusterState.filterModel.asFilterModel.groups[0].subgroups[0].subgroups[0].serverGroups[0]).toBe(
     application.getDataSource('serverGroups').data[0],
   );
   expect(ClusterState.filterModel.asFilterModel.groups[0].subgroups[0].subgroups[0].serverGroups[1]).toBe(
     this.serverGroup001,
   );
   done();
 }, debounceTimeout);
Example #22
0
    it('should filter out by unknown status if checked', function(done) {
      const starting: any = { healthState: 'Up' },
        serverGroup = application.getDataSource('serverGroups').data[0];
      serverGroup.instances.push(starting);

      ClusterState.filterModel.asFilterModel.sortFilter.status = { Unknown: true };
      ClusterState.filterService.updateClusterGroups(application);
      setTimeout(() => {
        expect(ClusterState.filterModel.asFilterModel.groups).toEqual([]);
        done();
      }, debounceTimeout);
    });
Example #23
0
    it('removes a subgroup when one goes away', function() {
      application = this.buildApplication({
        serverGroups: { data: [
          this.serverGroup000,
          this.serverGroup001,
          { cluster: 'cluster-b', name: 'cluster-a-v003', account: 'prod', region: 'us-east-1', stringVal: 'new', category: 'serverGroup', instances: [] },
        ]}
      });
      application.clusters = clusterService.createServerGroupClusters(application.getDataSource('serverGroups').data);
      service.updateClusterGroups(application);
      $timeout.flush();
      expect(ClusterFilterModel.groups.length).toBe(1);
      expect(ClusterFilterModel.groups[0].subgroups.length).toBe(2);

      application.getDataSource('serverGroups').data.splice(0, 2);
      service.updateClusterGroups(application);
      $timeout.flush();
      expect(ClusterFilterModel.groups.length).toBe(1);
      expect(ClusterFilterModel.groups[0].subgroups.length).toBe(1);
      expect(ClusterFilterModel.groups[0].subgroups[0].heading).toBe('cluster-b');
    });
Example #24
0
 const addTagsToEntities = (application: Application) => {
   application
     .getDataSource('serverGroups')
     .ready()
     .then(() => EntityTagsReader.addTagsToServerGroups(application), noop);
   application
     .getDataSource('serverGroupManagers')
     .ready()
     .then(() => EntityTagsReader.addTagsToServerGroupManagers(application), noop);
   application
     .getDataSource('loadBalancers')
     .ready()
     .then(() => EntityTagsReader.addTagsToLoadBalancers(application), noop);
   application
     .getDataSource('securityGroups')
     .ready()
     .then(() => EntityTagsReader.addTagsToSecurityGroups(application), noop);
   application
     .getDataSource('executions')
     .ready()
     .then(() => EntityTagsReader.addTagsToExecutions(application), noop);
   application
     .getDataSource('pipelineConfigs')
     .ready()
     .then(() => EntityTagsReader.addTagsToPipelines(application), noop);
 };
Example #25
0
 it('leaves server groups alone when stringVal does not change', function() {
   application = this.buildApplication({
     serverGroups: { data: [
       { cluster: 'cluster-a', name: 'cluster-a-v000', account: 'prod', region: 'us-east-1', stringVal: 'should be deleted', category: 'serverGroup', instances: [] },
       { cluster: 'cluster-a', name: 'cluster-a-v001', account: 'prod', region: 'us-east-1', stringVal: 'original', category: 'serverGroup', instances: [] },
     ]}
   });
   application.clusters = clusterService.createServerGroupClusters(application.getDataSource('serverGroups').data);
   service.updateClusterGroups(application);
   $timeout.flush();
   expect(ClusterFilterModel.groups[0].subgroups[0].subgroups[0].serverGroups[0]).toBe(this.serverGroup000);
   expect(ClusterFilterModel.groups[0].subgroups[0].subgroups[0].serverGroups[1]).toBe(this.serverGroup001);
 });
Example #26
0
    it('should remove all instance groups when listInstances is false', function () {
      ClusterFilterModel.sortFilter.listInstances = false;
      let serverGroup = application.getDataSource('serverGroups').data[0];

      MultiselectModel.toggleInstance(serverGroup, 'i-1234');

      expect(MultiselectModel.instanceGroups.length).toBe(1);
      service.updateClusterGroups(application);
      $timeout.flush();

      expect(MultiselectModel.instanceGroups.length).toBe(0);
      expect(this.navigationSynced).toBe(true);
    });
Example #27
0
    it('reloads tasks and sets appropriate flags', function() {
      let nextCalls = 0;
      spyOn(TaskReader, 'getTasks').and.returnValue($q.when([]));
      configureApplication();
      application.getDataSource('tasks').onRefresh($scope, () => nextCalls++);
      expect(application.getDataSource('tasks').loaded).toBe(true);
      expect(application.getDataSource('tasks').loading).toBe(false);
      expect(application.getDataSource('tasks').loadFailure).toBe(false);

      application.getDataSource('tasks').refresh();
      expect(application.getDataSource('tasks').loading).toBe(true);

      $scope.$digest();
      expect(application.getDataSource('tasks').loaded).toBe(true);
      expect(application.getDataSource('tasks').loading).toBe(false);
      expect(application.getDataSource('tasks').loadFailure).toBe(false);

      expect(nextCalls).toBe(1);
    });
Example #28
0
  public convertLoadBalancerForEditing(loadBalancer: IAppengineLoadBalancer,
                                       application: Application): ng.IPromise<IAppengineLoadBalancer> {
    return application.getDataSource('loadBalancers').ready().then(() => {
      const upToDateLoadBalancer = application.getDataSource('loadBalancers').data.find((candidate: ILoadBalancer) => {
        return candidate.name === loadBalancer.name &&
          (candidate.account === loadBalancer.account || candidate.account === loadBalancer.credentials);
      });

      if (upToDateLoadBalancer) {
        loadBalancer.serverGroups = cloneDeep(upToDateLoadBalancer.serverGroups);
      }
      return loadBalancer;
    });
  }
Example #29
0
 it('removes a server group when one goes away', function() {
   application = this.buildApplication({
     serverGroups: { data: [
       this.serverGroup001,
     ]}
   });
   application.clusters = clusterService.createServerGroupClusters(application.getDataSource('serverGroups').data);
   service.updateClusterGroups(application);
   $timeout.flush();
   expect(ClusterFilterModel.groups.length).toBe(1);
   expect(ClusterFilterModel.groups[0].subgroups.length).toBe(1);
   expect(ClusterFilterModel.groups[0].subgroups[0].subgroups.length).toBe(1);
   expect(ClusterFilterModel.groups[0].subgroups[0].subgroups[0].serverGroups.length).toBe(1);
   expect(ClusterFilterModel.groups[0].subgroups[0].subgroups[0].serverGroups[0].name).toBe('cluster-a-v001');
 });
Example #30
0
    it('should remove all instance groups when listInstances is false', function(done) {
      ClusterState.filterModel.asFilterModel.sortFilter.listInstances = false;
      const serverGroup = application.getDataSource('serverGroups').data[0];

      ClusterState.multiselectModel.toggleInstance(serverGroup, 'i-1234');

      expect(ClusterState.multiselectModel.instanceGroups.length).toBe(1);
      ClusterState.filterService.updateClusterGroups(application);

      setTimeout(() => {
        expect(ClusterState.multiselectModel.instanceGroups.length).toBe(0);
        expect(this.navigationSynced).toBe(true);
        done();
      }, debounceTimeout);
    });