import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';

module('Integration | Component | froala-content', function(hooks) {
  setupRenderingTest(hooks);

  test('.fr-view class is applied', async function(assert) {

    await render(hbs`{{froala-content elementId="editor"}}`);

    assert.ok(this.$('#editor').hasClass('fr-view'));

  });


  test("'content' is output inside the block", async function(assert) {

    await render(hbs`{{froala-content content="foobar"}}`);

    assert.equal(this.element.textContent.trim(), 'foobar');

  });


  test("positional param 'content' is output inside the block", async function(assert) {

    await render(hbs`{{froala-content "foobar"}}`);

    assert.equal(this.element.textContent.trim(), 'foobar');

  });


  test("block content is properly yield'ed", async function(assert) {

    await render(hbs`{{#froala-content}}foobar{{/froala-content}}`);

    assert.equal(this.element.textContent.trim(), 'foobar');

  });

});

import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';
import $ from 'jquery';

module('Integration | Component | froala-content', function(hooks) {
  setupRenderingTest(hooks);

  test('.fr-view class is applied', async function(assert) {

    await render(hbs`{{froala-content elementId="editor"}}`);

    assert.ok($('#editor', this.element).hasClass('fr-view'));

  });


  test("'content' is output inside the block", async function(assert) {

    await render(hbs`{{froala-content content="foobar"}}`);

    assert.equal(this.element.textContent.trim(), 'foobar');

  });


  test("positional param 'content' is output inside the block", async function(assert) {

    await render(hbs`{{froala-content "foobar"}}`);

    assert.equal(this.element.textContent.trim(), 'foobar');

  });


  test("block content is properly yield'ed", async function(assert) {

    await render(hbs`{{#froala-content}}foobar{{/froala-content}}`);

    assert.equal(this.element.textContent.trim(), 'foobar');

  });

});

Remove usage of ember jquery integration in tests
Remove usage of ember jquery integration in tests

Note, the ember-jquery addon re-enables usage of this.$() within components without a depreciation warning.

https://deprecations.emberjs.com/v3.x/#toc_jquery-apis
