mirror of
https://github.com/discourse/discourse.git
synced 2025-03-26 21:45:51 +08:00
uses emoji version for tests (#6277)
This commit is contained in:
parent
10a3499d68
commit
edf26a0931
test/javascripts/acceptance
@ -1,3 +1,4 @@
|
||||
import { IMAGE_VERSION as v } from "pretty-text/emoji";
|
||||
import { acceptance } from "helpers/qunit-helpers";
|
||||
|
||||
acceptance("Emoji", { loggedIn: true });
|
||||
@ -11,7 +12,7 @@ QUnit.test("emoji is cooked properly", async assert => {
|
||||
find(".d-editor-preview:visible")
|
||||
.html()
|
||||
.trim(),
|
||||
'<p>this is an emoji <img src="/images/emoji/emoji_one/blonde_woman.png?v=5" title=":blonde_woman:" class="emoji" alt=":blonde_woman:"></p>'
|
||||
`<p>this is an emoji <img src="/images/emoji/emoji_one/blonde_woman.png?v=${v}" title=":blonde_woman:" class="emoji" alt=":blonde_woman:"></p>`
|
||||
);
|
||||
|
||||
await click("#reply-control .btn.create");
|
||||
@ -19,7 +20,7 @@ QUnit.test("emoji is cooked properly", async assert => {
|
||||
find(".topic-post:last .cooked p")
|
||||
.html()
|
||||
.trim(),
|
||||
'this is an emoji <img src="/images/emoji/emoji_one/blonde_woman.png?v=5" title=":blonde_woman:" class="emoji" alt=":blonde_woman:">'
|
||||
`this is an emoji <img src="/images/emoji/emoji_one/blonde_woman.png?v=${v}" title=":blonde_woman:" class="emoji" alt=":blonde_woman:">`
|
||||
);
|
||||
});
|
||||
|
||||
@ -32,7 +33,7 @@ QUnit.test("skin toned emoji is cooked properly", async assert => {
|
||||
find(".d-editor-preview:visible")
|
||||
.html()
|
||||
.trim(),
|
||||
'<p>this is an emoji <img src="/images/emoji/emoji_one/blonde_woman/5.png?v=5" title=":blonde_woman:t5:" class="emoji" alt=":blonde_woman:t5:"></p>'
|
||||
`<p>this is an emoji <img src="/images/emoji/emoji_one/blonde_woman/5.png?v=${v}" title=":blonde_woman:t5:" class="emoji" alt=":blonde_woman:t5:"></p>`
|
||||
);
|
||||
|
||||
await click("#reply-control .btn.create");
|
||||
@ -40,6 +41,6 @@ QUnit.test("skin toned emoji is cooked properly", async assert => {
|
||||
find(".topic-post:last .cooked p")
|
||||
.html()
|
||||
.trim(),
|
||||
'this is an emoji <img src="/images/emoji/emoji_one/blonde_woman/5.png?v=5" title=":blonde_woman:t5:" class="emoji" alt=":blonde_woman:t5:">'
|
||||
`this is an emoji <img src="/images/emoji/emoji_one/blonde_woman/5.png?v=${v}" title=":blonde_woman:t5:" class="emoji" alt=":blonde_woman:t5:">`
|
||||
);
|
||||
});
|
||||
|
@ -1,4 +1,6 @@
|
||||
import { acceptance } from "helpers/qunit-helpers";
|
||||
import { IMAGE_VERSION as v } from "pretty-text/emoji";
|
||||
|
||||
acceptance("Topic", {
|
||||
loggedIn: true,
|
||||
pretend(server, helper) {
|
||||
@ -181,7 +183,7 @@ QUnit.test("Updating the topic title with emojis", async assert => {
|
||||
find(".fancy-title")
|
||||
.html()
|
||||
.trim(),
|
||||
'emojis title <img src="/images/emoji/emoji_one/bike.png?v=5" title="bike" alt="bike" class="emoji"> <img src="/images/emoji/emoji_one/blonde_woman/6.png?v=5" title="blonde_woman:t6" alt="blonde_woman:t6" class="emoji">',
|
||||
`emojis title <img src="/images/emoji/emoji_one/bike.png?v=${v}" title="bike" alt="bike" class="emoji"> <img src="/images/emoji/emoji_one/blonde_woman/6.png?v=${v}" title="blonde_woman:t6" alt="blonde_woman:t6" class="emoji">`,
|
||||
"it displays the new title with emojis"
|
||||
);
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user