mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-27 04:47:03 -06:00
fix(ui): inset limited access badge from chat edge (#125012)
This commit is contained in:
@@ -241,6 +241,21 @@ describeControlUiE2e("Control UI live device scope upgrade", () => {
|
||||
const statusChip = page.getByRole("button", { name: "Show limited access details" });
|
||||
await statusChip.waitFor();
|
||||
expect(await statusChip.getAttribute("aria-expanded")).toBe("false");
|
||||
await waitForLayoutSettled(page, ".content, .scope-upgrade-chip-row");
|
||||
const chipInset = await statusChip.evaluate((chip) => {
|
||||
const content = document.querySelector<HTMLElement>(".content");
|
||||
if (!content) {
|
||||
throw new Error("Missing content around limited-access status chip");
|
||||
}
|
||||
const contentBox = content.getBoundingClientRect();
|
||||
const chipBox = chip.getBoundingClientRect();
|
||||
return {
|
||||
right: contentBox.right - chipBox.right,
|
||||
top: chipBox.top - contentBox.top,
|
||||
};
|
||||
});
|
||||
await captureProof(page, "collapsed.png");
|
||||
expect(chipInset).toEqual({ right: 20, top: 8 });
|
||||
expect(await page.getByText("This browser has limited access.", { exact: true }).count()).toBe(
|
||||
0,
|
||||
);
|
||||
|
||||
@@ -28,6 +28,10 @@
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.content--chat:has(.chat-workbench) .scope-upgrade-chip-row {
|
||||
padding: 8px 20px 0;
|
||||
}
|
||||
|
||||
.content--chat:has(.chat-workbench) .chat {
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
|
||||
Reference in New Issue
Block a user