AFFiNE/tests/parallels/local-first-setting-page.spec.ts

27 lines
883 B
TypeScript
Raw Normal View History

import { expect } from '@playwright/test';
import { openHomePage } from '../libs/load-page';
2023-03-28 08:25:16 +03:00
import { waitMarkdownImported } from '../libs/page-logic';
import { test } from '../libs/playwright';
import { clickSideBarSettingButton } from '../libs/sidebar';
test.describe('Local first setting page', () => {
test('Should highlight the setting page menu when selected', async ({
page,
}) => {
await openHomePage(page);
2023-03-28 08:25:16 +03:00
await waitMarkdownImported(page);
const element = await page.getByTestId(
'slider-bar-workspace-setting-button'
);
const prevColor = await element.evaluate(
element => window.getComputedStyle(element).color
);
await clickSideBarSettingButton(page);
const currentColor = await element.evaluate(
element => window.getComputedStyle(element).color
);
expect(prevColor).not.toBe(currentColor);
});
});