DEV: Skip UI delay in test mode (#194)

This was adding 2s to every topic-view test when the solved plugin was loaded
This commit is contained in:
David Taylor 2022-03-10 11:07:12 +00:00 committed by GitHub
parent 4a3ceaca9c
commit 9ef62060c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -1,7 +1,9 @@
import { later } from "@ember/runloop";
import { isTesting } from "discourse-common/config/environment";
const ONE_WEEK = 7 * 24 * 60 * 60 * 1000; // milliseconds
const MAX_DURATION_WITH_NO_ANSWER = ONE_WEEK;
const DISPLAY_DELAY = isTesting() ? 0 : 2000;
export default {
shouldRender(args, component) {
@ -43,6 +45,6 @@ export default {
) {
component.set("show", true);
}
}, 2000);
}, DISPLAY_DELAY);
},
};