Merge branch 'dev' into nobootstrap
This commit is contained in:
commit
b04370ae42
|
@ -20,7 +20,7 @@ export const MicroBubbleMenu = (props: MicroBubbleMenuProps) => {
|
||||||
|
|
||||||
const isActive = (name: string, attributes?: Record<string, string | number>) =>
|
const isActive = (name: string, attributes?: Record<string, string | number>) =>
|
||||||
createEditorTransaction(
|
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,
|
() => props.editor as any,
|
||||||
(editor) => editor?.isActive(name, attributes)
|
(editor) => editor?.isActive(name, attributes)
|
||||||
)
|
)
|
||||||
|
|
|
@ -72,7 +72,7 @@ test.beforeEach(async ({ page }) => {
|
||||||
await page.getByRole('button', { name: 'Войти' }).click()
|
await page.getByRole('button', { name: 'Войти' }).click()
|
||||||
})
|
})
|
||||||
|
|
||||||
test.describe('*****Undone***** Drafts - article', () => {
|
test.describe('Create new draft', () => {
|
||||||
test('Open /edit/new', async ({ page }) => {
|
test('Open /edit/new', async ({ page }) => {
|
||||||
await page.goto('/edit/new')
|
await page.goto('/edit/new')
|
||||||
await expect(page).toHaveTitle('Выберите тип публикации')
|
await expect(page).toHaveTitle('Выберите тип публикации')
|
||||||
|
@ -84,28 +84,27 @@ test('Create article', async ({ page }) => {
|
||||||
await page.locator('li').filter({ hasText: 'статья' }).locator('img').click()
|
await page.locator('li').filter({ hasText: 'статья' }).locator('img').click()
|
||||||
})
|
})
|
||||||
|
|
||||||
/*
|
|
||||||
|
|
||||||
test('Check Draft', async ({ page }) => {});
|
|
||||||
|
|
||||||
test('Drafts - create literature', async ({ page }) => {
|
test('Drafts - create literature', async ({ page }) => {
|
||||||
await page.getByRole('button', { name: 'Т.Р' }).click();
|
await page.getByRole('button', { name: 'Т.Р' }).click()
|
||||||
await page.getByRole('link', { name: 'Черновики' }).click();
|
await page.getByRole('link', { name: 'Черновики' }).click()
|
||||||
await page.getByRole('link', { name: 'Создать публикацию' }).click();
|
await page.getByRole('link', { name: 'Создать публикацию' }).click()
|
||||||
await page.locator('li').filter({ hasText: /^литература$/ }).locator('img').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()
|
||||||
/* test('Drafts - create images', async ({ page }) => {
|
await page.getByRole('link', { name: 'Черновики' }).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()
|
||||||
await page.getByRole('link', { name: 'Создать публикацию' }).click();
|
// Fill the form
|
||||||
await page.locator('li').filter({ hasText: 'изображения' }).locator('img').click();
|
// Save
|
||||||
Fill the form
|
// Check is it created
|
||||||
Save
|
})
|
||||||
Check is it created
|
|
||||||
}); */
|
|
||||||
|
|
||||||
test('Drafts - create music', async ({ page }) => {
|
test('Drafts - create music', async ({ page }) => {
|
||||||
await page.getByRole('button', { name: 'Т.Р.' }).click()
|
await page.getByRole('button', { name: 'Т.Р.' }).click()
|
||||||
|
@ -117,17 +116,19 @@ test('Drafts - create music', async ({ page }) => {
|
||||||
// TODO: Check is it created
|
// 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('button', { name: 'Т.Р' }).click()
|
||||||
await page.getByRole('link', { name: 'Черновики' }).click();
|
await page.getByRole('link', { 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.locator('li').filter({ hasText: 'видео' }).locator('img').click()
|
||||||
Fill the form
|
// Fill the form
|
||||||
Save
|
// Save
|
||||||
Check is it created
|
// Check is it created
|
||||||
}); */
|
})
|
||||||
|
|
||||||
/* test('Post topic', async ({ page }) => {
|
test('Post topic', async ({ page }) => {
|
||||||
Open Draft
|
await page.getByRole('button', { name: 'Т.Р.' }).click()
|
||||||
Post
|
await page.getByRole('link', { name: 'Черновики' }).click()
|
||||||
});*/
|
await page.getByRole('link', { name: 'Создать публикацию' }).click()
|
||||||
|
// Post
|
||||||
|
})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user