mirror of https://github.com/zulip/zulip.git
message-screenshot: Update for removal of navigate global.
Commit 0200f48a12
(#17407) removed the
navigate global variable. Use the K hotkey instead of evaluating
navigate.up().
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
7f89cb9535
commit
62c5782f66
|
@ -1,6 +1,6 @@
|
|||
"use strict";
|
||||
|
||||
/* global $, CSS, navigate */
|
||||
/* global $, CSS */
|
||||
|
||||
const path = require("path");
|
||||
|
||||
|
@ -60,8 +60,8 @@ async function run() {
|
|||
// remove unread marker and don't select message
|
||||
const marker = `#zfilt${CSS.escape(options.messageId)} .unread_marker`;
|
||||
await page.evaluate((sel) => $(sel).remove(), marker);
|
||||
await page.evaluate(() => navigate.up());
|
||||
const messageBox = await page.$(messageSelector);
|
||||
await page.keyboard.press("KeyK");
|
||||
const messageGroup = (await messageBox.$x(".."))[0];
|
||||
// Compute screenshot area, with some padding around the message group
|
||||
const clip = {...(await messageGroup.boundingBox())};
|
||||
|
|
Loading…
Reference in New Issue