How to use the @ember/test-helpers.currentURL function in @ember/test-helpers

To help you get started, we’ve selected a few @ember/test-helpers examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ember-codemods / ember-test-helpers-codemod / transforms / native-dom / __testfixtures__ / acceptance.output.js View on Github external
test('visiting /foo', async function(assert) {
  await visit('/foo');
  assert.equal(currentURL(), '/foo');
  assert.ok(find('.foo'));
});
github fossasia / open-event-frontend / tests / helpers / custom-helpers.js View on Github external
export async function login(assert, email = null, password = null, gotoLoginPage = true) {
  if (gotoLoginPage) {
    await visit('/login');
  }
  assert.equal(currentURL(), '/login');
  await fillIn('input[name=email]', email !== null ? email : 'opev-fe@test.com');
  await fillIn('input[name=password]', password !== null ? password : 'test-fe-user');
  await click('button[type=submit]');
  await settled();
}
github ember-codemods / ember-test-helpers-codemod / transforms / acceptance / __testfixtures__ / visit.output.js View on Github external
test('visiting /bar', async function(assert) {
  await visit('/bar');
  assert.equal(currentURL(), '/bar');
});
github jelhan / croodle / tests / pages / poll.js View on Github external
return function() {
    return regExp.test(currentURL());
  };
};
github ember-codemods / ember-test-helpers-codemod / __testfixtures__ / acceptance / fill-in.output.js View on Github external
test('visiting /foo', async function(assert) {
  await visit('/foo');

  await fillIn('#bar', 'baz');
  await fillIn(this.element.querySelectorAll('#qux input')[5], 'qaaz');
  assert.equal(currentURL(), '/foo');
});
github DefinitelyTyped / DefinitelyTyped / types / ember__test-helpers / ember__test-helpers-tests.ts View on Github external
test('routing helpers', async (assert) => {
    await visit('/foo');

    assert.equal(currentURL(), '/foo');
    assert.equal(currentRouteName(), 'foo');
});
github ember-codemods / ember-test-helpers-codemod / transforms / acceptance / __testfixtures__ / route-helpers.output.js View on Github external
test('visiting /foo', async function(assert) {
  await visit('/foo');
  assert.equal(currentURL(), '/foo');
  assert.equal(currentPath(), 'foo.index');
  assert.equal(currentRouteName(), 'foo');
});
github fossasia / open-event-frontend / tests / helpers / custom-helpers.js View on Github external
export async function logout(assert) {
  await visit('/logout');
  await settled();
  assert.equal(currentURL(), '/');
  assert.ok(currentSession().session.isAuthenticated !== true);
}
github san650 / ember-cli-page-object / tests / helpers / properties / application-adapter.js View on Github external
function currentURL(...args) {
  return require('@ember/test-helpers').currentURL(...args);
}