mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-15 00:33:06 +03:00
39 lines
986 B
TypeScript
39 lines
986 B
TypeScript
import os from 'node:os';
|
|
|
|
import { test } from '@affine-test/kit/electron';
|
|
import { shouldCallIpcRendererHandler } from '@affine-test/kit/utils/ipc';
|
|
|
|
test.describe('behavior test', () => {
|
|
if (os.platform() === 'darwin') {
|
|
test('system button should hidden correctly', async ({
|
|
page,
|
|
electronApp,
|
|
}) => {
|
|
{
|
|
const promise = shouldCallIpcRendererHandler(
|
|
electronApp,
|
|
'ui:handleSidebarVisibilityChange'
|
|
);
|
|
await page
|
|
.locator(
|
|
'[data-testid=app-sidebar-arrow-button-collapse][data-show=true]'
|
|
)
|
|
.click();
|
|
await promise;
|
|
}
|
|
{
|
|
const promise = shouldCallIpcRendererHandler(
|
|
electronApp,
|
|
'ui:handleSidebarVisibilityChange'
|
|
);
|
|
await page
|
|
.locator(
|
|
'[data-testid=app-sidebar-arrow-button-expand][data-show=true]'
|
|
)
|
|
.click();
|
|
await promise;
|
|
}
|
|
});
|
|
}
|
|
});
|