当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript ComponentFixture.isStable方法代码示例

本文整理汇总了TypeScript中@angular/core/testing.ComponentFixture.isStable方法的典型用法代码示例。如果您正苦于以下问题:TypeScript ComponentFixture.isStable方法的具体用法?TypeScript ComponentFixture.isStable怎么用?TypeScript ComponentFixture.isStable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在@angular/core/testing.ComponentFixture的用法示例。


在下文中一共展示了ComponentFixture.isStable方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: beforeEach

  beforeEach((done) => {
    fixture = TestBed.createComponent(TopbarHashtagsComponent);

    topbarHashtagsServiceMock.loadResponse = [
      {
        value: 'hashtag1',
        selected: true
      },
      {
        value: 'hashtag2',
        selected: false
      }
    ];

    comp = fixture.componentInstance;

    fixture.detectChanges();

    if (fixture.isStable()) {
      done();
    } else {
      fixture.whenStable().then(() => {
        fixture.detectChanges();
        done();
      });
    }
  });
开发者ID:iamthelogik83,项目名称:front,代码行数:27,代码来源:topbar.component.spec.ts

示例2: beforeEach

  beforeEach((done) => {
    jasmine.MAX_PRETTY_PRINT_DEPTH = 10;
    jasmine.clock().uninstall();
    jasmine.clock().install();
    clientMock.response = {};
    clientMock.response[`api/v2/blockchain/rewards/verify`] = {
      "status": "success",
      "secret": "0",
    };
    clientMock.response[`api/v2/blockchain/rewards/confirm`] = {
      "status": "success",
      "secret": "0",
    };
    fixture = TestBed.createComponent(TokenRewardsOnboardingComponent);
    comp = fixture.componentInstance;
    fixture.detectChanges();

    if (fixture.isStable()) {
      done();
    } else {
      fixture.whenStable().then(() => {
        done();
      });
    }
  });
开发者ID:iamthelogik83,项目名称:front,代码行数:25,代码来源:rewards.component.spec.ts

示例3: beforeEach

  beforeEach((done) => {
    jasmine.MAX_PRETTY_PRINT_DEPTH = 10;
    jasmine.clock().uninstall();
    jasmine.clock().install();
    fixture = TestBed.createComponent(WalletTokenContributionsOverviewComponent);
    clientMock.response = {};
    clientMock.response[`api/v2/blockchain/contributions/overview`] = {
      "status": "success",
      "nextPayout": 35478,
      "currentReward": "0",
      "yourContribution": 0,
      "totalNetworkContribution": 173525,
      "yourShare": 0
    };

    comp = fixture.componentInstance;
    fixture.detectChanges();

    if (fixture.isStable()) {
      done();
    } else {
      fixture.whenStable().then(() => {
        done();
      });
    }
  });
开发者ID:iamthelogik83,项目名称:front,代码行数:26,代码来源:overview.component.spec.ts

示例4: beforeEach

  beforeEach((done) => {
    jasmine.clock().install();
    fixture = TestBed.createComponent(GroupsProfileMembersInvite);

    comp = fixture.componentInstance;

    comp.group = {
      guid: 123
    };

    window.Minds.cdn_url = 'http://dev.minds.io/';

    clientMock.response = {};

    comp._group = {
      guid: '1234',
      name: 'test group',
      membership: 0,
      'is:owner': true,
      'is:member': true,
    };

    fixture.detectChanges();

    if (fixture.isStable()) {
      done();
    } else {
      fixture.whenStable().then(() => {
        fixture.detectChanges();
        done();
      });
    }
  });
开发者ID:iamthelogik83,项目名称:front,代码行数:33,代码来源:invite.spec.ts

示例5: beforeEach

  beforeEach((done) => {
    jasmine.MAX_PRETTY_PRINT_DEPTH = 10;
    jasmine.clock().uninstall();
    jasmine.clock().install();
    fixture = TestBed.createComponent(WalletBalanceTokensComponent);

    comp = fixture.componentInstance; // WalletBalanceTokensComponent test instance
    clientMock.response = {};
    clientMock.response[`api/v2/blockchain/wallet/balance`] = {
      'status': 'success',
      'balance': 301529,
      'addresses': [
        {
          'label': 'Receiver',
          'address': '0xreceiver',
          'balance': 9000000000000000000,
        },
        {
          'label': 'OffChain',
          'address': '0xoffchain',
          'balance': 9000000000000000000,
        }
      ]
    };
    fixture.detectChanges();

    if (fixture.isStable()) {
      done();
    } else {
      fixture.whenStable().then(() => {
        done();
      });
    }
  });
开发者ID:iamthelogik83,项目名称:front,代码行数:34,代码来源:balance.component.spec.ts

