Fixes #12826 Leave without saving was being triggered when no changes were made to the tenant. This should only happen if the value in form state differs from that of the selected tenant, i.e. after changing tenants. Adds tenant selector syncing so the selector updates when a tenant is added or the name is edited. Also adds E2E for most multi-tenant admin functionality. --- - To see the specific tasks where the Asana app for GitHub is being used, see below: - https://app.asana.com/0/0/1210562742356842
28 lines
691 B
TypeScript
28 lines
691 B
TypeScript
import type { Page } from '@playwright/test'
|
|
|
|
import type { AdminUrlUtil } from '../../helpers/adminUrlUtil.js'
|
|
|
|
export async function goToListDoc({
|
|
page,
|
|
cellClass,
|
|
textToMatch,
|
|
urlUtil,
|
|
}: {
|
|
cellClass: `.cell-${string}`
|
|
page: Page
|
|
textToMatch: string
|
|
urlUtil: AdminUrlUtil
|
|
}) {
|
|
await page.goto(urlUtil.list)
|
|
const row = page
|
|
.locator(`.collection-list .table tr`)
|
|
.filter({
|
|
has: page.locator(`${cellClass}`, { hasText: textToMatch }),
|
|
})
|
|
.first()
|
|
const cellLink = row.locator(`td a`).first()
|
|
const linkURL = await cellLink.getAttribute('href')
|
|
await page.goto(`${urlUtil.serverURL}${linkURL}`)
|
|
await page.waitForLoadState('networkidle')
|
|
}
|