A platform for community discussion. Free, open, simple.
FIX: More 404 image requests in test
Robin Ward2a4a2a2ab717
diff --git a/test/javascripts/components/image-uploader-test.js b/test/javascripts/components/image-uploader-test.jsindex 4ef3f1e64b3..7da9744ae32 100644--- a/test/javascripts/components/image-uploader-test.js+++ b/test/javascripts/components/image-uploader-test.js@@ -3,7 +3,7 @@ moduleForComponent("image-uploader", { integration: true });componentTest("with image", {template:- "{{image-uploader imageUrl='/some/upload.png' placeholderUrl='/not/used.png'}}",+ "{{image-uploader imageUrl='/images/avatar.png' placeholderUrl='/not/used.png'}}",async test(assert) {assert.equal(diff --git a/test/javascripts/lib/pretty-text-test.js b/test/javascripts/lib/pretty-text-test.jsindex 393b037a962..5ab98959f82 100644--- a/test/javascripts/lib/pretty-text-test.js+++ b/test/javascripts/lib/pretty-text-test.js@@ -1519,20 +1519,20 @@ QUnit.test("emoji - emojiSet", assert => {});QUnit.test("emoji - registerEmoji", assert => {- registerEmoji("foo", "/foo.png");+ registerEmoji("foo", "/images/d-logo-sketch.png");assert.cookedOptions(":foo:",{},- `<p><img src="/foo.png?v=${v}" title=":foo:" class="emoji emoji-custom only-emoji" alt=":foo:"></p>`+ `<p><img src="/images/d-logo-sketch.png?v=${v}" title=":foo:" class="emoji emoji-custom only-emoji" alt=":foo:"></p>`);- registerEmoji("bar", "/bar.png", "baz");+ registerEmoji("bar", "/images/avatar.png", "baz");assert.cookedOptions(":bar:",{},- `<p><img src="/bar.png?v=${v}" title=":bar:" class="emoji emoji-custom only-emoji" alt=":bar:"></p>`+ `<p><img src="/images/avatar.png?v=${v}" title=":bar:" class="emoji emoji-custom only-emoji" alt=":bar:"></p>`);});diff --git a/test/javascripts/widgets/home-logo-test.js b/test/javascripts/widgets/home-logo-test.jsindex c30c1a56ec4..14b32a3e2c7 100644--- a/test/javascripts/widgets/home-logo-test.js+++ b/test/javascripts/widgets/home-logo-test.js@@ -1,6 +1,4 @@import { moduleForWidget, widgetTest } from "helpers/widget-test";-import { setPrefix } from "discourse-common/lib/get-url";-moduleForWidget("home-logo");const bigLogo = "/images/d-logo-sketch.png?test";@@ -98,52 +96,3 @@ widgetTest("mobile without logo", {assert.equal(find("#site-logo").attr("src"), bigLogo);}});--widgetTest("basics, subfolder", {- template: '{{mount-widget widget="home-logo" args=args}}',- beforeEach() {- setPrefix("/forum");- this.siteSettings.site_logo_url = bigLogo;- this.siteSettings.site_logo_small_url = smallLogo;- this.siteSettings.title = title;- this.set("args", { minimized: false });- },-- test(assert) {- assert.ok(find("img#site-logo.logo-big").length === 1);- assert.equal(find("#site-logo").attr("src"), `/forum${bigLogo}`);- assert.equal(find("#site-logo").attr("alt"), title);- }-});--widgetTest("basics, subfolder - minimized", {- template: '{{mount-widget widget="home-logo" args=args}}',- beforeEach() {- setPrefix("/forum");- this.siteSettings.site_logo_url = bigLogo;- this.siteSettings.site_logo_small_url = smallLogo;- this.siteSettings.title = title;- this.set("args", { minimized: true });- },-- test(assert) {- assert.ok(find("img.logo-small").length === 1);- assert.equal(find("img.logo-small").attr("src"), `/forum${smallLogo}`);- assert.equal(find("img.logo-small").attr("alt"), title);- }-});--widgetTest("mobile logo, subfolder", {- template: '{{mount-widget widget="home-logo" args=args}}',- beforeEach() {- setPrefix("/forum");- this.siteSettings.site_mobile_logo_url = mobileLogo;- this.siteSettings.site_logo_small_url = smallLogo;- this.site.mobileView = true;- },-- test(assert) {- assert.ok(find("img#site-logo.logo-big").length === 1);- assert.equal(find("#site-logo").attr("src"), `/forum${mobileLogo}`);- }-});