示例6: beforeEach

  beforeEach((done) => {
    jasmine.MAX_PRETTY_PRINT_DEPTH = 10;
    jasmine.clock().uninstall();
    jasmine.clock().install();
    fixture = TestBed.createComponent(ReportConsoleComponent);
    clientMock.response = {};
    fixture.detectChanges();
    comp = fixture.componentInstance;
    appeals = [];
    clientMock.response[ `api/v1/entities/report/appeal/review` ] = {
      "status":"success",
      "load-next":'',
      "data":[
        {"guid":"756593195889987599","entity_guid":"755121974073626627", "entityObj": { "type" : "comment"} },
        {"guid":"756593195889987599","entity_guid":"755121974073626627", "entityObj": { "type" : "comment"} },
        {"guid":"756593195889987599","entity_guid":"755121974073626627", "entityObj": { "type" : "comment"} }
      ]
    };

    if (fixture.isStable()) {
      done();
    } else {
      fixture.whenStable().then(() => {
        done();
      });
    }
  });
开发者ID:iamthelogik83,项目名称:front,代码行数:27,代码来源:console.component.spec.ts

示例7: beforeEach

  beforeEach((done) => {

    jasmine.MAX_PRETTY_PRINT_DEPTH = 10;
    jasmine.clock().uninstall();
    jasmine.clock().install();
    fixture = TestBed.createComponent(NotificationComponent);
    comp = fixture.componentInstance;
    comp.notification = {
      "type":"notification",
      "guid":"843204301747658770",
      "notification_view":"group_activity",
      'entityObj': {
        'title': 'aaaaaaaaaaa'
      },
      "fromObj": {
        name: 'name'
      },
      "params" : {
        group: {},
        time_created: 2222,
        bid: 10
      }
    };
    fixture.detectChanges();
    if (fixture.isStable()) {
      done();
    } else {
      fixture.whenStable().then(() => {
        done();
      });
    }
  });
开发者ID:iamthelogik83,项目名称:front,代码行数:32,代码来源:notification.component.spec.ts

示例8: beforeEach

  beforeEach((done) => {

    jasmine.MAX_PRETTY_PRINT_DEPTH = 10;
    jasmine.clock().uninstall();
    jasmine.clock().install();
    fixture = TestBed.createComponent(NotificationsComponent);
    clientMock.response = {};

    window.Minds.notifications_count = 10;
    clientMock.response[`api/v1/notifications/all`] = {
      'status': 'success',
      'notifications' : [
        {"type":"notification","guid":"843204301747658770","notification_view":"group_activity"},
        {"type":"notification","guid":"843204301747658770","notification_view":"group_activity"},
        {"type":"notification","guid":"843204301747658770","notification_view":"group_activity"}
      ]
    };
    comp = fixture.componentInstance;

    fixture.detectChanges();

    if (fixture.isStable()) {
      done();
    } else {
      fixture.whenStable().then(() => {
        done();
      });
    }
  });
开发者ID:iamthelogik83,项目名称:front,代码行数:29,代码来源:notifications.component.spec.ts

示例9: beforeEach

  beforeEach((done) => {

    jasmine.MAX_PRETTY_PRINT_DEPTH = 10;
    jasmine.clock().uninstall();
    jasmine.clock().install();
    fixture = TestBed.createComponent(ChannelFeedComponent);
    clientMock.response = {};
    comp = fixture.componentInstance;
    comp.user = { 
        guid: 'guidguid', 
        name: 'name', 
        username: 'username', 
        icontime: 11111, 
        subscribers_count:182, 
        impressions:18200, 
        pinned_posts: ['a', 'b', 'c']
    };
    comp.feed = [ {guid: 'aaaa'}, {guid: 'aaaa'}, {guid: 'aaaa'}, {guid: 'aaaa'}];
    comp.openWireModal = false;
    fixture.detectChanges();

    clientMock.response[`api/v1/newsfeed/personal/1000`] = {
        'status': 'success',
        'load-next': 'aaaa',
        'pinned' : [{guid: 'aaa3a'}],
        'activity' : [ {guid: 'aaa3a'}, {guid: 'aaaa'}, {guid: 'aaaa'}, {guid: 'aaaa'}, {guid: 'aaaa'}]
    };
    if (fixture.isStable()) {
      done();
    } else {
      fixture.whenStable().then(() => {
        done();
      });
    }
  });
开发者ID:iamthelogik83,项目名称:front,代码行数:35,代码来源:feed.spec.ts

示例10: beforeEach

  beforeEach((done) => {
    jasmine.MAX_PRETTY_PRINT_DEPTH = 2;
    jasmine.clock().install();

    fixture = TestBed.createComponent(BlogTileComponent);

    comp = fixture.componentInstance;

    comp.setEntity = {
      guid: '1',
      title: 'title',
      time_created: 1525865293,
      thumbnail_src: 'link/to/thumbnail',
      excerpt: 'this is an excerpt',
      ownerObj: {
        guid: '2',
        username: 'testowner',
        icontime: 1525865293,
      }
    };

    sessionMock.user.admin = false;

    fixture.detectChanges();

    if (fixture.isStable()) {
      done();
    } else {
      fixture.whenStable()
        .then(() => {
          fixture.detectChanges();
          done()
        });
    }
  });
开发者ID:iamthelogik83,项目名称:front,代码行数:35,代码来源:tile.component.spec.ts


注:本文中的@angular/core/testing.ComponentFixture.isStable方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。