DEV: Reduce test noise (#17362)

This commit is contained in:
Jarek Radosz 2022-07-07 07:28:40 +02:00 committed by GitHub
parent d3003f4fec
commit c32ac45b29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View File

@ -12,6 +12,7 @@ import { click, fillIn, settled, visit } from "@ember/test-helpers";
import I18n from "I18n";
import { skip, test } from "qunit";
import { Promise } from "rsvp";
import sinon from "sinon";
function pretender(server, helper) {
server.post("/uploads/lookup-urls", () => {
@ -387,6 +388,9 @@ acceptance("Uppy Composer Attachment - Upload Error", function (needs) {
});
test("should show an error message for the failed upload", async function (assert) {
// Don't log the upload error
sinon.stub(console, "error");
await visit("/");
await click("#create-topic");
await fillIn(".d-editor-input", "The image:\n");

View File

@ -1,6 +1,7 @@
import { acceptance, exists } from "discourse/tests/helpers/qunit-helpers";
import { click, currentURL, visit } from "@ember/test-helpers";
import { test } from "qunit";
import sinon from "sinon";
acceptance("Category 404", function (needs) {
needs.pretender((server, helper) => {
@ -12,7 +13,11 @@ acceptance("Category 404", function (needs) {
});
});
});
test("Navigating to a bad category link does not break the router", async function (assert) {
// Don't log the XHR error
sinon.stub(console, "error");
await visit("/t/internationalization-localization/280");
await click('[data-for-test="category-404"]');