From 4a4b879d7bc893c38c0b673c428d0bd96450bd4a Mon Sep 17 00:00:00 2001 From: Untone Date: Thu, 3 Oct 2024 16:44:43 +0300 Subject: [PATCH 1/3] fmt --- src/components/Editor/Toolbar/MicroBubbleMenu.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Editor/Toolbar/MicroBubbleMenu.tsx b/src/components/Editor/Toolbar/MicroBubbleMenu.tsx index 3bb43fe6..bca78461 100644 --- a/src/components/Editor/Toolbar/MicroBubbleMenu.tsx +++ b/src/components/Editor/Toolbar/MicroBubbleMenu.tsx @@ -21,7 +21,7 @@ export const MicroBubbleMenu = (props: MicroBubbleMenuProps) => { const isActive = (name: string, attributes?: Record) => createEditorTransaction( // biome-ignore lint/suspicious/noExplicitAny: tiptap 2.8.0 typing - () => props.editor as any, + () => props.editor as any, (editor) => editor?.isActive(name, attributes) ) From e67df403c5f2ac440917f611e38838afd4166275 Mon Sep 17 00:00:00 2001 From: Untone Date: Thu, 3 Oct 2024 16:55:59 +0300 Subject: [PATCH 2/3] e2e-update --- tests/3-auth-drafts-actions.spec.ts | 39 +++++++++++++---------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/tests/3-auth-drafts-actions.spec.ts b/tests/3-auth-drafts-actions.spec.ts index c9b592bc..06f290fa 100644 --- a/tests/3-auth-drafts-actions.spec.ts +++ b/tests/3-auth-drafts-actions.spec.ts @@ -72,7 +72,7 @@ test.beforeEach(async ({ page }) => { await page.getByRole('button', { name: 'Войти' }).click() }) -test.describe('*****Undone***** Drafts - article', () => { +test.describe('Create new draft', () => { test('Open /edit/new', async ({ page }) => { await page.goto('/edit/new') await expect(page).toHaveTitle('Выберите тип публикации') @@ -84,28 +84,23 @@ test('Create article', async ({ page }) => { await page.locator('li').filter({ hasText: 'статья' }).locator('img').click() }) -/* - -test('Check Draft', async ({ page }) => {}); - test('Drafts - create literature', async ({ page }) => { await page.getByRole('button', { name: 'Т.Р' }).click(); await page.getByRole('link', { name: 'Черновики' }).click(); await page.getByRole('link', { name: 'Создать публикацию' }).click(); + // biome-ignore lint/performance/useTopLevelRegex: await page.locator('li').filter({ hasText: /^литература$/ }).locator('img').click(); }); -*/ - -/* test('Drafts - create images', async ({ page }) => { +test('Drafts - create images', async ({ page }) => { await page.getByRole('button', { name: 'Т.Р' }).click(); await page.getByRole('link', { name: 'Черновики' }).click(); await page.getByRole('link', { name: 'Создать публикацию' }).click(); await page.locator('li').filter({ hasText: 'изображения' }).locator('img').click(); - Fill the form - Save - Check is it created -}); */ + // Fill the form + // Save + // Check is it created +}); test('Drafts - create music', async ({ page }) => { await page.getByRole('button', { name: 'Т.Р.' }).click() @@ -117,17 +112,19 @@ test('Drafts - create music', async ({ page }) => { // TODO: Check is it created }) -/* test('Drafts - create video', async ({ page }) => { +test('Drafts - create video', async ({ page }) => { await page.getByRole('button', { name: 'Т.Р' }).click(); await page.getByRole('link', { name: 'Черновики' }).click(); await page.getByRole('link', { name: 'Создать публикацию' }).click(); await page.locator('li').filter({ hasText: 'видео' }).locator('img').click(); - Fill the form - Save - Check is it created -}); */ + // Fill the form + // Save + // Check is it created +}); -/* test('Post topic', async ({ page }) => { - Open Draft - Post -});*/ +test('Post topic', async ({ page }) => { + await page.getByRole('button', { name: 'Т.Р.' }).click() + await page.getByRole('link', { name: 'Черновики' }).click() + await page.getByRole('link', { name: 'Создать публикацию' }).click() + // Post +}); From 7f3e8f431d63e13aeb633caed1503ef58a75ec62 Mon Sep 17 00:00:00 2001 From: Untone Date: Thu, 3 Oct 2024 16:56:14 +0300 Subject: [PATCH 3/3] e2e-update --- tests/3-auth-drafts-actions.spec.ts | 36 ++++++++++++++++------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/tests/3-auth-drafts-actions.spec.ts b/tests/3-auth-drafts-actions.spec.ts index 06f290fa..86d7fa2f 100644 --- a/tests/3-auth-drafts-actions.spec.ts +++ b/tests/3-auth-drafts-actions.spec.ts @@ -85,22 +85,26 @@ test('Create article', async ({ page }) => { }) test('Drafts - create literature', async ({ page }) => { - await page.getByRole('button', { name: 'Т.Р' }).click(); - await page.getByRole('link', { name: 'Черновики' }).click(); - await page.getByRole('link', { name: 'Создать публикацию' }).click(); + await page.getByRole('button', { name: 'Т.Р' }).click() + await page.getByRole('link', { name: 'Черновики' }).click() + await page.getByRole('link', { name: 'Создать публикацию' }).click() // biome-ignore lint/performance/useTopLevelRegex: - await page.locator('li').filter({ hasText: /^литература$/ }).locator('img').click(); -}); + await page + .locator('li') + .filter({ hasText: /^литература$/ }) + .locator('img') + .click() +}) test('Drafts - create images', async ({ page }) => { - await page.getByRole('button', { name: 'Т.Р' }).click(); - await page.getByRole('link', { name: 'Черновики' }).click(); - await page.getByRole('link', { name: 'Создать публикацию' }).click(); - await page.locator('li').filter({ hasText: 'изображения' }).locator('img').click(); + await page.getByRole('button', { name: 'Т.Р' }).click() + await page.getByRole('link', { name: 'Черновики' }).click() + await page.getByRole('link', { name: 'Создать публикацию' }).click() + await page.locator('li').filter({ hasText: 'изображения' }).locator('img').click() // Fill the form // Save // Check is it created -}); +}) test('Drafts - create music', async ({ page }) => { await page.getByRole('button', { name: 'Т.Р.' }).click() @@ -113,18 +117,18 @@ test('Drafts - create music', async ({ page }) => { }) test('Drafts - create video', async ({ page }) => { - await page.getByRole('button', { name: 'Т.Р' }).click(); - await page.getByRole('link', { name: 'Черновики' }).click(); - await page.getByRole('link', { name: 'Создать публикацию' }).click(); - await page.locator('li').filter({ hasText: 'видео' }).locator('img').click(); + await page.getByRole('button', { name: 'Т.Р' }).click() + await page.getByRole('link', { name: 'Черновики' }).click() + await page.getByRole('link', { name: 'Создать публикацию' }).click() + await page.locator('li').filter({ hasText: 'видео' }).locator('img').click() // Fill the form // Save // Check is it created -}); +}) test('Post topic', async ({ page }) => { await page.getByRole('button', { name: 'Т.Р.' }).click() await page.getByRole('link', { name: 'Черновики' }).click() await page.getByRole('link', { name: 'Создать публикацию' }).click() // Post -}); +})