
Test Page
Yet another collaboration tool
diff --git a/test/javascripts/acceptance/composer-test.js b/test/javascripts/acceptance/composer-test.js
index 9d246cdd3ce..235236a2d2a 100644
--- a/test/javascripts/acceptance/composer-test.js
+++ b/test/javascripts/acceptance/composer-test.js
@@ -112,7 +112,7 @@ QUnit.test("Composer upload placeholder", async assert => {
original_filename: "test.png",
thumbnail_width: 200,
thumbnail_height: 300,
- url: "/uploads/test1.ext"
+ url: "/images/avatar.png?1"
}
};
@@ -124,7 +124,7 @@ QUnit.test("Composer upload placeholder", async assert => {
original_filename: "test.png",
thumbnail_width: 100,
thumbnail_height: 200,
- url: "/uploads/test2.ext"
+ url: "/images/avatar.png?2"
}
};
@@ -136,7 +136,7 @@ QUnit.test("Composer upload placeholder", async assert => {
original_filename: "image.png",
thumbnail_width: 300,
thumbnail_height: 400,
- url: "/uploads/test3.ext"
+ url: "/images/avatar.png?3"
}
};
@@ -148,7 +148,7 @@ QUnit.test("Composer upload placeholder", async assert => {
original_filename: "ima++ge.png",
thumbnail_width: 300,
thumbnail_height: 400,
- url: "/uploads/test3.ext"
+ url: "/images/avatar.png?3"
}
};
@@ -177,19 +177,19 @@ QUnit.test("Composer upload placeholder", async assert => {
await find(".wmd-controls").trigger("fileuploaddone", data2);
assert.equal(
find(".d-editor-input").val(),
- "[Uploading: test.png...]()  [Uploading: ima++ge.png...]() [Uploading: image.png...]() "
+ "[Uploading: test.png...]()  [Uploading: ima++ge.png...]() [Uploading: image.png...]() "
);
await find(".wmd-controls").trigger("fileuploaddone", data3);
assert.equal(
find(".d-editor-input").val(),
- "[Uploading: test.png...]()  [Uploading: ima++ge.png...]()  "
+ "[Uploading: test.png...]()  [Uploading: ima++ge.png...]()  "
);
await find(".wmd-controls").trigger("fileuploaddone", data1);
assert.equal(
find(".d-editor-input").val(),
- "  [Uploading: ima++ge.png...]()  "
+ "  [Uploading: ima++ge.png...]()  "
);
});
@@ -760,7 +760,7 @@ QUnit.test("Image resizing buttons", async assert => {
// 4 Wrapped in backquetes should not work
"``",
// 5 html image - should not work
- "",
+ "
",
// 6 two images one the same line, but both are syntactically correct - both should work
" ",
// 7 & 8 Identical images - both should work
@@ -771,7 +771,7 @@ QUnit.test("Image resizing buttons", async assert => {
// 10 Image with markdown title - should work
``,
// 11 bbcode - should not work
- "[img]http://example.com/image.jpg[/img]",
+ "[img]/images/avatar.png[/img]",
// 12 Image with data attributes
""
];
diff --git a/test/javascripts/components/cook-text-test.js b/test/javascripts/components/cook-text-test.js
index b11019abf37..517a2736110 100644
--- a/test/javascripts/components/cook-text-test.js
+++ b/test/javascripts/components/cook-text-test.js
@@ -24,8 +24,8 @@ componentTest("resolves short URLs", {
[
{
short_url: "upload://a.png",
- url: "/uploads/default/original/3X/c/b/1.png",
- short_path: "/uploads/short-url/a.png"
+ url: "/images/avatar.png",
+ short_path: "/images/d-logo-sketch.png"
}
]
];
@@ -38,9 +38,6 @@ componentTest("resolves short URLs", {
test(assert) {
const html = find(".post-body")[0].innerHTML.trim();
- assert.equal(
- html,
- '
Yet another collaboration tool
Yet another collaboration tool