mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-19 02:56:23 +08:00
refactor(core): remove all MUI related components and utilities (#4941)
This commit is contained in:
@@ -14,6 +14,10 @@ test('Open shortcuts modal', async ({ page }) => {
|
||||
|
||||
await shortcutsIcon.click();
|
||||
await page.waitForTimeout(1000);
|
||||
const shortcutsModal = page.locator('[data-testid=shortcuts-modal]');
|
||||
await expect(shortcutsModal).toContainText('Page');
|
||||
|
||||
const settingModal = page.getByTestId('setting-modal');
|
||||
await expect(settingModal).toBeVisible();
|
||||
|
||||
const title = page.getByTestId('keyboard-shortcuts-title');
|
||||
await expect(title).toBeVisible();
|
||||
});
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
"dependencies": {
|
||||
"@affine/component": "workspace:*",
|
||||
"@affine/i18n": "workspace:*",
|
||||
"@mui/material": "^5.14.14",
|
||||
"@storybook/addon-actions": "^7.4.6",
|
||||
"@storybook/addon-essentials": "^7.4.6",
|
||||
"@storybook/addon-interactions": "^7.4.6",
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
/* deepscan-disable USELESS_ARROW_FUNC_BIND */
|
||||
import { Breadcrumbs } from '@affine/component';
|
||||
import { Link, Typography } from '@mui/material';
|
||||
import { expect } from '@storybook/jest';
|
||||
import type { Meta, StoryFn } from '@storybook/react';
|
||||
import { within } from '@storybook/testing-library';
|
||||
export default {
|
||||
title: 'AFFiNE/Breadcrumbs',
|
||||
component: Breadcrumbs,
|
||||
parameters: {
|
||||
chromatic: { disableSnapshot: true },
|
||||
},
|
||||
} as Meta<typeof Breadcrumbs>;
|
||||
|
||||
const Template: StoryFn = args => <Breadcrumbs {...args} />;
|
||||
|
||||
export const Primary = Template.bind(undefined);
|
||||
Primary.play = async ({ canvasElement }) => {
|
||||
const canvas = within(canvasElement);
|
||||
const text = canvas.getByText('AFFiNE');
|
||||
expect(text.getAttribute('data-testid')).toBe('affine');
|
||||
};
|
||||
Primary.args = {
|
||||
children: [
|
||||
<Link
|
||||
data-testid="affine"
|
||||
key="1"
|
||||
underline="hover"
|
||||
color="inherit"
|
||||
href="/"
|
||||
>
|
||||
AFFiNE
|
||||
</Link>,
|
||||
<Link key="2" underline="hover" color="inherit" href="/Docs/">
|
||||
Docs
|
||||
</Link>,
|
||||
<Typography key="3" color="text.primary">
|
||||
Introduction
|
||||
</Typography>,
|
||||
],
|
||||
};
|
||||
Reference in New Issue
Block a user