mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 21:13:36 +00:00
puppeteer: Take screenshot on failure.
To take a screenshot on failure where we have our common error
handling code in common.run_test method we need to have access to
the Page instance. Currently, we create a new Page in the test method
we pass into run_test, so we pass in a new Page instance to that method
so the test and the run_test method have access to the same Page. And,
then we take a screenshot on failure. It will be saved as `failure-${num}`
in var/puppeteer directory.
This commit is contained in:
committed by
Tim Abbott
parent
74e9019922
commit
0b698d1173
@@ -6,8 +6,8 @@ const subdomain = 'testsubdomain';
|
||||
const organization_name = 'Awesome Organization';
|
||||
const host = "zulipdev.com:9981";
|
||||
|
||||
async function realm_creation_tests() {
|
||||
const page = await common.get_page('http://' + host + '/new/');
|
||||
async function realm_creation_tests(page) {
|
||||
await page.goto('http://' + host + '/new/');
|
||||
|
||||
// submit the email for realm creation.
|
||||
await page.waitForSelector('#email');
|
||||
|
||||
Reference in New Issue
Block a user