fix(core): make e2e more stable (#4987)

This commit is contained in:
EYHN
2023-11-20 20:17:30 +08:00
committed by GitHub
parent 899e46b1fa
commit 70e71bd43e
2 changed files with 21 additions and 12 deletions

View File

@@ -59,7 +59,14 @@ export const createLocalProviders = (): DocProviderCreator[] => {
return engine.waitForLoadedRootDoc();
},
connect() {
// TODO: actually connect
if (!connected) {
engine.start();
for (const provider of awarenessProviders) {
provider.connect();
}
connected = true;
}
},
disconnect() {
// TODO: actually disconnect
@@ -109,7 +116,14 @@ export const createAffineProviders = (): DocProviderCreator[] => {
return engine.waitForLoadedRootDoc();
},
connect() {
// TODO: actually connect
if (!connected) {
engine.start();
for (const provider of awarenessProviders) {
provider.connect();
}
connected = true;
}
},
disconnect() {
// TODO: actually disconnect