Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions tests/e2e/v2/collections.e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ maybe("v2 collections (live)", () => {
const collection = await wiki().collections.create(slug(), {
name: uniqueName("collection-pages"),
});
const page = await suite.projectRow.pages.create({
// A collection only holds workspace wiki pages — a project-scoped page is a 400
// ("Page ... is not a workspace wiki page"), so create this one at the workspace path.
const page = await wiki().pages.create(slug(), {
name: uniqueName("page-for-collection"),
});
try {
Expand All @@ -52,7 +54,13 @@ maybe("v2 collections (live)", () => {
const removed = await wiki().collections.pages.remove(slug(), collection.id, [page.id]);
expect(removed).toContain(page.id);
} finally {
await suite.projectRow.pages.delete(page.id).catch(() => undefined);
// A workspace page must be archived (and unlocked) before it can be deleted.
await wiki()
.pages.update(slug(), page.id, { archived_at: new Date().toISOString(), is_locked: false })
.catch(() => undefined);
await wiki()
.pages.delete(slug(), page.id)
.catch(() => undefined);
await wiki()
.collections.delete(slug(), collection.id)
.catch(() => undefined);
Expand Down
4 changes: 3 additions & 1 deletion tests/e2e/v2/group-sync.e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ maybe("GroupSync (v2, live)", () => {
try {
const created = await groupSync().projectMappings.create(slug(), {
idp_group_name: `sdk-e2e-${Date.now()}`,
role_slug: "member",
// Project roles are admin/contributor/commenter/guest — there is no project `member`
// (that slug is a workspace role), so "member" here is a 400 "Unknown project role slug".
role_slug: "contributor",
project_id: suite.projectId,
});
createdId = created.id;
Expand Down
Loading