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:
parent
4a3ceaca9c
commit
9ef62060c4
|
@ -1,7 +1,9 @@
|
||||||
import { later } from "@ember/runloop";
|
import { later } from "@ember/runloop";
|
||||||
|
import { isTesting } from "discourse-common/config/environment";
|
||||||
|
|
||||||
const ONE_WEEK = 7 * 24 * 60 * 60 * 1000; // milliseconds
|
const ONE_WEEK = 7 * 24 * 60 * 60 * 1000; // milliseconds
|
||||||
const MAX_DURATION_WITH_NO_ANSWER = ONE_WEEK;
|
const MAX_DURATION_WITH_NO_ANSWER = ONE_WEEK;
|
||||||
|
const DISPLAY_DELAY = isTesting() ? 0 : 2000;
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
shouldRender(args, component) {
|
shouldRender(args, component) {
|
||||||
|
@ -43,6 +45,6 @@ export default {
|
||||||
) {
|
) {
|
||||||
component.set("show", true);
|
component.set("show", true);
|
||||||
}
|
}
|
||||||
}, 2000);
|
}, DISPLAY_DELAY);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue