From ea29a5d1a4465b031589b3884f253387f8b7b8e7 Mon Sep 17 00:00:00 2001 From: Michael Stingl Date: Mon, 29 Jun 2026 10:00:44 +0200 Subject: [PATCH] test(apiSpaces): a space admin can delete a space with no manager (#3040) #1877 reordered the api-test teardown to delete spaces before users, so the state where a project space's manager has been deleted is no longer exercised. This adds explicit coverage for it: the only manager of a project space is deleted, and a space admin can still list and delete (disable + purge) the space. Related: #1878 --- .../disableEnableDeleteSpaces.feature | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/tests/acceptance/features/apiSpaces/disableEnableDeleteSpaces.feature b/tests/acceptance/features/apiSpaces/disableEnableDeleteSpaces.feature index a6f0c4ee81..095a8167e0 100644 --- a/tests/acceptance/features/apiSpaces/disableEnableDeleteSpaces.feature +++ b/tests/acceptance/features/apiSpaces/disableEnableDeleteSpaces.feature @@ -248,3 +248,27 @@ Feature: Disabling, restoring and deleting space | user-role | | User | | User Light | + + @issue-1878 + Scenario: a space admin can list and delete a project space whose manager was deleted + Given the administrator has assigned the role "Space Admin" to user "Brian" using the Graph API + When the administrator deletes user "Alice" using the provisioning API + Then the HTTP status code should be "204" + When user "Brian" lists all spaces via the Graph API with query "$filter=driveType eq 'project'" + Then the HTTP status code should be "200" + And the JSON response should contain space called "Project Moon" and match + """ + { + "type": "object", + "required": ["name", "id", "driveType"], + "properties": { + "name": { "type": "string", "enum": ["Project Moon"] }, + "driveType": { "type": "string", "enum": ["project"] } + } + } + """ + When user "Brian" disables a space "Project Moon" owned by user "Alice" + Then the HTTP status code should be "204" + When user "Brian" deletes a space "Project Moon" owned by user "Alice" + Then the HTTP status code should be "204" + And the user "Brian" should not have a space called "Project Moon"