systelab-components-wdio-test
Version:
Widgets to be use in the E2E Tests based in WDIO
23 lines (22 loc) • 942 B
JavaScript
import { ReportUtility } from "./report.util.js";
import { Browser } from "../wdio/browser.js";
export class TestIdentification {
static setTmsLink(tmsLink) {
ReportUtility.addLabel("tms", tmsLink);
ReportUtility.addLink("https://www.jamasoftware.com/", tmsLink, "tms");
}
static setDescription(description) {
ReportUtility.setDescription(description);
ReportUtility.setFeature(description);
}
static setAppVersion(appVersion) {
this.appVersion = appVersion;
}
static async captureEnvironment() {
ReportUtility.addLabel("OS", await Browser.getOperatingSystem());
ReportUtility.addLabel("testExecutionDateTime", new Date().toLocaleString());
ReportUtility.addLabel("browser", await Browser.getName());
ReportUtility.addLabel("browserVersion", await Browser.getVersion());
ReportUtility.addLabel("appVersion", this.appVersion);
}
}