selectViewMode = async (page, mode) => {
  if (mode === 'grid') {
    await page.locator('button[title="Show items in grid"]').click()
    await page.waitForSelector('.files-grid')
  } else {
    await page.locator('button[title="Show items in list"]').click()
    await page.waitForSelector('.FilesList')
  }
}
Select view mode (grid or list)
@param {import('@playwright/test').Page} page - The Playwright page object
@param {string} mode - The view mode to select ('grid' or 'list')