import { acceptance, queryAll } from "discourse/tests/helpers/qunit-helpers"; import { click, fillIn, visit } from "@ember/test-helpers"; import { test } from "qunit"; import { IMAGE_VERSION as v } from "pretty-text/emoji/version"; acceptance("Emoji", function (needs) { needs.user(); test("emoji is cooked properly", async function (assert) { await visit("/t/internationalization-localization/280"); await click("#topic-footer-buttons .btn.create"); await fillIn(".d-editor-input", "this is an emoji :blonde_woman:"); assert.strictEqual( queryAll(".d-editor-preview:visible").html().trim(), `

this is an emoji :blonde_woman:

` ); }); test("skin toned emoji is cooked properly", async function (assert) { await visit("/t/internationalization-localization/280"); await click("#topic-footer-buttons .btn.create"); await fillIn(".d-editor-input", "this is an emoji :blonde_woman:t5:"); assert.strictEqual( queryAll(".d-editor-preview:visible").html().trim(), `

this is an emoji :blonde_woman:t5:

` ); }); });