@camunda/e2e-test-suite 0.0.301 → 0.0.303
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.
|
@@ -3,6 +3,6 @@ declare class ClusterDetailsPage {
|
|
|
3
3
|
private page;
|
|
4
4
|
readonly customPropertiesHeading: Locator;
|
|
5
5
|
constructor(page: Page);
|
|
6
|
-
|
|
6
|
+
assertCustomPropertyLink(linkTitle: string, linkName: string, expectedHref: string): Promise<void>;
|
|
7
7
|
}
|
|
8
8
|
export { ClusterDetailsPage };
|
|
@@ -11,18 +11,48 @@ class ClusterDetailsPage {
|
|
|
11
11
|
name: 'Custom properties',
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
});
|
|
18
|
-
await this.page
|
|
14
|
+
// Test that clicking navigates to correct URL (regardless of site reachability)
|
|
15
|
+
async assertCustomPropertyLink(linkTitle, linkName, expectedHref) {
|
|
16
|
+
const linkElement = this.page
|
|
19
17
|
.getByRole('row', { name: linkTitle })
|
|
20
|
-
.getByRole('link', { name: linkName })
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
.getByRole('link', { name: linkName });
|
|
19
|
+
// Verify link is visible and clickable
|
|
20
|
+
await (0, test_1.expect)(linkElement).toBeVisible({
|
|
21
|
+
timeout: 10000,
|
|
22
|
+
});
|
|
23
|
+
await (0, test_1.expect)(linkElement).toBeEnabled();
|
|
24
|
+
// Intercept the navigation to capture the URL being requested
|
|
25
|
+
await this.page.context().route(expectedHref, (route) => {
|
|
26
|
+
// We captured the correct URL request - that's what we wanted to test
|
|
27
|
+
route.fulfill({
|
|
28
|
+
status: 200,
|
|
29
|
+
contentType: 'text/html',
|
|
30
|
+
body: '<html><body>Navigation test passed</body></html>',
|
|
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
|
+
});
|
|
23
40
|
});
|
|
24
|
-
|
|
25
|
-
await
|
|
41
|
+
// Ensure the link is in viewport and click it
|
|
42
|
+
await linkElement.scrollIntoViewIfNeeded();
|
|
43
|
+
// Click and verify a new page opens with the correct URL
|
|
44
|
+
const [newPage] = await Promise.all([
|
|
45
|
+
this.page.context().waitForEvent('page'),
|
|
46
|
+
linkElement.click({
|
|
47
|
+
force: true,
|
|
48
|
+
timeout: 10000,
|
|
49
|
+
}),
|
|
50
|
+
]);
|
|
51
|
+
// Verify the navigation attempt went to the correct URL (handle trailing slashes)
|
|
52
|
+
const actualUrl = newPage.url().replace(/\/$/, '');
|
|
53
|
+
const expectedUrl = expectedHref.replace(/\/$/, '');
|
|
54
|
+
(0, test_1.expect)(actualUrl).toBe(expectedUrl);
|
|
55
|
+
await newPage.close();
|
|
26
56
|
}
|
|
27
57
|
}
|
|
28
58
|
exports.ClusterDetailsPage = ClusterDetailsPage;
|
|
@@ -27,19 +27,34 @@ SM_8_8_1.test.describe('Console User Flow Tests', () => {
|
|
|
27
27
|
});
|
|
28
28
|
});
|
|
29
29
|
(0, SM_8_8_1.test)('Custom Properties', async ({ consoleHomePage, clusterPage, clusterDetailsPage, page, }) => {
|
|
30
|
+
const expectedLinks = [
|
|
31
|
+
{
|
|
32
|
+
linkTitle: 'Link 1',
|
|
33
|
+
linkName: 'Camunda',
|
|
34
|
+
expectedHref: 'https://camunda.com',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
linkTitle: 'Link 2',
|
|
38
|
+
linkName: 'Camunda Docs',
|
|
39
|
+
expectedHref: 'https://docs.camunda.io',
|
|
40
|
+
},
|
|
41
|
+
];
|
|
30
42
|
await SM_8_8_1.test.step('Navigate to Cluster Details', async () => {
|
|
31
43
|
await consoleHomePage.clickClusters();
|
|
32
44
|
await clusterPage.clickClusterLink();
|
|
33
45
|
});
|
|
34
|
-
await SM_8_8_1.test.step('
|
|
46
|
+
await SM_8_8_1.test.step('Verify Custom Properties Section', async () => {
|
|
35
47
|
await (0, test_1.expect)(clusterDetailsPage.customPropertiesHeading).toBeVisible({
|
|
36
48
|
timeout: 60000,
|
|
37
49
|
});
|
|
38
50
|
await (0, test_1.expect)(page.getByText(customPropertyDescription)).toBeVisible({
|
|
39
51
|
timeout: 60000,
|
|
40
52
|
});
|
|
41
|
-
|
|
42
|
-
|
|
53
|
+
});
|
|
54
|
+
await SM_8_8_1.test.step('Validate Custom Property Links', async () => {
|
|
55
|
+
for (const linkData of expectedLinks) {
|
|
56
|
+
await clusterDetailsPage.assertCustomPropertyLink(linkData.linkTitle, linkData.linkName, linkData.expectedHref);
|
|
57
|
+
}
|
|
43
58
|
});
|
|
44
59
|
});
|
|
45
60
|
(0, SM_8_8_1.test)('Default License Key User Flow', async ({ navigationPage, managementIdentityPage, ocIdentityHomePage, modelerHomePage, taskPanelPage, operateHomePage, optimizeHomePage, consoleHomePage, }) => {
|