mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-29 16:19:43 +08:00
fix(mobile): popover handle
This commit is contained in:
@@ -169,7 +169,7 @@ export function createButtonPopper(options: ButtonPopperOptions) {
|
||||
hide,
|
||||
toggle,
|
||||
dispose: () => {
|
||||
cleanup?.();
|
||||
hide();
|
||||
clickAway.dispose();
|
||||
},
|
||||
};
|
||||
|
||||
@@ -256,6 +256,17 @@ test('should format quick bar be able to change background color', async ({
|
||||
.evaluate(menu => menu.matches(':popover-open'))
|
||||
).toBe(true);
|
||||
|
||||
const highlightMenu = formatBar.locator(
|
||||
'affine-highlight-dropdown-menu editor-menu-button'
|
||||
);
|
||||
await highlightMenu.evaluate(menu => {
|
||||
Reflect.set(menu, 'popperOptions', { mainAxis: 1 });
|
||||
});
|
||||
await expect(highlightMenu).not.toHaveAttribute('data-open', 'true');
|
||||
|
||||
await highlight.highlightBtn.click();
|
||||
await expect(highlight.redForegroundBtn).toBeVisible();
|
||||
|
||||
// TODO(@fundon): these recent settings should be added to the dropdown menu.
|
||||
// await expect(highlight.highlightBtn).toHaveAttribute(
|
||||
// 'data-last-used',
|
||||
|
||||
Reference in New Issue
Block a user