test(e2e): assert current session has no delete control

This commit is contained in:
kolaente 2026-04-21 11:07:36 +02:00 committed by kolaente
parent 76055b622b
commit 0902c009f6
1 changed files with 6 additions and 0 deletions

View File

@ -45,4 +45,10 @@ test.describe('Sessions', () => {
})
expect(after.status()).toBe(401)
})
test('current session cannot be deleted from the UI', async ({authenticatedPage: page}) => {
await gotoUserSettings(page, 'sessions')
const currentRow = page.locator('tr', {has: page.locator('.tag.is-primary')})
await expect(currentRow.getByRole('button', {name: 'Delete'})).toHaveCount(0)
})
})