feat(kanban): add setting to always show bucket task count (#1966)

Added "Always show task count on Kanban buckets" setting in user preferences to control the visibility of task counts on Kanban bucket headers
This commit is contained in:
kolaente
2025-12-12 00:27:13 +01:00
committed by GitHub
parent 49c43e87f0
commit 8b6082e8c7
9 changed files with 114 additions and 16 deletions

View File

@@ -4,8 +4,9 @@ import {TEST_PASSWORD} from './constants'
/**
* This authenticates a user and puts the token in local storage which allows us to perform authenticated requests.
* Returns the user and token for use in tests that need to make authenticated API calls.
*/
export async function login(page: Page, apiContext: APIRequestContext, user?: any) {
export async function login(page: Page | null, apiContext: APIRequestContext, user?: any) {
if (!user) {
throw new Error('Needs user')
}
@@ -25,12 +26,14 @@ export async function login(page: Page, apiContext: APIRequestContext, user?: an
const body = await response.json()
const token = body.token
// Set token in localStorage before navigating
await page.addInitScript((token) => {
window.localStorage.setItem('token', token)
}, token)
// Set token in localStorage before navigating (only if page is provided)
if (page) {
await page.addInitScript((token) => {
window.localStorage.setItem('token', token)
}, token)
}
return user
return {user, token}
}
export async function createFakeUser() {