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


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

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


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

示例1: test

      test('page renders with default states', function(assert) {
        assert.equal(currentURL(), '/chat/privately-with/me');

        assert.notOk(chat.textarea.isDisabled(), 'textarea is enabled');
        assert.ok(chat.submitButton.isDisabled(), 'submit button is disabled');
        assert.equal(chat.messages.all().length, 0, 'history is blank');
      });
开发者ID:NullVoxPopuli,项目名称:emberclear,代码行数:7,代码来源:-acceptance-test.ts

示例2: refresh

export async function refresh(mocking: () => void = () => undefined) {
  const url = currentURL();
  const ctx = getContext();
  await teardownContext(ctx);
  await setupContext(ctx);
  await mocking();
  await visit(url);
}
开发者ID:NullVoxPopuli,项目名称:emberclear,代码行数:8,代码来源:refresh.ts

示例3: 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

示例4: 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

示例5: visit

  @test public async 'visiting /injection-factories'(assert: Assert) {
    await visit('/injection-factories');

    assert.equal(currentURL(), '/injection-factories', 'Test page loads');
    const view = find('.mike-view');
    assert.ok(view, '.mike-view found');
    if (!view) { throw new Error(''); }
    const viewId = view.id;
    assert.ok(getViewById.call(this, viewId).get('resizeService'), 'resizeService has been injected onto views');
    const component = find('.test-component');
    assert.ok(component, '.test-component found');
    if (!component) { throw new Error(''); }
    const componentId = component.id;
    // tslint:disable-next-line:max-line-length
    assert.ok(getViewById.call(this, componentId).get('resizeService'), 'resizeService has been injected onto components');

  }
开发者ID:mike-north,项目名称:ember-resize,代码行数:17,代码来源:injection-factories-test.ts

示例6: test

 test('a redirect to your own chat occurs', function(assert) {
   assert.equal(currentURL(), '/chat/privately-with/me');
   percySnapshot(assert as any);
 });
开发者ID:NullVoxPopuli,项目名称:emberclear,代码行数:4,代码来源:acceptance-test.ts


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