mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-09 22:31:41 +00:00
test(ui): accept trailing slashes in migration sidebar links
This commit is contained in:
parent
4104868458
commit
a08fb489cd
1 changed files with 2 additions and 2 deletions
|
|
@ -29,12 +29,12 @@ async function expectRendered(page: Page) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Click a migrated page's sidebar link. Migrated items render as <a href=".../ui/<segment>">;
|
||||
* Click a migrated page's sidebar link. Migrated items render as <a href=".../ui/<segment>/">;
|
||||
* nested ones live under collapsible groups whose children only render while the
|
||||
* group is open, so expand collapsed groups until the link is clickable.
|
||||
*/
|
||||
async function clickSidebar(page: Page, segment: string) {
|
||||
const link = sidebar(page).locator(`a[href$="/ui/${segment}"]`).first();
|
||||
const link = sidebar(page).locator(`a[href$="/ui/${segment}"], a[href$="/ui/${segment}/"]`).first();
|
||||
const collapsedGroups = sidebar(page).getByRole("button", { expanded: false });
|
||||
for (let i = 0; i < 8 && !(await link.isVisible().catch(() => false)); i++) {
|
||||
const stillCollapsed = await collapsedGroups.count();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue