From e8764c49f0204427ed09c8a0ea85f77567e0af68 Mon Sep 17 00:00:00 2001 From: Evan Hahn Date: Wed, 25 Sep 2024 11:20:11 -0500 Subject: [PATCH] test: additional assertions in "blocked from sync" test (#864) We test that blocked members shouldn't be able to sync. However, it's possible that this test had false positives if the blocked member was simply missing from the project entirely! This adds two assertions to make sure that the other members see the blocked one, and that they are indeed blocked. --- test-e2e/sync.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test-e2e/sync.js b/test-e2e/sync.js index 68524e24..e369ee98 100644 --- a/test-e2e/sync.js +++ b/test-e2e/sync.js @@ -690,6 +690,17 @@ test('no sync capabilities === no namespaces sync apart from auth', async (t) => ) const [invitorProject, inviteeProject] = projects + assert.equal( + (await invitorProject.$member.getById(blocked.deviceId)).role.roleId, + BLOCKED_ROLE_ID, + 'invitor sees blocked participant as part of the project' + ) + assert.equal( + (await inviteeProject.$member.getById(blocked.deviceId)).role.roleId, + BLOCKED_ROLE_ID, + 'invitee sees blocked participant as part of the project' + ) + const generatedDocs = (await seedDatabases([inviteeProject])).flat() const configDocsCount = generatedDocs.filter( (doc) => doc.schemaName !== 'observation'