Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/ilovecveti.ru/bitrix/js/ui/text-editor/test/e2e/tests/ |
Upload File : |
const { test } = require('@playwright/test'); const { focusEditor, initializeTest, assertHTML, toggleCodeBlock } = require('./utils'); const { paragraph, text, code, codeToken, br } = require('./html'); test.describe('Code', () => { test.beforeEach(async ({ page }) => initializeTest({ page })); test('Can select multiple paragraphs and convert to code block', async ({ page }) => { await focusEditor(page); await page.keyboard.type('function()'); await page.keyboard.press('Enter'); await page.keyboard.type('{'); await page.keyboard.press('Enter'); await page.keyboard.type('}'); await assertHTML( page, paragraph(text('function()') + br() + text('{') + br() + text('}')), ); await toggleCodeBlock(page); await assertHTML( page, code( codeToken('function') + codeToken('(', 'parentheses') + codeToken(')', 'parentheses') + br() + codeToken('{', 'brace') + br() + codeToken('}', 'brace'), ) + paragraph(), ); }); });