How to use the @ember/test-helpers.setApplication 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 DefinitelyTyped / DefinitelyTyped / types / ember__test-helpers / ember__test-helpers-tests.ts View on Github external
pauseTest,
    resumeTest,
    waitFor,
    waitUntil,
    settled,
    isSettled,
    getSettledState,
    visit,
    currentURL,
    currentRouteName,
    setApplication
} from '@ember/test-helpers';

const MyApp = Application.extend({ modulePrefix: 'my-app' });

setApplication(MyApp.create());

test('DOM interactions', async () => {
    await render(hbs`<div class="message">Hello, world</div>`);

    await click('.message');
    await doubleClick('.message');
    await tap('.message');
    await focus('.message');
    await blur('.message');
    await triggerEvent('.message', 'custom-event');
    await triggerKeyEvent('.message', 'keydown', 'Enter', { ctrlKey: true });
    await fillIn('.message', 'content');

    const messageElement = find('.message')!;
    await click(messageElement);
    await doubleClick(messageElement);
github onechiporenko / ember-models-table / tests / test-helper.js View on Github external
import Application from '../app';
import config from '../config/environment';
import { setApplication } from '@ember/test-helpers';
import { start } from 'ember-qunit';
import loadEmberExam from 'ember-exam/test-support/load';

setApplication(Application.create(config.APP));

start();
loadEmberExam();
github hummingbird-me / hummingbird-client / tests / test-helper.js View on Github external
import { setApplication } from '@ember/test-helpers';
import { start } from 'ember-qunit';
import Application from '../app';

setApplication(Application.create({ autoboot: false }));
start();
github mike-north / ember-sharable / tests / test-helper.js View on Github external
import Application from '../app';
import config from '../config/environment';
import { setApplication } from '@ember/test-helpers';
import { start } from 'ember-qunit';

setApplication(Application.create(config.APP));

start();
github sir-dunxalot / ember-tooltips / tests / test-helper.js View on Github external
import Application from '../app';
import config from '../config/environment';
import { setApplication } from '@ember/test-helpers';
import { start } from 'ember-qunit';

setApplication(Application.create(config.APP));

start();
github IvyApp / ivy-videojs / tests / test-helper.js View on Github external
import Application from '../app';
import config from '../config/environment';
import { setApplication } from '@ember/test-helpers';
import { start } from 'ember-qunit';

setApplication(Application.create(config.APP));

start();
github adopted-ember-addons / ember-electron / tests / test-helper.js View on Github external
import Application from '../app';
import config from '../config/environment';
import { setApplication } from '@ember/test-helpers';
import { start } from 'ember-qunit';

setApplication(Application.create(config.APP));

start();
github davidpett / ember-data-contentful / tests / test-helper.js View on Github external
import Application from '../app';
import config from '../config/environment';
import { setApplication } from '@ember/test-helpers';
import { start } from 'ember-qunit';

setApplication(Application.create(config.APP));

start();
github jherdman / ember-cli-chartist / tests / test-helper.js View on Github external
import Application from '../app';
import config from '../config/environment';
import { setApplication } from '@ember/test-helpers';
import { start } from 'ember-qunit';

setApplication(Application.create(config.APP));

start();
github kaliber5 / ember-window-mock / tests / test-helper.js View on Github external
import Application from '../app';
import config from '../config/environment';
import { setApplication } from '@ember/test-helpers';
import { start } from 'ember-qunit';

setApplication(Application.create(config.APP));

start();