mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 04:48:53 +00:00
fix(core): make e2e more stable (#4987)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user