🐛(frontend) fix crash share modal on grid options

The share modal in the DocsGridItem component
was crashing when opened due to a provider not
initialized.
This commit is contained in:
Anthony LC
2025-07-15 11:36:44 +02:00
parent 0afc50fb93
commit 08a0eb59c8
3 changed files with 21 additions and 1 deletions

View File

@@ -91,6 +91,22 @@ test.describe('Document grid item options', () => {
await page.goto('/');
});
test('it checks the share modal', async ({ page, browserName }) => {
const [docTitle] = await createDoc(page, `check share modal`, browserName);
await page.goto('/');
await expect(page.getByText(docTitle)).toBeVisible();
const row = await getGridRow(page, docTitle);
await row.getByText(`more_horiz`).click();
await page.getByRole('menuitem', { name: 'Share' }).click();
await expect(
page.getByRole('dialog').getByText('Share the document'),
).toBeVisible();
});
test('it pins a document', async ({ page, browserName }) => {
const [docTitle] = await createDoc(page, `Favorite doc`, browserName);