@camunda/e2e-test-suite 0.0.1064 → 0.0.1066
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1047,10 +1047,17 @@ class ModelerCreatePage {
|
|
|
1047
1047
|
// 1. Connect cluster → "Configure environment" modal → select cluster → Save
|
|
1048
1048
|
// 2. Deploy process → wait for success banner
|
|
1049
1049
|
// 3. Configure test case
|
|
1050
|
+
// The "Test Studio" rebrand gave this button the stable test id
|
|
1051
|
+
// `test-configuration-deploy-button` (confirmed in the failing run's trace
|
|
1052
|
+
// DOM). Prefer it, and keep the label-scoped locator as a fallback for
|
|
1053
|
+
// older modeler builds that render the button without a test id.
|
|
1050
1054
|
const setupDeployButton = this.page
|
|
1055
|
+
.getByTestId('test-configuration-deploy-button')
|
|
1056
|
+
.or(this.page
|
|
1051
1057
|
.getByText('Deploy process')
|
|
1052
1058
|
.locator('..')
|
|
1053
|
-
.getByRole('button', { name: 'Deploy' })
|
|
1059
|
+
.getByRole('button', { name: 'Deploy' }))
|
|
1060
|
+
.first();
|
|
1054
1061
|
// Both attributes on this button have been renamed by camunda-hub, in
|
|
1055
1062
|
// separate commits: a90fd06 changed the label from "Configure scenario" to
|
|
1056
1063
|
// "Configure test case", and b3958a1649 (#27259, 2026-08-07) then changed
|
|
@@ -1081,7 +1088,18 @@ class ModelerCreatePage {
|
|
|
1081
1088
|
// still about to appear. ConfigureTestPanel returns null for as long as the
|
|
1082
1089
|
// overlay is up, so the Start button never existed and
|
|
1083
1090
|
// clickStartInstanceButton burned its entire retry budget looking for it.
|
|
1084
|
-
|
|
1091
|
+
// camunda-hub's "Play" -> "Test Studio" rebrand renamed this container's
|
|
1092
|
+
// data-test from `play-configuration-overlay` to
|
|
1093
|
+
// `test-studio-configuration-overlay` (confirmed in the failing run's trace
|
|
1094
|
+
// DOM), so the old gate matched nothing and timed out. Anchor on the new
|
|
1095
|
+
// data-test, keep the legacy attribute for older modeler builds, and fall
|
|
1096
|
+
// back to the "Setup environment" panel title. This locator means "the
|
|
1097
|
+
// setup panel is still on screen".
|
|
1098
|
+
const configurationOverlay = this.page
|
|
1099
|
+
.locator('[data-test="test-studio-configuration-overlay"]')
|
|
1100
|
+
.or(this.page.locator('[data-test="play-configuration-overlay"]'))
|
|
1101
|
+
.or(this.page.getByText('Setup environment'))
|
|
1102
|
+
.first();
|
|
1085
1103
|
const configureTestPanel = this.page.getByTestId('configure-test-panel');
|
|
1086
1104
|
await (0, test_1.expect)(configurationOverlay
|
|
1087
1105
|
.or(this.continueToPlayButton)
|
package/dist/test-setup.js
CHANGED
|
@@ -9,6 +9,16 @@ const crypto_1 = require("crypto");
|
|
|
9
9
|
const axios_1 = __importDefault(require("axios"));
|
|
10
10
|
const constants_1 = require("./utils/constants");
|
|
11
11
|
async function captureScreenshot(page, testInfo) {
|
|
12
|
+
// Skip on passed/skipped: this ran for every test regardless of outcome,
|
|
13
|
+
// and since it's uploaded to TestRail via the testrail_attachment
|
|
14
|
+
// annotation below, a passing-test screenshot has negligible debugging
|
|
15
|
+
// value but was a dominant driver of excess TestRail attachment storage.
|
|
16
|
+
// Skip explicitly on passed/skipped rather than gating on
|
|
17
|
+
// `=== 'failed'`, so a timed-out or interrupted test -- exactly the
|
|
18
|
+
// cases where a screenshot is most useful -- still gets one.
|
|
19
|
+
if (testInfo.status === 'passed' || testInfo.status === 'skipped') {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
12
22
|
const screenshotPath = `test-results/screenshots/screenshot-${(0, crypto_1.randomUUID)()}.png`;
|
|
13
23
|
try {
|
|
14
24
|
await page.screenshot({
|
|
@@ -40,21 +50,25 @@ async function captureScreenshot(page, testInfo) {
|
|
|
40
50
|
}
|
|
41
51
|
exports.captureScreenshot = captureScreenshot;
|
|
42
52
|
async function captureFailureVideo(page, testInfo) {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
53
|
+
// Same policy as captureScreenshot above: skip on passed/skipped rather
|
|
54
|
+
// than requiring literally 'failed', so timed-out/interrupted tests keep
|
|
55
|
+
// getting a video too, and the two attachment types stay in sync.
|
|
56
|
+
if (testInfo.status === 'passed' || testInfo.status === 'skipped') {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
const videoPath = `test-results/videos/video-${testInfo.title}-chromium.webm`;
|
|
60
|
+
const video = await page.video();
|
|
61
|
+
if (video) {
|
|
62
|
+
await page.close(); // Close explicitly to unblock saveAs
|
|
63
|
+
await video.saveAs(videoPath);
|
|
64
|
+
await testInfo.attach('video', {
|
|
65
|
+
path: videoPath,
|
|
66
|
+
contentType: 'video/webm',
|
|
67
|
+
});
|
|
68
|
+
testInfo.annotations.push({
|
|
69
|
+
type: 'testrail_attachment',
|
|
70
|
+
description: videoPath,
|
|
71
|
+
});
|
|
58
72
|
}
|
|
59
73
|
}
|
|
60
74
|
exports.captureFailureVideo = captureFailureVideo;
|