mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-25 14:28:51 +08:00
chore(editor): remove redundant line styles components (#10980)
* Moved `edgeless-line-styles-panel` and `edgeless-line-width-panel` into components pkg
This commit is contained in:
@@ -329,11 +329,7 @@ test.describe('edgeless note element toolbar', () => {
|
||||
await toolbar.getByRole('button', { name: 'Border style' }).click();
|
||||
await toolbar.locator('.mode-solid').click();
|
||||
await toolbar.getByRole('button', { name: 'Border style' }).click();
|
||||
// TODO(@fundon): delete duplicate components
|
||||
await toolbar
|
||||
.locator('affine-edgeless-line-width-panel')
|
||||
.getByLabel('8')
|
||||
.click();
|
||||
await toolbar.locator('edgeless-line-width-panel').getByLabel('8').click();
|
||||
|
||||
expect(await getNoteEdgelessProps(page, noteId)).toEqual({
|
||||
style: {
|
||||
|
||||
@@ -1395,13 +1395,10 @@ export async function resizeConnectorByStartCapitalHandler(
|
||||
}
|
||||
|
||||
export function getEdgelessLineWidthPanel(page: Page) {
|
||||
return (
|
||||
page
|
||||
.locator('affine-toolbar-widget editor-toolbar')
|
||||
// TODO(@fundon): remove ` edgeless-line-width-panel`
|
||||
.locator('affine-edgeless-line-width-panel')
|
||||
.locator('.line-width-panel')
|
||||
);
|
||||
return page
|
||||
.locator('affine-toolbar-widget editor-toolbar')
|
||||
.locator('edgeless-line-width-panel')
|
||||
.locator('.line-width-panel');
|
||||
}
|
||||
export async function changeShapeStrokeWidth(page: Page) {
|
||||
const lineWidthPanel = getEdgelessLineWidthPanel(page);
|
||||
@@ -1461,12 +1458,9 @@ export function locatorConnectorStrokeWidthButton(
|
||||
page: Page,
|
||||
buttonPosition: number
|
||||
) {
|
||||
return (
|
||||
locatorComponentToolbar(page)
|
||||
// TODO(@fundon): remove redundant components
|
||||
.locator('affine-edgeless-line-width-panel')
|
||||
.locator(`.line-width-button:nth-child(${buttonPosition})`)
|
||||
);
|
||||
return locatorComponentToolbar(page)
|
||||
.locator('edgeless-line-width-panel')
|
||||
.locator(`.line-width-button:nth-child(${buttonPosition})`);
|
||||
}
|
||||
export async function changeConnectorStrokeWidth(
|
||||
page: Page,
|
||||
|
||||
Reference in New Issue
Block a user