Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: restore presentation on pin notes to whiteboard #18266

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
29 changes: 17 additions & 12 deletions bigbluebutton-tests/playwright/sharednotes/sharednotes.js
Expand Up @@ -131,7 +131,7 @@ class SharedNotes extends MultiUsers {
await this.modPage.waitAndClick(e.sendNotesToWhiteboard);

await this.modPage.hasText(e.currentSlideText, /test/, 30000);
await this.userPage1.hasText(e.currentSlideText, /test/, 20000);
await this.userPage.hasText(e.currentSlideText, /test/, 20000);

await notesLocator.press('Control+Z');

Expand All @@ -147,17 +147,17 @@ class SharedNotes extends MultiUsers {
const notesLocator = getNotesLocator(this.modPage);
await notesLocator.type(e.message);

await startSharedNotes(this.userPage1);
const notesLocatorUser = getNotesLocator(this.userPage1);
await startSharedNotes(this.userPage);
const notesLocatorUser = getNotesLocator(this.userPage);
await notesLocatorUser.press('Delete');
await notesLocatorUser.type('J');

await expect(notesLocator).toContainText(/Jello/, { timeout: ELEMENT_WAIT_TIME });
await expect(notesLocatorUser).toContainText(/Jello/, { timeout: ELEMENT_WAIT_TIME });
await this.modPage.waitAndClick(e.hideNotesLabel);
await this.modPage.wasRemoved(e.hideNotesLabel);
await this.userPage1.waitAndClick(e.hideNotesLabel);
await this.userPage1.wasRemoved(e.hideNotesLabel);
await this.userPage.waitAndClick(e.hideNotesLabel);
await this.userPage.wasRemoved(e.hideNotesLabel);
}

async seeNotesWithoutEditPermission() {
Expand All @@ -168,16 +168,16 @@ class SharedNotes extends MultiUsers {
const notesLocator = getNotesLocator(this.modPage);
await notesLocator.type('Hello');

await startSharedNotes(this.userPage1);
await startSharedNotes(this.userPage);

await this.modPage.waitAndClick(e.manageUsers);
await this.modPage.waitAndClick(e.lockViewersButton);
await this.modPage.waitAndClickElement(e.lockEditSharedNotes);
await this.modPage.waitAndClick(e.applyLockSettings);

const notesLocatorUser = getSharedNotesUserWithoutPermission(this.userPage1);
const notesLocatorUser = getSharedNotesUserWithoutPermission(this.userPage);
await expect(notesLocatorUser).toContainText(/Hello/, { timeout: 20000 });
await this.userPage1.wasRemoved(e.etherpadFrame);
await this.userPage.wasRemoved(e.etherpadFrame);

await this.modPage.waitAndClick(e.manageUsers);
await this.modPage.waitAndClick(e.lockViewersButton);
Expand All @@ -187,23 +187,28 @@ class SharedNotes extends MultiUsers {
await this.modPage.waitAndClick(e.hideNotesLabel);
await this.modPage.wasRemoved(e.hideNotesLabel);

await this.userPage1.waitAndClick(e.hideNotesLabel);
await this.userPage1.wasRemoved(e.hideNotesLabel);
await this.userPage.waitAndClick(e.hideNotesLabel);
await this.userPage.wasRemoved(e.hideNotesLabel);
}

async pinNotesOntoWhiteboard() {
const { sharedNotesEnabled } = getSettings();
test.fail(!sharedNotesEnabled, 'Shared notes is disabled');

await this.userPage.waitAndClick(e.minimizePresentation);
await this.userPage.hasElement(e.restorePresentation);

await startSharedNotes(this.modPage);
await this.modPage.waitAndClick(e.notesOptions);
await this.modPage.waitAndClick(e.pinNotes);
await this.modPage.hasElement(e.unpinNotes);

await this.userPage.hasElement(e.minimizePresentation);

const notesLocator = getNotesLocator(this.modPage);
await notesLocator.type('Hello');
const notesLocatorUser = getNotesLocator(this.userPage1);
const notesLocatorUser = getNotesLocator(this.userPage);

await expect(notesLocator).toContainText(/Hello/, { timeout: 20000 });
await expect(notesLocatorUser).toContainText(/Hello/);
}
Expand Down
Expand Up @@ -8,7 +8,7 @@ test.describe.parallel('Shared Notes', () => {
const context = await browser.newContext();
const page = await context.newPage();
await sharedNotes.initModPage(page, true);
await sharedNotes.initUserPage1(true);
await sharedNotes.initUserPage(true, context);
});
test('Open shared notes @ci', async () => {
await sharedNotes.openSharedNotes();
Expand Down