From c4a658b25f96a7785db1f20d871c689a94605a0c Mon Sep 17 00:00:00 2001 From: Mohamed Amine Ben Salah Date: Tue, 18 Feb 2020 15:45:46 -0300 Subject: [PATCH] adds fixes adding timestamp to metrics filename and to the use of effectiveParams object --- bigbluebutton-html5/tests/puppeteer/core/page.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bigbluebutton-html5/tests/puppeteer/core/page.js b/bigbluebutton-html5/tests/puppeteer/core/page.js index cae71a3f22..a7c48bc3c5 100644 --- a/bigbluebutton-html5/tests/puppeteer/core/page.js +++ b/bigbluebutton-html5/tests/puppeteer/core/page.js @@ -21,21 +21,21 @@ class Page { // Join BigBlueButton meeting async init(args, meetingId, newParams) { - const effectiveParams = newParams || params; + this.effectiveParams = newParams || params; this.browser = await puppeteer.launch(args); - this.page = await this.browser.newPage({ context: `bbb-${effectiveParams.fullName}` }); + this.page = await this.browser.newPage({ context: `bbb-${this.effectiveParams.fullName}` }); await this.setDownloadBehavior(`${this.parentDir}/downloads`); this.meetingId = await helper.createMeeting(params, meetingId); - const joinURL = helper.getJoinURL(this.meetingId, effectiveParams, true); + const joinURL = helper.getJoinURL(this.meetingId, this.effectiveParams, true); await this.page.goto(joinURL); await this.waitForSelector(e.audioDialog); await this.click(e.closeAudio, true); const checkForGetMetrics = async () => { if (process.env.BBB_COLLECT_METRICS === 'true') { - await this.getMetrics(effectiveParams.fullName); + await this.getMetrics(); } }; await checkForGetMetrics(); @@ -150,7 +150,7 @@ class Page { metricsObj[`metricObj-${this.effectiveParams.fullName}`] = metric; const createFile = () => { try { - fs.appendFileSync((`${dir}/metrics-${this.effectiveParams.fullName}-${currentTimestamp}.json`), `${JSON.stringify(metricsObj)}\n`); + fs.appendFileSync(`${dir}/metrics-${this.effectiveParams.fullName}-${currentTimestamp}.json`, `${JSON.stringify(metricsObj)}\n`); } catch (error) { console.log(error); }