Merge branch 'dev' into nobootstrap

This commit is contained in:
Untone 2024-10-04 11:22:47 +03:00
commit b04370ae42
2 changed files with 36 additions and 35 deletions

View File

@ -20,7 +20,7 @@ export const MicroBubbleMenu = (props: MicroBubbleMenuProps) => {
const isActive = (name: string, attributes?: Record<string, string | number>) =>
createEditorTransaction(
// biome-ignore lint/suspicious/noExplicitAny: tiptap 2.8.0 typing issue
// biome-ignore lint/suspicious/noExplicitAny: tiptap 2.8.0 typing
() => props.editor as any,
(editor) => editor?.isActive(name, attributes)
)

View File

@ -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,27 @@ 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();
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()
// biome-ignore lint/performance/useTopLevelRegex: <explanation>
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();
Fill the form
Save
Check is it created
}); */
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
})
test('Drafts - create music', async ({ page }) => {
await page.getByRole('button', { name: 'Т.Р.' }).click()
@ -117,17 +116,19 @@ test('Drafts - create music', async ({ page }) => {
// TODO: Check is it created
})
/* 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
}); */
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
})
/* 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
})