DEV: Don't leak auth methods between tests (#14708)
This commit is contained in:
parent
d6c39e54cf
commit
facf7d6f56
|
@ -85,10 +85,8 @@ export function findAll() {
|
|||
return methods;
|
||||
}
|
||||
|
||||
methods = [];
|
||||
|
||||
Site.currentProp("auth_providers").forEach((provider) =>
|
||||
methods.pushObject(LoginMethod.create(provider))
|
||||
methods = Site.currentProp("auth_providers").map((provider) =>
|
||||
LoginMethod.create(provider)
|
||||
);
|
||||
|
||||
// exclude FA icon for Google, uses custom SVG
|
||||
|
@ -97,4 +95,8 @@ export function findAll() {
|
|||
return methods;
|
||||
}
|
||||
|
||||
export function clearAuthMethods() {
|
||||
methods = undefined;
|
||||
}
|
||||
|
||||
export default LoginMethod;
|
||||
|
|
|
@ -52,6 +52,7 @@ import {
|
|||
cleanUpComposerUploadProcessor,
|
||||
} from "discourse/components/composer-editor";
|
||||
import { resetLastEditNotificationClick } from "discourse/models/post-stream";
|
||||
import { clearAuthMethods } from "discourse/models/login-method";
|
||||
|
||||
const LEGACY_ENV = !setupApplicationTest;
|
||||
|
||||
|
@ -295,6 +296,8 @@ export function acceptance(name, optionsOrCallback) {
|
|||
cleanUpComposerUploadMarkdownResolver();
|
||||
cleanUpComposerUploadPreProcessor();
|
||||
resetLastEditNotificationClick();
|
||||
clearAuthMethods();
|
||||
|
||||
app._runInitializer("instanceInitializers", (initName, initializer) => {
|
||||
if (initializer && initializer.teardown) {
|
||||
initializer.teardown(this.container);
|
||||
|
|
Loading…
Reference in New Issue