Skip to content

Commit

Permalink
Merge pull request #18457 from gabriellpr/test-whiteboard-improvements
Browse files Browse the repository at this point in the history
test: Check for right click on whiteboard
  • Loading branch information
antobinary committed Aug 11, 2023
2 parents 1b736ee + 09461ca commit 68bca73
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions bigbluebutton-tests/playwright/core/elements.js
Expand Up @@ -472,6 +472,7 @@ exports.wbColorRed = 'button[id="TD-Styles-Color-Swatch-red"]';
exports.wbFillDrawing = 'button[id="TD-Styles-Fill"]';
exports.wbDashDotted = 'div[id="TD-Styles-Dash-dotted"]';
exports.wbSizeLarge = 'div[id="TD-Styles-Dash-large"]';
exports.wbPaste = 'button[id="TD-ContextMenu-Paste"]';

// About modal
exports.showAboutModalButton = 'li[data-test="aboutModal"]';
Expand Down
5 changes: 5 additions & 0 deletions bigbluebutton-tests/playwright/whiteboard/draw.js
Expand Up @@ -16,6 +16,11 @@ class Draw extends Page {
const shapes1 = await this.getOuterHtmlDrawn();

const wbBox = await this.getElementBoundingBox(e.whiteboard);

await this.page.mouse.click(wbBox.x + 0.4 * wbBox.width, wbBox.y + 0.4 * wbBox.height, { button: 'right' });
const pasteLocator = this.page.locator(e.wbPaste);
await expect(pasteLocator).toBeVisible();

await this.page.mouse.move(wbBox.x + 0.3 * wbBox.width, wbBox.y + 0.3 * wbBox.height);
await this.page.mouse.down();
await this.page.mouse.move(wbBox.x + 0.7 * wbBox.width, wbBox.y + 0.7 * wbBox.height);
Expand Down
Expand Up @@ -27,7 +27,7 @@ test.describe.parallel('Whiteboard @ci', () => {
const draw = new Draw(browser, page);
await draw.init(true, true);
await draw.test();
})
});

test('Give Additional Whiteboard Access', async ({ browser, context, page }) => {
const multiusers = new MultiUsers(browser, context);
Expand Down

0 comments on commit 68bca73

Please sign in to comment.