2022-03-29 21:53:07 +08:00
|
|
|
const { default: test } = require('@playwright/test');
|
2022-11-08 00:18:52 +08:00
|
|
|
const { MultiUsers } = require('../user/multiusers');
|
2022-03-29 21:53:07 +08:00
|
|
|
const { getSettings } = require('../core/settings');
|
2022-07-21 03:44:09 +08:00
|
|
|
const e = require('../core/elements');
|
2023-02-16 14:52:27 +08:00
|
|
|
const { startSharedNotes, getNotesLocator, getShowMoreButtonLocator, getExportButtonLocator, getExportPlainTextLocator, getSharedNotesUserWithoutPermission, getExportHTMLLocator, getExportEtherpadLocator } = require('./util');
|
2022-07-21 03:44:09 +08:00
|
|
|
const { expect } = require('@playwright/test');
|
2023-02-14 21:59:46 +08:00
|
|
|
const { ELEMENT_WAIT_TIME } = require('../core/constants');
|
2022-07-21 03:44:09 +08:00
|
|
|
const { sleep } = require('../core/helpers');
|
2023-02-10 02:10:50 +08:00
|
|
|
const { readFileSync } = require('fs');
|
|
|
|
const { checkTextContent } = require('../core/util');
|
|
|
|
const { domainToASCII } = require('url');
|
2021-11-30 02:39:52 +08:00
|
|
|
|
2022-11-08 00:18:52 +08:00
|
|
|
class SharedNotes extends MultiUsers {
|
|
|
|
constructor(browser, context) {
|
|
|
|
super(browser, context);
|
2021-11-30 02:39:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
async openSharedNotes() {
|
2022-03-29 21:53:07 +08:00
|
|
|
const { sharedNotesEnabled } = getSettings();
|
2023-11-08 19:50:16 +08:00
|
|
|
if(!sharedNotesEnabled) {
|
2024-07-31 06:49:02 +08:00
|
|
|
await this.modPage.hasElement(e.chatButton, 'should display the public chat button');
|
|
|
|
return this.modPage.wasRemoved(e.sharedNotes, 'should not display the shared notes button');
|
2023-11-08 19:50:16 +08:00
|
|
|
}
|
2022-11-08 00:18:52 +08:00
|
|
|
await startSharedNotes(this.modPage);
|
2023-02-14 21:59:46 +08:00
|
|
|
const sharedNotesContent = await getNotesLocator(this.modPage);
|
2024-07-31 06:49:02 +08:00
|
|
|
await expect(sharedNotesContent, 'should the shared notes be editable').toBeEditable({ timeout: ELEMENT_WAIT_TIME });
|
2023-05-10 00:37:38 +08:00
|
|
|
|
|
|
|
await this.modPage.waitAndClick(e.hideNotesLabel);
|
2024-07-31 06:49:02 +08:00
|
|
|
await this.modPage.wasRemoved(e.hideNotesLabel, 'should not display the hide notes label');
|
2021-11-30 02:39:52 +08:00
|
|
|
}
|
2022-07-21 03:44:09 +08:00
|
|
|
|
|
|
|
async typeInSharedNotes() {
|
|
|
|
const { sharedNotesEnabled } = getSettings();
|
2023-11-08 19:50:16 +08:00
|
|
|
if(!sharedNotesEnabled) {
|
2024-07-31 06:49:02 +08:00
|
|
|
await this.modPage.hasElement(e.chatButton, 'should display the public chat button');
|
|
|
|
return this.modPage.wasRemoved(e.sharedNotes, 'should not display the shared notes button');
|
2023-11-08 19:50:16 +08:00
|
|
|
}
|
2022-11-08 00:18:52 +08:00
|
|
|
await startSharedNotes(this.modPage);
|
|
|
|
const notesLocator = getNotesLocator(this.modPage);
|
2022-07-21 03:44:09 +08:00
|
|
|
await notesLocator.type(e.message);
|
2023-02-14 21:59:46 +08:00
|
|
|
await this.editMessage(notesLocator);
|
2022-07-21 03:44:09 +08:00
|
|
|
const editedMessage = '!Hello';
|
2024-07-31 06:49:02 +08:00
|
|
|
await expect(notesLocator, 'should contain the edited text on shared notes').toContainText(editedMessage, { timeout: ELEMENT_WAIT_TIME });
|
2023-04-04 04:14:58 +08:00
|
|
|
|
2024-06-07 03:15:36 +08:00
|
|
|
//! avoiding the following screenshot comparison due to https://github.com/microsoft/playwright/issues/18827
|
|
|
|
// const wbBox = await this.modPage.getLocator(e.etherpadFrame);
|
|
|
|
// await expect(wbBox).toHaveScreenshot('sharednotes-type.png', {
|
|
|
|
// maxDiffPixels: 100,
|
2024-05-16 02:13:08 +08:00
|
|
|
// });
|
2023-05-10 00:37:38 +08:00
|
|
|
|
2023-05-13 02:02:27 +08:00
|
|
|
await notesLocator.press('Control+Z');
|
|
|
|
await notesLocator.press('Control+Z');
|
|
|
|
await notesLocator.press('Control+Z');
|
|
|
|
|
2023-05-10 00:37:38 +08:00
|
|
|
await this.modPage.waitAndClick(e.hideNotesLabel);
|
2024-07-31 06:49:02 +08:00
|
|
|
await this.modPage.wasRemoved(e.hideNotesLabel, 'should not display the hide notes label');
|
2022-07-21 03:44:09 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
async formatTextInSharedNotes() {
|
|
|
|
const { sharedNotesEnabled } = getSettings();
|
2023-11-08 19:50:16 +08:00
|
|
|
if(!sharedNotesEnabled) {
|
2024-07-31 06:49:02 +08:00
|
|
|
await this.modPage.hasElement(e.chatButton, 'should display the public chat button');
|
|
|
|
return this.modPage.wasRemoved(e.sharedNotes, 'should not display the shared notes button');
|
2023-11-08 19:50:16 +08:00
|
|
|
}
|
2022-11-08 00:18:52 +08:00
|
|
|
await startSharedNotes(this.modPage);
|
|
|
|
const notesLocator = getNotesLocator(this.modPage);
|
2022-07-21 03:44:09 +08:00
|
|
|
await notesLocator.type(e.message);
|
2023-02-10 02:10:50 +08:00
|
|
|
|
|
|
|
await notesLocator.press('Control+Z');
|
2024-07-31 06:49:02 +08:00
|
|
|
await expect(notesLocator, 'should not contain any text on the shared notes').toContainText('');
|
2023-02-10 02:10:50 +08:00
|
|
|
await notesLocator.press('Control+Y');
|
2024-07-31 06:49:02 +08:00
|
|
|
await expect(notesLocator, 'should contain a message on the shared notes').toContainText(e.message);
|
2023-02-10 02:10:50 +08:00
|
|
|
|
2022-11-17 02:18:03 +08:00
|
|
|
await this.formatMessage(notesLocator);
|
2022-07-21 03:44:09 +08:00
|
|
|
const html = await notesLocator.innerHTML();
|
|
|
|
|
|
|
|
const uText = '<u>!</u>';
|
2024-07-31 06:49:02 +08:00
|
|
|
await expect(html.includes(uText), 'should include the text "!"').toBeTruthy();
|
2022-07-21 03:44:09 +08:00
|
|
|
|
|
|
|
const bText = '<b>World</b>';
|
2024-07-31 06:49:02 +08:00
|
|
|
await expect(html.includes(bText), 'should include the text "World"').toBeTruthy();
|
2022-07-21 03:44:09 +08:00
|
|
|
|
|
|
|
const iText = '<i>Hello</i>'
|
2024-07-31 06:49:02 +08:00
|
|
|
await expect(html.includes(iText), 'should include the text "Hello"').toBeTruthy();
|
2023-05-13 02:02:27 +08:00
|
|
|
|
|
|
|
await notesLocator.press('Control+Z'); await notesLocator.press('Control+Z'); await notesLocator.press('Control+Z');
|
|
|
|
|
|
|
|
await this.modPage.waitAndClick(e.hideNotesLabel);
|
2024-07-31 06:49:02 +08:00
|
|
|
await this.modPage.wasRemoved(e.hideNotesLabel, 'should not display the hide notes label');
|
2022-07-21 03:44:09 +08:00
|
|
|
}
|
|
|
|
|
2023-02-16 02:41:21 +08:00
|
|
|
async exportSharedNotes(testInfo) {
|
2022-07-21 03:44:09 +08:00
|
|
|
const { sharedNotesEnabled } = getSettings();
|
2023-11-08 19:50:16 +08:00
|
|
|
if(!sharedNotesEnabled) {
|
2024-07-31 06:49:02 +08:00
|
|
|
await this.modPage.hasElement(e.chatButton, 'should display the public chat button');
|
|
|
|
return this.modPage.wasRemoved(e.sharedNotes, 'should not display the shared notes button');
|
2023-11-08 19:50:16 +08:00
|
|
|
}
|
2022-11-08 00:18:52 +08:00
|
|
|
await startSharedNotes(this.modPage);
|
|
|
|
const notesLocator = getNotesLocator(this.modPage);
|
2022-07-21 03:44:09 +08:00
|
|
|
await notesLocator.type(e.message);
|
|
|
|
|
2022-11-08 00:18:52 +08:00
|
|
|
const showMoreButtonLocator = getShowMoreButtonLocator(this.modPage);
|
2023-04-06 22:43:50 +08:00
|
|
|
await showMoreButtonLocator.click({ timeout: ELEMENT_WAIT_TIME });
|
2022-07-21 03:44:09 +08:00
|
|
|
|
2022-11-08 00:18:52 +08:00
|
|
|
const exportButtonLocator = getExportButtonLocator(this.modPage);
|
2023-05-13 02:02:27 +08:00
|
|
|
await exportButtonLocator.click({ timeout: 10000 });
|
2022-07-21 03:44:09 +08:00
|
|
|
|
2022-11-08 00:18:52 +08:00
|
|
|
const exportPlainTextLocator = getExportPlainTextLocator(this.modPage);
|
2023-02-10 02:10:50 +08:00
|
|
|
const exportHtmlLocator = getExportHTMLLocator(this.modPage);
|
|
|
|
const exportEtherpadLocator = getExportEtherpadLocator(this.modPage);
|
|
|
|
|
2023-02-13 22:39:04 +08:00
|
|
|
//.txt checks
|
2023-02-16 02:41:21 +08:00
|
|
|
const txt = await this.modPage.handleDownload(exportPlainTextLocator, testInfo);
|
|
|
|
const txtFileExtension = (txt.download._suggestedFilename).split('.').pop();
|
2024-07-31 06:49:02 +08:00
|
|
|
await checkTextContent(txtFileExtension, 'txt', 'should match the .txt file extension');
|
|
|
|
await checkTextContent(txt.content, e.message, 'should the txt content file have the message "Hello World!"');
|
2023-02-10 02:10:50 +08:00
|
|
|
|
2023-02-13 22:39:04 +08:00
|
|
|
//.html checks
|
2023-02-16 02:41:21 +08:00
|
|
|
const html = await this.modPage.handleDownload(exportHtmlLocator, testInfo);
|
|
|
|
const htmlFileExtension = (html.download._suggestedFilename).split('.').pop();
|
2024-07-31 06:49:02 +08:00
|
|
|
await checkTextContent(htmlFileExtension, 'html', 'should match the html file extension');
|
|
|
|
await checkTextContent(html.content, e.message, 'should the html content file have the message "Hello World!"');
|
2023-02-10 02:10:50 +08:00
|
|
|
|
2023-02-13 22:39:04 +08:00
|
|
|
//.etherpad checks
|
2023-02-16 02:41:21 +08:00
|
|
|
const etherpad = await this.modPage.handleDownload(exportEtherpadLocator, testInfo);
|
|
|
|
const etherpadFileExtension = (etherpad.download._suggestedFilename).split('.').pop();
|
2024-07-31 06:49:02 +08:00
|
|
|
await checkTextContent(etherpadFileExtension, 'etherpad', 'should match the etherpad file extension');
|
|
|
|
await checkTextContent(etherpad.content, e.message, 'should the etherpad content file have the message "Hello World!"');
|
2023-05-13 02:02:27 +08:00
|
|
|
|
|
|
|
await this.modPage.waitAndClick(e.hideNotesLabel);
|
2024-07-31 06:49:02 +08:00
|
|
|
await this.modPage.wasRemoved(e.hideNotesLabel, 'should not display the hide notes label');
|
2022-07-21 03:44:09 +08:00
|
|
|
}
|
2022-11-08 00:18:52 +08:00
|
|
|
|
2022-11-17 02:18:03 +08:00
|
|
|
async convertNotesToWhiteboard() {
|
2022-11-08 00:18:52 +08:00
|
|
|
const { sharedNotesEnabled } = getSettings();
|
2023-11-08 19:50:16 +08:00
|
|
|
if(!sharedNotesEnabled) {
|
2024-07-31 06:49:02 +08:00
|
|
|
await this.modPage.hasElement(e.chatButton, 'should display the public chat button');
|
|
|
|
return this.modPage.wasRemoved(e.sharedNotes, 'should not display the shared notes button');
|
2023-11-08 19:50:16 +08:00
|
|
|
}
|
2022-11-08 00:18:52 +08:00
|
|
|
await startSharedNotes(this.modPage);
|
|
|
|
const notesLocator = getNotesLocator(this.modPage);
|
|
|
|
await notesLocator.type('test');
|
|
|
|
await sleep(1000);
|
|
|
|
|
2022-11-12 02:35:14 +08:00
|
|
|
await this.modPage.waitAndClick(e.notesOptions);
|
2022-11-08 00:18:52 +08:00
|
|
|
await this.modPage.waitAndClick(e.sendNotesToWhiteboard);
|
2023-02-14 21:59:46 +08:00
|
|
|
|
2024-07-31 06:49:02 +08:00
|
|
|
await this.modPage.hasText(e.currentSlideText, /test/, 'should the slide contain the text "test" for the moderator', 30000);
|
|
|
|
await this.userPage.hasText(e.currentSlideText, /test/, 'should the slide contain the text "test" for the attendee', 20000);
|
2023-05-13 02:02:27 +08:00
|
|
|
|
|
|
|
await notesLocator.press('Control+Z');
|
|
|
|
|
|
|
|
await this.modPage.waitAndClick(e.hideNotesLabel);
|
2024-07-31 06:49:02 +08:00
|
|
|
await this.modPage.wasRemoved(e.hideNotesLabel, 'should not display the hide notes label button');
|
2023-05-13 02:02:27 +08:00
|
|
|
|
2022-11-08 00:18:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
async editSharedNotesWithMoreThanOneUSer() {
|
|
|
|
const { sharedNotesEnabled } = getSettings();
|
2023-11-08 19:50:16 +08:00
|
|
|
if(!sharedNotesEnabled) {
|
2024-07-31 06:49:02 +08:00
|
|
|
await this.modPage.hasElement(e.chatButton, 'should display the public chat button');
|
|
|
|
return this.modPage.wasRemoved(e.sharedNotes, 'should not display the shared notes button');
|
2023-11-08 19:50:16 +08:00
|
|
|
}
|
2022-11-08 00:18:52 +08:00
|
|
|
await startSharedNotes(this.modPage);
|
|
|
|
const notesLocator = getNotesLocator(this.modPage);
|
|
|
|
await notesLocator.type(e.message);
|
|
|
|
|
2023-07-04 00:48:52 +08:00
|
|
|
await startSharedNotes(this.userPage);
|
|
|
|
const notesLocatorUser = getNotesLocator(this.userPage);
|
2022-11-08 00:18:52 +08:00
|
|
|
await notesLocatorUser.press('Delete');
|
|
|
|
await notesLocatorUser.type('J');
|
|
|
|
|
2024-07-31 06:49:02 +08:00
|
|
|
await expect(notesLocator, 'should the shared notes contain the text "Jello" for the moderator').toContainText(/Jello/, { timeout: ELEMENT_WAIT_TIME });
|
|
|
|
await expect(notesLocatorUser, 'should the shared notes contain the text "Jello" for the attendee').toContainText(/Jello/, { timeout: ELEMENT_WAIT_TIME });
|
2023-05-13 02:02:27 +08:00
|
|
|
await this.modPage.waitAndClick(e.hideNotesLabel);
|
2024-07-31 06:49:02 +08:00
|
|
|
await this.modPage.wasRemoved(e.hideNotesLabel, 'should not display the hide notes button for the moderator');
|
2023-07-04 00:48:52 +08:00
|
|
|
await this.userPage.waitAndClick(e.hideNotesLabel);
|
2024-07-31 06:49:02 +08:00
|
|
|
await this.userPage.wasRemoved(e.hideNotesLabel, 'should not display the hide notes button for the attendee');
|
2022-11-08 00:18:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
async seeNotesWithoutEditPermission() {
|
|
|
|
const { sharedNotesEnabled } = getSettings();
|
2023-11-08 19:50:16 +08:00
|
|
|
if(!sharedNotesEnabled) {
|
2024-07-31 06:49:02 +08:00
|
|
|
await this.modPage.hasElement(e.chatButton, 'should display the public chat button');
|
|
|
|
return this.modPage.wasRemoved(e.sharedNotes, 'should not display the shared notes button');
|
2023-11-08 19:50:16 +08:00
|
|
|
}
|
2022-11-08 00:18:52 +08:00
|
|
|
|
|
|
|
await startSharedNotes(this.modPage);
|
|
|
|
const notesLocator = getNotesLocator(this.modPage);
|
2022-11-17 02:18:03 +08:00
|
|
|
await notesLocator.type('Hello');
|
2022-11-08 00:18:52 +08:00
|
|
|
|
2023-07-04 00:48:52 +08:00
|
|
|
await startSharedNotes(this.userPage);
|
2022-11-08 00:18:52 +08:00
|
|
|
|
|
|
|
await this.modPage.waitAndClick(e.manageUsers);
|
|
|
|
await this.modPage.waitAndClick(e.lockViewersButton);
|
|
|
|
await this.modPage.waitAndClickElement(e.lockEditSharedNotes);
|
|
|
|
await this.modPage.waitAndClick(e.applyLockSettings);
|
|
|
|
|
2023-07-04 00:48:52 +08:00
|
|
|
const notesLocatorUser = getSharedNotesUserWithoutPermission(this.userPage);
|
2024-07-31 06:49:02 +08:00
|
|
|
await expect(notesLocatorUser, 'should the shared notes contain the text "Hello" for the attendee').toContainText(/Hello/, { timeout: 20000 });
|
2023-07-04 00:48:52 +08:00
|
|
|
await this.userPage.wasRemoved(e.etherpadFrame);
|
2023-05-13 02:02:27 +08:00
|
|
|
|
|
|
|
await this.modPage.waitAndClick(e.manageUsers);
|
|
|
|
await this.modPage.waitAndClick(e.lockViewersButton);
|
|
|
|
await this.modPage.waitAndClickElement(e.lockEditSharedNotes);
|
|
|
|
await this.modPage.waitAndClick(e.applyLockSettings);
|
|
|
|
|
|
|
|
await this.modPage.waitAndClick(e.hideNotesLabel);
|
2024-07-31 06:49:02 +08:00
|
|
|
await this.modPage.wasRemoved(e.hideNotesLabel, 'should not display the hide notes button for the moderator');
|
2023-05-13 02:02:27 +08:00
|
|
|
|
2023-07-04 00:48:52 +08:00
|
|
|
await this.userPage.waitAndClick(e.hideNotesLabel);
|
2024-07-31 06:49:02 +08:00
|
|
|
await this.userPage.wasRemoved(e.hideNotesLabel, 'should not display the hide notes button for the attendee');
|
2022-11-17 02:18:03 +08:00
|
|
|
}
|
|
|
|
|
2023-07-22 04:39:33 +08:00
|
|
|
async pinAndUnpinNotesOntoWhiteboard() {
|
2022-11-17 02:18:03 +08:00
|
|
|
const { sharedNotesEnabled } = getSettings();
|
2023-11-08 19:50:16 +08:00
|
|
|
if(!sharedNotesEnabled) {
|
2024-07-31 06:49:02 +08:00
|
|
|
await this.modPage.hasElement(e.chatButton, 'should display the public chat button');
|
|
|
|
return this.modPage.wasRemoved(e.sharedNotes, 'should not display the shared notes button');
|
2023-11-08 19:50:16 +08:00
|
|
|
}
|
2022-11-17 02:18:03 +08:00
|
|
|
|
2023-07-04 00:48:52 +08:00
|
|
|
await this.userPage.waitAndClick(e.minimizePresentation);
|
2024-07-31 06:49:02 +08:00
|
|
|
await this.userPage.hasElement(e.restorePresentation, 'should display the restore presentation button for the attendee');
|
2022-11-17 02:18:03 +08:00
|
|
|
await startSharedNotes(this.modPage);
|
2024-06-07 03:15:13 +08:00
|
|
|
const notesLocator = getNotesLocator(this.modPage);
|
|
|
|
await notesLocator.type('Hello');
|
2022-11-17 02:18:03 +08:00
|
|
|
await this.modPage.waitAndClick(e.notesOptions);
|
|
|
|
await this.modPage.waitAndClick(e.pinNotes);
|
2024-07-31 06:49:02 +08:00
|
|
|
await this.modPage.hasElement(e.unpinNotes, 'should display the unpin notes button');
|
2022-11-22 21:44:28 +08:00
|
|
|
|
2024-07-31 06:49:02 +08:00
|
|
|
await this.userPage.hasElement(e.minimizePresentation, 'should display the minimize presentation button for the attendee');
|
2023-07-04 00:48:52 +08:00
|
|
|
const notesLocatorUser = getNotesLocator(this.userPage);
|
2024-07-31 06:49:02 +08:00
|
|
|
await expect(notesLocator, 'should display the text "Hello" on the shared notes for the moderator').toContainText(/Hello/, { timeout: 20000 });
|
|
|
|
await expect(notesLocatorUser, 'should display the text "Hello" on the shared notes for the attendee').toContainText(/Hello/);
|
2023-07-22 04:39:33 +08:00
|
|
|
|
|
|
|
// unpin notes
|
|
|
|
await this.modPage.waitAndClick(e.unpinNotes);
|
2024-07-31 06:49:02 +08:00
|
|
|
await this.modPage.hasElement(e.whiteboard, 'should display the whiteboard for the moderator');
|
|
|
|
await this.userPage.hasElement(e.whiteboard, 'should display the whiteboard for the attendee');
|
2023-07-22 04:39:33 +08:00
|
|
|
await startSharedNotes(this.modPage);
|
|
|
|
await this.modPage.waitAndClick(e.notesOptions);
|
|
|
|
await this.modPage.waitAndClick(e.pinNotes);
|
2024-07-31 06:49:02 +08:00
|
|
|
await this.modPage.hasElement(e.unpinNotes, 'should display the unpin notes button for the moderator');
|
2023-07-22 04:39:33 +08:00
|
|
|
// make viewer as presenter and unpin pinned notes
|
|
|
|
await this.modPage.waitAndClick(e.userListItem);
|
|
|
|
await this.modPage.waitAndClick(e.makePresenter);
|
|
|
|
await this.userPage.waitAndClick(e.unpinNotes);
|
2024-07-31 06:49:02 +08:00
|
|
|
await this.userPage.hasElement(e.whiteboard, 'should display the whiteboard for the attendee');
|
|
|
|
await this.modPage.hasElement(e.whiteboard, 'should display the whiteboard for the moderator');
|
2022-11-08 00:18:52 +08:00
|
|
|
}
|
2023-05-13 02:02:27 +08:00
|
|
|
|
|
|
|
async editMessage() {
|
|
|
|
await this.modPage.down('Shift');
|
|
|
|
let i = 7;
|
|
|
|
while (i > 0) {
|
|
|
|
await this.modPage.press('ArrowLeft');
|
|
|
|
i--;
|
|
|
|
}
|
|
|
|
await this.modPage.up('Shift');
|
|
|
|
await this.modPage.press('Backspace');
|
|
|
|
i = 5;
|
|
|
|
while (i > 0) {
|
|
|
|
await this.modPage.press('ArrowLeft');
|
|
|
|
i--;
|
|
|
|
}
|
|
|
|
await this.modPage.press('!');
|
|
|
|
}
|
|
|
|
|
|
|
|
async formatMessage() {
|
|
|
|
// U for '!'
|
|
|
|
await this.modPage.down('Shift');
|
|
|
|
await this.modPage.press('ArrowLeft');
|
|
|
|
await this.modPage.up('Shift');
|
|
|
|
await this.modPage.press('Control+U');
|
|
|
|
await this.modPage.press('ArrowLeft');
|
|
|
|
|
|
|
|
// B for 'World'
|
|
|
|
await this.modPage.down('Shift');
|
|
|
|
let i = 5;
|
|
|
|
while (i > 0) {
|
|
|
|
await this.modPage.press('ArrowLeft');
|
|
|
|
i--;
|
|
|
|
}
|
|
|
|
await this.modPage.up('Shift');
|
|
|
|
await this.modPage.press('Control+B');
|
|
|
|
await this.modPage.press('ArrowLeft');
|
|
|
|
|
|
|
|
await this.modPage.press('ArrowLeft');
|
|
|
|
|
|
|
|
// I for 'Hello'
|
|
|
|
await this.modPage.down('Shift');
|
|
|
|
i = 5;
|
|
|
|
while (i > 0) {
|
|
|
|
await this.modPage.press('ArrowLeft');
|
|
|
|
i--;
|
|
|
|
}
|
|
|
|
await this.modPage.up('Shift');
|
|
|
|
await this.modPage.press('Control+I');
|
|
|
|
await this.modPage.press('ArrowLeft');
|
|
|
|
}
|
2021-11-30 02:39:52 +08:00
|
|
|
}
|
|
|
|
|
2023-04-06 05:08:21 +08:00
|
|
|
exports.SharedNotes = SharedNotes;
|