mirror of
https://github.com/discourse/discourse.git
synced 2025-01-31 15:48:28 +08:00
FIX: Flaky tests
Locally I was getting a lot of failures from discourse-encrypt due to leaky state in composer actions. This fixes it.
This commit is contained in:
parent
52f8eecbb9
commit
10384bcdf4
|
@ -13,12 +13,6 @@ acceptance("Composer Actions", {
|
||||||
},
|
},
|
||||||
site: {
|
site: {
|
||||||
can_tag_topics: true
|
can_tag_topics: true
|
||||||
},
|
|
||||||
beforeEach() {
|
|
||||||
_clearSnapshots();
|
|
||||||
},
|
|
||||||
afterEach() {
|
|
||||||
_clearSnapshots();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@ import { resetDecorators as resetPluginOutletDecorators } from "discourse/compon
|
||||||
import { resetUsernameDecorators } from "discourse/helpers/decorate-username-selector";
|
import { resetUsernameDecorators } from "discourse/helpers/decorate-username-selector";
|
||||||
import { resetCache as resetOneboxCache } from "pretty-text/oneboxer";
|
import { resetCache as resetOneboxCache } from "pretty-text/oneboxer";
|
||||||
import { resetCustomPostMessageCallbacks } from "discourse/controllers/topic";
|
import { resetCustomPostMessageCallbacks } from "discourse/controllers/topic";
|
||||||
|
import { _clearSnapshots } from "select-kit/components/composer-actions";
|
||||||
import User from "discourse/models/user";
|
import User from "discourse/models/user";
|
||||||
|
|
||||||
export function currentUser() {
|
export function currentUser() {
|
||||||
|
@ -166,6 +167,7 @@ export function acceptance(name, options) {
|
||||||
resetUsernameDecorators();
|
resetUsernameDecorators();
|
||||||
resetOneboxCache();
|
resetOneboxCache();
|
||||||
resetCustomPostMessageCallbacks();
|
resetCustomPostMessageCallbacks();
|
||||||
|
_clearSnapshots();
|
||||||
Discourse._runInitializer("instanceInitializers", function(
|
Discourse._runInitializer("instanceInitializers", function(
|
||||||
initName,
|
initName,
|
||||||
initializer
|
initializer
|
||||||
|
|
Loading…
Reference in New Issue
Block a user