mirror of
https://github.com/discourse/discourse.git
synced 2025-01-31 12:56:47 +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: {
|
||||
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 { resetCache as resetOneboxCache } from "pretty-text/oneboxer";
|
||||
import { resetCustomPostMessageCallbacks } from "discourse/controllers/topic";
|
||||
import { _clearSnapshots } from "select-kit/components/composer-actions";
|
||||
import User from "discourse/models/user";
|
||||
|
||||
export function currentUser() {
|
||||
|
@ -166,6 +167,7 @@ export function acceptance(name, options) {
|
|||
resetUsernameDecorators();
|
||||
resetOneboxCache();
|
||||
resetCustomPostMessageCallbacks();
|
||||
_clearSnapshots();
|
||||
Discourse._runInitializer("instanceInitializers", function(
|
||||
initName,
|
||||
initializer
|
||||
|
|
Loading…
Reference in New Issue
Block a user