UNPKG

e2ed

Version:

E2E testing framework over Playwright

21 lines (20 loc) 1.13 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TestRunButton = void 0; const client_1 = require("../client"); const locator_1 = require("./locator"); const testId = 'TestRunButton'; /** * Renders single test run button (in test runs list). * @internal */ const TestRunButton = ({ endTimeInMs, index, mainParams, name, runHash, startTimeInMs, status, }) => { const durationInMs = endTimeInMs - startTimeInMs; return (jsx.createElement("button", { class: "test-link", "data-runhash": runHash, "data-status": status, ...(0, locator_1.locator)(testId, { mainParams, status }) }, jsx.createElement("span", { class: "test-link__name", ...(0, locator_1.locator)(testId, 'name') }, jsx.createElement("span", { class: "test-link__main-params", ...(0, locator_1.locator)(testId, 'parameters') }, mainParams), name), jsx.createElement("span", { class: "test-link__duration", ...(0, locator_1.locator)(testId, 'duration') }, jsx.createElement(client_1.Duration, { durationInMs: durationInMs })))); }; exports.TestRunButton = TestRunButton;