🚨(frontend) fix lint warning about unnecessary assertion
- Recent upgrade highlighted a lint warning about an unnecessary assertion in the BlockNoteToolbar component. This commit removes the assertion to resolve the warning. - Fix a test - upgrade causes an error on a selector click
This commit is contained in:
@@ -149,7 +149,11 @@ test.describe('Document list members', () => {
|
|||||||
`You are the sole owner of this group, make another member the group owner before you can change your own role or be removed from your document.`,
|
`You are the sole owner of this group, make another member the group owner before you can change your own role or be removed from your document.`,
|
||||||
);
|
);
|
||||||
await expect(soloOwner).toBeVisible();
|
await expect(soloOwner).toBeVisible();
|
||||||
await list.click();
|
|
||||||
|
await list.click({
|
||||||
|
// eslint-disable-next-line playwright/no-force-option
|
||||||
|
force: true, // Force click to close the dropdown
|
||||||
|
});
|
||||||
const newUserEmail = await addNewMember(page, 0, 'Owner');
|
const newUserEmail = await addNewMember(page, 0, 'Owner');
|
||||||
const newUser = list.getByTestId(`doc-share-member-row-${newUserEmail}`);
|
const newUser = list.getByTestId(`doc-share-member-row-${newUserEmail}`);
|
||||||
const newUserRoles = newUser.getByLabel('doc-role-dropdown');
|
const newUserRoles = newUser.getByLabel('doc-role-dropdown');
|
||||||
@@ -158,10 +162,16 @@ test.describe('Document list members', () => {
|
|||||||
|
|
||||||
await currentUserRole.click();
|
await currentUserRole.click();
|
||||||
await expect(soloOwner).toBeHidden();
|
await expect(soloOwner).toBeHidden();
|
||||||
await list.click();
|
await list.click({
|
||||||
|
// eslint-disable-next-line playwright/no-force-option
|
||||||
|
force: true, // Force click to close the dropdown
|
||||||
|
});
|
||||||
|
|
||||||
await newUserRoles.click();
|
await newUserRoles.click();
|
||||||
await list.click();
|
await list.click({
|
||||||
|
// eslint-disable-next-line playwright/no-force-option
|
||||||
|
force: true, // Force click to close the dropdown
|
||||||
|
});
|
||||||
|
|
||||||
await currentUserRole.click();
|
await currentUserRole.click();
|
||||||
await page.getByLabel('Administrator').click();
|
await page.getByLabel('Administrator').click();
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {
|
|||||||
getFormattingToolbarItems,
|
getFormattingToolbarItems,
|
||||||
useDictionary,
|
useDictionary,
|
||||||
} from '@blocknote/react';
|
} from '@blocknote/react';
|
||||||
import React, { JSX, useCallback, useMemo, useState } from 'react';
|
import React, { useCallback, useMemo, useState } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
import { useConfig } from '@/core/config/api';
|
import { useConfig } from '@/core/config/api';
|
||||||
@@ -50,7 +50,7 @@ export const BlockNoteToolbar = () => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return toolbarItems as JSX.Element[];
|
return toolbarItems;
|
||||||
}, [dict, t]);
|
}, [dict, t]);
|
||||||
|
|
||||||
const formattingToolbar = useCallback(() => {
|
const formattingToolbar = useCallback(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user