Skip to content

Commit

Permalink
test: additional assertions in "blocked from sync" test (#864)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
EvanHahn committed Sep 25, 2024
1 parent 756c847 commit e8764c4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test-e2e/sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit e8764c4

Please sign in to comment.