當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。