DEV: Silence one more test (#17375)
…and improve silencing added in #17362
This commit is contained in:
parent
215926f295
commit
94c70a0909
|
@ -389,7 +389,12 @@ 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");
|
||||
const stub = sinon
|
||||
.stub(console, "error")
|
||||
.withArgs(
|
||||
sinon.match(/\[Uppy\]/),
|
||||
sinon.match(/Failed to upload avatar\.png/)
|
||||
);
|
||||
|
||||
await visit("/");
|
||||
await click("#create-topic");
|
||||
|
@ -398,6 +403,7 @@ acceptance("Uppy Composer Attachment - Upload Error", function (needs) {
|
|||
const done = assert.async();
|
||||
|
||||
appEvents.on("composer:upload-error", async () => {
|
||||
sinon.assert.calledOnce(stub);
|
||||
assert.strictEqual(
|
||||
query(".bootbox .modal-body").innerHTML,
|
||||
"There was an error uploading the file, the gif was way too cool.",
|
||||
|
|
|
@ -16,12 +16,15 @@ 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");
|
||||
const stub = sinon
|
||||
.stub(console, "error")
|
||||
.withArgs(sinon.match({ status: 404 }));
|
||||
|
||||
await visit("/t/internationalization-localization/280");
|
||||
|
||||
await click('[data-for-test="category-404"]');
|
||||
assert.strictEqual(currentURL(), "/404");
|
||||
sinon.assert.calledOnce(stub);
|
||||
|
||||
// See that we can navigate away
|
||||
await click("#site-logo");
|
||||
|
|
|
@ -5,6 +5,7 @@ import {
|
|||
import { test } from "qunit";
|
||||
import { PresenceChannelNotFound } from "discourse/services/presence";
|
||||
import { setTestPresence } from "discourse/lib/user-presence";
|
||||
import sinon from "sinon";
|
||||
|
||||
function usersFixture() {
|
||||
return [
|
||||
|
@ -122,6 +123,12 @@ acceptance("Presence - Subscribing", function (needs) {
|
|||
"updates following messagebus message"
|
||||
);
|
||||
|
||||
const stub = sinon
|
||||
.stub(console, "log")
|
||||
.withArgs(
|
||||
"PresenceChannel '/test/ch1' dropped message (received 99, expecting 3), resyncing..."
|
||||
);
|
||||
|
||||
publishToMessageBus(
|
||||
"/presence/test/ch1",
|
||||
{
|
||||
|
@ -133,6 +140,7 @@ acceptance("Presence - Subscribing", function (needs) {
|
|||
|
||||
await channel._presenceState._resubscribePromise;
|
||||
|
||||
sinon.assert.calledOnce(stub);
|
||||
assert.strictEqual(
|
||||
channel.users.length,
|
||||
3,
|
||||
|
|
Loading…
Reference in New Issue