move two simple API routines from core/helpers.js to api/api.js
This commit is contained in:
parent
6f7c82641f
commit
f2b53df4fc
@ -4,9 +4,17 @@ const { expect } = require("@playwright/test");
|
||||
|
||||
const Page = require('../core/page');
|
||||
const parameters = require('../core/parameters');
|
||||
const { createMeeting, getMeetings, getMeetingInfo } = require('../core/helpers');
|
||||
const { apiCall, createMeeting } = require('../core/helpers');
|
||||
const e = require('../core/elements');
|
||||
|
||||
function getMeetings() {
|
||||
return apiCall('getMeetings', {});
|
||||
}
|
||||
|
||||
function getMeetingInfo(meetingID) {
|
||||
return apiCall('getMeetingInfo', {meetingID: meetingID});
|
||||
}
|
||||
|
||||
class API {
|
||||
|
||||
constructor(browser, context, page) {
|
||||
|
@ -28,14 +28,6 @@ function apiCall(name, callParams) {
|
||||
return axios.get(url, { adapter: http }).then(response => xml2js.parseStringPromise(response.data));
|
||||
}
|
||||
|
||||
function getMeetings() {
|
||||
return apiCall('getMeetings', {});
|
||||
}
|
||||
|
||||
function getMeetingInfo(meetingID) {
|
||||
return apiCall('getMeetingInfo', {meetingID: meetingID});
|
||||
}
|
||||
|
||||
function createMeetingUrl(params, customParameter) {
|
||||
const meetingID = `random-${getRandomInt(1000000, 10000000).toString()}`;
|
||||
const mp = params.moderatorPW;
|
||||
@ -79,8 +71,6 @@ function sleep(time) {
|
||||
exports.getRandomInt = getRandomInt;
|
||||
exports.apiCallUrl = apiCallUrl;
|
||||
exports.apiCall = apiCall;
|
||||
exports.getMeetings = getMeetings;
|
||||
exports.getMeetingInfo = getMeetingInfo;
|
||||
exports.createMeetingUrl = createMeetingUrl;
|
||||
exports.createMeetingPromise = createMeetingPromise;
|
||||
exports.createMeeting = createMeeting;
|
||||
|
Loading…
Reference in New Issue
Block a user