Debian Codegraph @

testing/performance/perftest_jsconf_warm.js

raw
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5 async function test(context, commands) {
6 let rootUrl = "https://2019.jsconf.eu/";
7
8 await commands.navigate(rootUrl);
9
10 // Wait for browser to settle
11 await commands.wait.byTime(10000);
12
13 // Click on the link and wait a few seconds
14 await commands.click.byLinkTextAndWait("Artists");
15 await commands.wait.byTime(3000);
16
17 // Back to about
18 await commands.click.byLinkTextAndWait("About");
19 await commands.wait.byTime(3000);
20
21 // Start the measurement
22 await commands.measure.start("pageload");
23 await commands.click.byLinkTextAndWait("Artists");
24
25 // Stop and collect the measurement
26 await commands.measure.stop();
27 }
28
29 module.exports = {
30 test,
31 owner: "Performance Team",
32 name: "JSConf (warm)",
33 description: "Measures time to load JSConf page (warm)",
34 };