UNPKG

systelab-components-wdio-test

Version:
25 lines (24 loc) 977 B
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); } static setFeature(feature) { ReportUtility.setFeature(feature); } 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); } }