mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-05 02:41:56 +00:00
test(e2e): drop the auto-router select "opens below" spec
The spec pinned Base UI's collision behaviour, not our code: it only passes while the template popup happens to fit under the trigger at 1280x900, and #41315's taller Add Auto Router form broke that premise for the second time in three weeks. #41527 tried to scroll the trigger into the upper half, but the dialog content is shorter than its max height, so nothing scrolls and CI still fails 3/3 with the trigger at y=487 The guarantee #38554 introduced is that the popup never covers the trigger, and the sibling spec keeps asserting that at a viewport with no room below
This commit is contained in:
parent
5ef40a630b
commit
25445e8b5c
1 changed files with 0 additions and 20 deletions
|
|
@ -25,13 +25,6 @@ async function boxes(trigger: Locator, options: Locator) {
|
|||
|
||||
const clippedPopup = (page: PlaywrightPage) => page.locator('[data-slot="select-content"]');
|
||||
|
||||
function pollOptionsOpenBelowTrigger(trigger: Locator, options: Locator) {
|
||||
return expect.poll(async () => {
|
||||
const box = await boxes(trigger, options);
|
||||
return box && box.optionsBox.y >= box.triggerBox.y + box.triggerBox.height;
|
||||
});
|
||||
}
|
||||
|
||||
function pollOptionsCoverTrigger(trigger: Locator, options: Locator) {
|
||||
return expect.poll(async () => {
|
||||
const box = await boxes(trigger, options);
|
||||
|
|
@ -46,19 +39,6 @@ function pollOptionsCoverTrigger(trigger: Locator, options: Locator) {
|
|||
test.describe("Auto Router template select anchoring", () => {
|
||||
test.use({ storageState: ADMIN_STORAGE_PATH });
|
||||
|
||||
test("opens the options below the trigger when there is room below it", async ({ page }) => {
|
||||
const viewport = { width: 1280, height: 900 };
|
||||
await page.setViewportSize(viewport);
|
||||
const trigger = await openTemplateSelect(page);
|
||||
await trigger.evaluate((element) => element.scrollIntoView({ block: "start" }));
|
||||
await expect.poll(async () => (await trigger.boundingBox())?.y).toBeLessThan(viewport.height / 2);
|
||||
|
||||
await trigger.click();
|
||||
await expect(page.getByRole("listbox")).toBeVisible();
|
||||
|
||||
await pollOptionsOpenBelowTrigger(trigger, clippedPopup(page)).toBe(true);
|
||||
});
|
||||
|
||||
test("keeps the trigger uncovered when the options open with no room below it", async ({ page }) => {
|
||||
await page.setViewportSize({ width: 1280, height: 560 });
|
||||
const trigger = await openTemplateSelect(page);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue