Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

tools: Replace `realm_uri` with `realm_url`.

Vector738d4c42d4604f
diff --git a/tools/screenshots/message-screenshot.js b/tools/screenshots/message-screenshot.js
index 09fa9ed3171..d42859eddff 100644
--- a/tools/screenshots/message-screenshot.js
+++ b/tools/screenshots/message-screenshot.js
@@ -12,11 +12,11 @@ const puppeteer = require("puppeteer");
const options = {};
program
- .arguments("<message_id> <image_path> <realm_uri")
- .action((messageId, imagePath, realmUri) => {
+ .arguments("<message_id> <image_path> <realm_url>")
+ .action((messageId, imagePath, realmUrl) => {
options.messageId = messageId;
options.imagePath = imagePath;
- options.realmUri = realmUri;
+ options.realmUrl = realmUrl;
console.log(`Capturing screenshot for message ${messageId} to ${imagePath}`);
})
.parse(process.argv);
@@ -43,7 +43,7 @@ async function run() {
const page = await browser.newPage();
// deviceScaleFactor:2 gives better quality screenshots (higher pixel density)
await page.setViewport({width: 1280, height: 1024, deviceScaleFactor: 2});
- await page.goto(`${options.realmUri}/devlogin`);
+ await page.goto(`${options.realmUrl}/devlogin`);
// wait for Iago devlogin button and click on it.
await page.waitForSelector('[value="[email protected]"]');
@@ -54,7 +54,7 @@ async function run() {
]);
// Navigate to message and capture screenshot
- await page.goto(`${options.realmUri}/#narrow/id/${options.messageId}`, {
+ await page.goto(`${options.realmUrl}/#narrow/id/${options.messageId}`, {
waitUntil: "networkidle2",
});
// eslint-disable-next-line no-undef
diff --git a/tools/screenshots/thread-screenshot.js b/tools/screenshots/thread-screenshot.js
index 74e12dce6b2..84a56f33296 100644
--- a/tools/screenshots/thread-screenshot.js
+++ b/tools/screenshots/thread-screenshot.js
@@ -12,13 +12,13 @@ const puppeteer = require("puppeteer");
const options = {};
program
- .arguments("<narrow_uri> <narrow> <unread_msg_id> <image_path> <realm_uri")
- .action((narrow_uri, narrow, unread_msg_id, imagePath, realmUri) => {
+ .arguments("<narrow_uri> <narrow> <unread_msg_id> <image_path> <realm_url>")
+ .action((narrow_uri, narrow, unread_msg_id, imagePath, realmUrl) => {
options.narrowUri = narrow_uri;
options.narrow = narrow;
options.messageId = unread_msg_id;
options.imagePath = imagePath;
- options.realmUri = realmUri;
+ options.realmUrl = realmUrl;
console.log(`Capturing screenshot for ${narrow} to ${imagePath}`);
})
.parse(process.argv);
@@ -45,7 +45,7 @@ async function run() {
const page = await browser.newPage();
// deviceScaleFactor:2 gives better quality screenshots (higher pixel density)
await page.setViewport({width: 1280, height: 1024, deviceScaleFactor: 2});
- await page.goto(`${options.realmUri}/devlogin`);
+ await page.goto(`${options.realmUrl}/devlogin`);
// wait for Iago devlogin button and click on it.
await page.waitForSelector('[value="[email protected]"]');