@camunda/e2e-test-suite 0.0.587 → 0.0.588
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.
- package/dist/pages/SM-8.10/ClusterDetailsPage.d.ts +1 -1
- package/dist/pages/SM-8.7/ClusterDetailsPage.d.ts +1 -1
- package/dist/pages/SM-8.8/ClusterDetailsPage.d.ts +1 -1
- package/dist/pages/SM-8.8/ClusterDetailsPage.js +20 -18
- package/dist/pages/SM-8.9/ClusterDetailsPage.d.ts +1 -1
- package/dist/tests/SM-8.10/console-user-flows.spec.js +1 -1
- package/dist/tests/SM-8.7/console-user-flows.spec.js +1 -1
- package/dist/tests/SM-8.8/console-user-flows.spec.js +1 -1
- package/dist/tests/SM-8.9/console-user-flows.spec.js +1 -1
- package/package.json +1 -1
|
@@ -3,6 +3,6 @@ declare class ClusterDetailsPage {
|
|
|
3
3
|
private page;
|
|
4
4
|
readonly customPropertiesHeading: Locator;
|
|
5
5
|
constructor(page: Page);
|
|
6
|
-
assertCustomPropertyIsNavigated(linkTitle: string, linkName: string, link: string): Promise<void>;
|
|
6
|
+
assertCustomPropertyIsNavigated(linkTitle: string, linkName: string, link: string | RegExp): Promise<void>;
|
|
7
7
|
}
|
|
8
8
|
export { ClusterDetailsPage };
|
|
@@ -3,6 +3,6 @@ declare class ClusterDetailsPage {
|
|
|
3
3
|
private page;
|
|
4
4
|
readonly customPropertiesHeading: Locator;
|
|
5
5
|
constructor(page: Page);
|
|
6
|
-
assertCustomPropertyIsNavigated(linkTitle: string, linkName: string, link: string): Promise<void>;
|
|
6
|
+
assertCustomPropertyIsNavigated(linkTitle: string, linkName: string, link: string | RegExp): Promise<void>;
|
|
7
7
|
}
|
|
8
8
|
export { ClusterDetailsPage };
|
|
@@ -3,6 +3,6 @@ declare class ClusterDetailsPage {
|
|
|
3
3
|
private page;
|
|
4
4
|
readonly customPropertiesHeading: Locator;
|
|
5
5
|
constructor(page: Page);
|
|
6
|
-
assertCustomPropertyLink(linkTitle: string, linkName: string, expectedHref: string): Promise<void>;
|
|
6
|
+
assertCustomPropertyLink(linkTitle: string, linkName: string, expectedHref: string | RegExp): Promise<void>;
|
|
7
7
|
}
|
|
8
8
|
export { ClusterDetailsPage };
|
|
@@ -21,23 +21,21 @@ class ClusterDetailsPage {
|
|
|
21
21
|
timeout: 10000,
|
|
22
22
|
});
|
|
23
23
|
await (0, test_1.expect)(linkElement).toBeEnabled();
|
|
24
|
-
// Intercept the navigation to
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
});
|
|
32
|
-
});
|
|
33
|
-
// Also handle potential redirects by intercepting with wildcard patterns
|
|
34
|
-
await this.page.context().route(expectedHref + '/**', (route) => {
|
|
35
|
-
route.fulfill({
|
|
36
|
-
status: 200,
|
|
37
|
-
contentType: 'text/html',
|
|
38
|
-
body: '<html><body>Navigation test passed</body></html>',
|
|
39
|
-
});
|
|
24
|
+
// Intercept the navigation to avoid hitting external sites.
|
|
25
|
+
// When a RegExp is passed (e.g. to match both www and non-www variants),
|
|
26
|
+
// use it directly so both redirect and non-redirect paths are caught.
|
|
27
|
+
const fulfill = (route) => route.fulfill({
|
|
28
|
+
status: 200,
|
|
29
|
+
contentType: 'text/html',
|
|
30
|
+
body: '<html><body>Navigation test passed</body></html>',
|
|
40
31
|
});
|
|
32
|
+
if (expectedHref instanceof RegExp) {
|
|
33
|
+
await this.page.context().route(expectedHref, fulfill);
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
await this.page.context().route(expectedHref, fulfill);
|
|
37
|
+
await this.page.context().route(expectedHref + '/**', fulfill);
|
|
38
|
+
}
|
|
41
39
|
// Ensure the link is in viewport and click it
|
|
42
40
|
await linkElement.scrollIntoViewIfNeeded();
|
|
43
41
|
// Click and verify a new page opens with the correct URL
|
|
@@ -50,8 +48,12 @@ class ClusterDetailsPage {
|
|
|
50
48
|
]);
|
|
51
49
|
// Verify the navigation attempt went to the correct URL (handle trailing slashes)
|
|
52
50
|
const actualUrl = newPage.url().replace(/\/$/, '');
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
if (expectedHref instanceof RegExp) {
|
|
52
|
+
(0, test_1.expect)(actualUrl).toMatch(expectedHref);
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
(0, test_1.expect)(actualUrl).toBe(expectedHref.replace(/\/$/, ''));
|
|
56
|
+
}
|
|
55
57
|
await newPage.close();
|
|
56
58
|
}
|
|
57
59
|
}
|
|
@@ -3,6 +3,6 @@ declare class ClusterDetailsPage {
|
|
|
3
3
|
private page;
|
|
4
4
|
readonly customPropertiesHeading: Locator;
|
|
5
5
|
constructor(page: Page);
|
|
6
|
-
assertCustomPropertyIsNavigated(linkTitle: string, linkName: string, link: string): Promise<void>;
|
|
6
|
+
assertCustomPropertyIsNavigated(linkTitle: string, linkName: string, link: string | RegExp): Promise<void>;
|
|
7
7
|
}
|
|
8
8
|
export { ClusterDetailsPage };
|
|
@@ -38,7 +38,7 @@ SM_8_10_1.test.describe('Console User Flow Tests', () => {
|
|
|
38
38
|
await (0, test_1.expect)(page.getByText(customPropertyDescription)).toBeVisible({
|
|
39
39
|
timeout: 60000,
|
|
40
40
|
});
|
|
41
|
-
await clusterDetailsPage.assertCustomPropertyIsNavigated('Link 1', 'Camunda',
|
|
41
|
+
await clusterDetailsPage.assertCustomPropertyIsNavigated('Link 1', 'Camunda', /^https:\/\/(www\.)?camunda\.com\/?$/);
|
|
42
42
|
await clusterDetailsPage.assertCustomPropertyIsNavigated('Link 2', 'Camunda Docs', 'https://docs.camunda.io');
|
|
43
43
|
});
|
|
44
44
|
});
|
|
@@ -46,7 +46,7 @@ SM_8_7_1.test.describe.parallel('Console User Flow Tests', () => {
|
|
|
46
46
|
await (0, test_1.expect)(page.getByText(customPropertyDescription)).toBeVisible({
|
|
47
47
|
timeout: 60000,
|
|
48
48
|
});
|
|
49
|
-
await clusterDetailsPage.assertCustomPropertyIsNavigated('Link 1', 'Camunda',
|
|
49
|
+
await clusterDetailsPage.assertCustomPropertyIsNavigated('Link 1', 'Camunda', /^https:\/\/(www\.)?camunda\.com\/?$/);
|
|
50
50
|
await clusterDetailsPage.assertCustomPropertyIsNavigated('Link 2', 'Camunda Docs', 'https://docs.camunda.io');
|
|
51
51
|
});
|
|
52
52
|
});
|
|
@@ -38,7 +38,7 @@ SM_8_9_1.test.describe('Console User Flow Tests', () => {
|
|
|
38
38
|
await (0, test_1.expect)(page.getByText(customPropertyDescription)).toBeVisible({
|
|
39
39
|
timeout: 60000,
|
|
40
40
|
});
|
|
41
|
-
await clusterDetailsPage.assertCustomPropertyIsNavigated('Link 1', 'Camunda',
|
|
41
|
+
await clusterDetailsPage.assertCustomPropertyIsNavigated('Link 1', 'Camunda', /^https:\/\/(www\.)?camunda\.com\/?$/);
|
|
42
42
|
await clusterDetailsPage.assertCustomPropertyIsNavigated('Link 2', 'Camunda Docs', 'https://docs.camunda.io');
|
|
43
43
|
});
|
|
44
44
|
});
|