@serenity-js/playwright-test
Version:
Serenity/JS test runner adapter for Playwright Test, combining Playwright's developer experience with the advanced reporting and automation capabilities of Serenity/JS
15 lines • 561 B
JavaScript
import { createHash } from 'node:crypto';
import { CorrelationId } from '@serenity-js/core/model';
export class PlaywrightSceneId extends CorrelationId {
static fromJSON(v) {
return new PlaywrightSceneId(v);
}
static from(projectName, test, result) {
const projectId = createHash('sha1')
.update(projectName)
.digest('hex')
.slice(0, 10);
return new PlaywrightSceneId(`${test.id}-${projectId}-${test.repeatEachIndex}-${result.retry}`);
}
}
//# sourceMappingURL=PlaywrightSceneId.js.map