Skip to content

Commit

Permalink
test: additional assertions in "blocked from sync" test
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 24, 2024
1 parent 063b446 commit b1fe1d8
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 b1fe1d8

Please sign in to comment.