• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TypeScript test-helpers.visit函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了TypeScript中@ember/test-helpers.visit函数的典型用法代码示例。如果您正苦于以下问题:TypeScript visit函数的具体用法?TypeScript visit怎么用?TypeScript visit使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: visit

export async function visit(url: string) {
  try {
    await dangerousVisit(url);
  } catch (e) {
    // console.error('visit wrapper around default visit helper', e);
  }
}
开发者ID:NullVoxPopuli,项目名称:emberclear,代码行数:7,代码来源:index.ts


示例2: function

    hooks.beforeEach(async function() {
      window.Notification = {
        permission: undefined,
      };

      await visit('/chat/privately-with/me');
    });
开发者ID:NullVoxPopuli,项目名称:emberclear,代码行数:7,代码来源:-acceptance-test.ts


示例3: function

    hooks.beforeEach(async function() {
      const store = getService<StoreService>('store');

      await store.createRecord('relay', defaultRelays[0]).save();
      await store.createRecord('relay', defaultRelays[1]).save();
      await store.createRecord('relay', defaultRelays[2]).save();
      await visit(path);
    });
开发者ID:NullVoxPopuli,项目名称:emberclear,代码行数:8,代码来源:-acceptance-test.ts


示例4: test

  test('Search does not through an error when typing', async function(assert) {
    await appLogin();
    await visit('/');

    assert.equal(currentURL(), '/browse/datasets', 'We made it to the home page in one piece');
    fillIn(searchBarSelector, 'Hello darkness my old friend');
    assert.ok(true, 'Did not encounter an error when filling in search bar');
  });
开发者ID:alyiwang,项目名称:WhereHows,代码行数:8,代码来源:search-test.ts


示例5: function

    hooks.beforeEach(async function() {
      await visit('/');
      window.Notification = {
        permission: undefined,
      };

      notifications = getService<Notifications>('notifications');
    });
开发者ID:NullVoxPopuli,项目名称:emberclear,代码行数:8,代码来源:acceptance-test.ts


示例6: function

      hooks.beforeEach(async function() {
        me = getService<CurrentUserService>('currentUser').record!;

        await createContact('First Contact');
        await createContact('Second Contact');

        await visit('/contacts');
      });
开发者ID:NullVoxPopuli,项目名称:emberclear,代码行数:8,代码来源:acceptance-test.ts


示例7: visit

  @test async 'visiting /'(assert: Assert) {
    await visit('/');
    assert.equal(currentURL(), '/');

    const codeElement: Element | null = find('.index-view code');
    if (codeElement === null) { throw new Error('no <code>'); }
    assert.ok(/min\-width:\s[0-9]+px/.test('' + codeElement.textContent), 'min-width text found');
  }
开发者ID:mike-north,项目名称:ember-resize,代码行数:8,代码来源:index-test.ts


示例8: function

    hooks.beforeEach(async function() {
      stubService('currentUser', {
        isLoggedIn: false,
        load() {},
        exists: () => false,
      });

      await visit('/logout');
    });
开发者ID:NullVoxPopuli,项目名称:emberclear,代码行数:9,代码来源:logout-test.ts


示例9: test

  test('Search tracks correctly', async function(assert) {
    const searchTerm = 'somerandomsearch';
    const SEARCH_EVENT_NAME = 'trackSiteSearch';

    await appLogin();
    await visit(`/search?keyword=${searchTerm}`);

    const [, keyword] = getTrackingEvent(SEARCH_EVENT_NAME);

    assert.equal(keyword, searchTerm, 'Search should be tracked correctly');
  });
开发者ID:alyiwang,项目名称:WhereHows,代码行数:11,代码来源:tracking-test.ts


示例10: test

  test('it automatically finds keys when attached to container-managed objects', async function(assert) {
    await visit('/');

    const appRoute = this.owner.lookup('route:application');
    appRoute.debug('test message from the application route');

    let [routeMessage] = log.lastCall.args;
    assert.ok(/route:application/.test(routeMessage), 'Route message should include its container key');

    const testService = this.owner.lookup('service:my/test/module');
    testService.debug('test message from the mysterious service');

    let [serviceMessage] = log.lastCall.args;
    assert.ok(/service:my\/test\/module/.test(serviceMessage), 'Service message should include its container key');
  });
开发者ID:salsify,项目名称:ember-debug-logger,代码行数:15,代码来源:container-keys-test.ts



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
TypeScript test-helpers.waitFor函数代码示例发布时间:2022-05-28
下一篇:
TypeScript test-helpers.triggerEvent函数代码示例发布时间:2022-05-28
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap