const SelectAction = require('../src/actions/select-action'); const TypingAction = require('../src/actions/typing-action'); const FormatAction = require('../src/actions/format-action'); const WaitAction = require('../src/actions/wait-action'); const PasteAction = require('../src/actions/paste-action'); const users = [ { login: 'Admin', password: '11111111', actions: [ // Начать с выделения всего текста new SelectAction({ firstParagraph: 0, lastParagraph: 0, start: 0, end: 12 }), new WaitAction({ delay: 400 }), // Снять выделение, выделить только "Привет" new SelectAction({ firstParagraph: 0, lastParagraph: 0, start: 0, end: 6 }), new WaitAction({ delay: 600 }), // Сделать "Привет" красным new FormatAction({ formatType: 'foreground', value: 0xFF0000 }), new WaitAction({ delay: 300 }), // Выделить запятую и пробел и заменить через paste new SelectAction({ firstParagraph: 0, lastParagraph: 0, start: 6, end: 8 }), new WaitAction({ delay: 250 }), // Заменить выделенную область на " - " new PasteAction({ text: ' - ' }), new WaitAction({ delay: 500 }), // Выделить "мир" и заменить на "вселенная" new SelectAction({ firstParagraph: 0, lastParagraph: 0, start: 10, end: 13 }), new WaitAction({ delay: 400 }), // Заменить "мир" на "вселенная" через paste new PasteAction({ text: 'вселенная' }), new WaitAction({ delay: 300 }), // Выделить "вселенная" и сделать зеленой new SelectAction({ firstParagraph: 0, lastParagraph: 0, start: 10, end: 19 }), new FormatAction({ formatType: 'foreground', value: 0x00FF00 }), new WaitAction({ delay: 350 }), // Переместиться в конец и добавить текст через paste new SelectAction({ firstParagraph: 0, lastParagraph: 0, start: 20, end: 20 }), new PasteAction({ text: '! Как дела?' }), new WaitAction({ delay: 700 }), // Выделить добавленный текст и сделать синим new SelectAction({ firstParagraph: 0, lastParagraph: 0, start: 20, end: 31 }), new FormatAction({ formatType: 'foreground', value: 0x0000FF }), new WaitAction({ delay: 400 }), // Выделить "Привет" и заменить на "Салют" new SelectAction({ firstParagraph: 0, lastParagraph: 0, start: 0, end: 6 }), new PasteAction({ text: 'Салют' }) ] }, { login: 'Admin', password: '11111111', actions: [ // Вставить приветствие в начало new SelectAction({ firstParagraph: 0, lastParagraph: 0, start: 0, end: 0 }), new PasteAction({ text: 'Здравствуй, ' }), new WaitAction({ delay: 800 }), // Выделить оригинальное "Привет" new SelectAction({ firstParagraph: 0, lastParagraph: 0, start: 12, end: 18 }), new WaitAction({ delay: 500 }), // Заменить на "дорогой" через paste new PasteAction({ text: 'дорогой' }), new WaitAction({ delay: 600 }), // Выделить "мир" и заменить на "друг" через paste new SelectAction({ firstParagraph: 0, lastParagraph: 0, start: 21, end: 24 }), new PasteAction({ text: 'друг' }), new WaitAction({ delay: 300 }), // Выделить "друг" и сделать его фиолетовым new SelectAction({ firstParagraph: 0, lastParagraph: 0, start: 21, end: 25 }), new FormatAction({ formatType: 'foreground', value: 0x800080 }), new WaitAction({ delay: 400 }), // Переместиться после "мир" и добавить восклицательный знак new SelectAction({ firstParagraph: 0, lastParagraph: 0, start: 24, end: 24 }), new TypingAction({ text: '!!!', keyInterval: 300 }), new WaitAction({ delay: 500 }), // Выделить весь текст и применить оранжевый цвет фона new SelectAction({ firstParagraph: 0, lastParagraph: 0, start: 0, end: 27 }), new WaitAction({ delay: 300 }), // Снять выделение и добавить смайлик в конец new SelectAction({ firstParagraph: 0, lastParagraph: 0, start: 27, end: 27 }), new TypingAction({ text: ' @', keyInterval: 100 }), new WaitAction({ delay: 400 }), // Выделить смайлик и сделать его желтым new SelectAction({ firstParagraph: 0, lastParagraph: 0, start: 28, end: 29 }), new FormatAction({ formatType: 'foreground', value: 0xFFFF00 }) ] } ]; const testDocument = { url: 'http://localhost:9080/debug.html#E4PVFP' }; module.exports = { users, testDocument };