mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 21:13:36 +00:00
e2e-tests: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
819bccfec1
commit
6ed50d1c80
@@ -1,6 +1,7 @@
|
||||
import {strict as assert} from "assert";
|
||||
|
||||
import type {Page} from "puppeteer";
|
||||
import {z} from "zod";
|
||||
|
||||
import * as common from "./lib/common";
|
||||
|
||||
@@ -34,7 +35,10 @@ async function realm_creation_tests(page: Page): Promise<void> {
|
||||
|
||||
// Open the confirmation URL
|
||||
const page_content = await page.evaluate(() => document.querySelector("body")!.textContent);
|
||||
const confirmation_key: string = JSON.parse(page_content!).confirmation_key;
|
||||
assert(page_content !== null);
|
||||
const {confirmation_key} = z
|
||||
.object({confirmation_key: z.string()})
|
||||
.parse(JSON.parse(page_content));
|
||||
const confirmation_url = `http://${host}/accounts/do_confirm/${confirmation_key}`;
|
||||
await page.goto(confirmation_url);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user