@camunda/e2e-test-suite 0.0.1328 → 0.0.1330
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/.github/c8_versions.json +1 -0
- package/README.md +1 -0
- package/dist/fixtures/8.11.d.ts +83 -0
- package/dist/fixtures/8.11.js +203 -0
- package/dist/pages/8.11/AppsPage.d.ts +60 -0
- package/dist/pages/8.11/AppsPage.js +1060 -0
- package/dist/pages/8.11/AuditLogPage.d.ts +14 -0
- package/dist/pages/8.11/AuditLogPage.js +69 -0
- package/dist/pages/8.11/Authorization.d.ts +44 -0
- package/dist/pages/8.11/Authorization.js +409 -0
- package/dist/pages/8.11/ClientCredentialsDetailsPage.d.ts +12 -0
- package/dist/pages/8.11/ClientCredentialsDetailsPage.js +36 -0
- package/dist/pages/8.11/ClusterDetailsPage.d.ts +107 -0
- package/dist/pages/8.11/ClusterDetailsPage.js +892 -0
- package/dist/pages/8.11/ClusterPage.d.ts +96 -0
- package/dist/pages/8.11/ClusterPage.js +657 -0
- package/dist/pages/8.11/ClusterSecretsPage.d.ts +48 -0
- package/dist/pages/8.11/ClusterSecretsPage.js +406 -0
- package/dist/pages/8.11/ConnectorMarketplacePage.d.ts +29 -0
- package/dist/pages/8.11/ConnectorMarketplacePage.js +156 -0
- package/dist/pages/8.11/ConnectorSettingsPage.d.ts +39 -0
- package/dist/pages/8.11/ConnectorSettingsPage.js +150 -0
- package/dist/pages/8.11/ConnectorTemplatePage.d.ts +11 -0
- package/dist/pages/8.11/ConnectorTemplatePage.js +34 -0
- package/dist/pages/8.11/ConsoleOrganizationPage.d.ts +77 -0
- package/dist/pages/8.11/ConsoleOrganizationPage.js +457 -0
- package/dist/pages/8.11/DataFiltersPage.d.ts +30 -0
- package/dist/pages/8.11/DataFiltersPage.js +135 -0
- package/dist/pages/8.11/FormJsPage.d.ts +38 -0
- package/dist/pages/8.11/FormJsPage.js +283 -0
- package/dist/pages/8.11/HomePage.d.ts +29 -0
- package/dist/pages/8.11/HomePage.js +176 -0
- package/dist/pages/8.11/IdpCreatePage.d.ts +118 -0
- package/dist/pages/8.11/IdpCreatePage.js +514 -0
- package/dist/pages/8.11/LoginPage.d.ts +45 -0
- package/dist/pages/8.11/LoginPage.js +214 -0
- package/dist/pages/8.11/ModelerCreatePage.d.ts +256 -0
- package/dist/pages/8.11/ModelerCreatePage.js +2272 -0
- package/dist/pages/8.11/ModelerHomePage.d.ts +100 -0
- package/dist/pages/8.11/ModelerHomePage.js +1168 -0
- package/dist/pages/8.11/ModelerUserInvitePage.d.ts +29 -0
- package/dist/pages/8.11/ModelerUserInvitePage.js +136 -0
- package/dist/pages/8.11/OCIdentityAuthorizationsPage.d.ts +11 -0
- package/dist/pages/8.11/OCIdentityAuthorizationsPage.js +25 -0
- package/dist/pages/8.11/OCIdentityClusterVariablesPage.d.ts +21 -0
- package/dist/pages/8.11/OCIdentityClusterVariablesPage.js +128 -0
- package/dist/pages/8.11/OCIdentityGroupsPage.d.ts +38 -0
- package/dist/pages/8.11/OCIdentityGroupsPage.js +176 -0
- package/dist/pages/8.11/OCIdentityHomePage.d.ts +21 -0
- package/dist/pages/8.11/OCIdentityHomePage.js +111 -0
- package/dist/pages/8.11/OCIdentityMappingRulesPage.d.ts +23 -0
- package/dist/pages/8.11/OCIdentityMappingRulesPage.js +124 -0
- package/dist/pages/8.11/OCIdentityRolesPage.d.ts +43 -0
- package/dist/pages/8.11/OCIdentityRolesPage.js +236 -0
- package/dist/pages/8.11/OperateHomePage.d.ts +28 -0
- package/dist/pages/8.11/OperateHomePage.js +150 -0
- package/dist/pages/8.11/OperateProcessInstancePage.d.ts +43 -0
- package/dist/pages/8.11/OperateProcessInstancePage.js +893 -0
- package/dist/pages/8.11/OperateProcessesPage.d.ts +28 -0
- package/dist/pages/8.11/OperateProcessesPage.js +153 -0
- package/dist/pages/8.11/OptimizeCollectionsPage.d.ts +30 -0
- package/dist/pages/8.11/OptimizeCollectionsPage.js +175 -0
- package/dist/pages/8.11/OptimizeDashboardPage.d.ts +11 -0
- package/dist/pages/8.11/OptimizeDashboardPage.js +71 -0
- package/dist/pages/8.11/OptimizeHomePage.d.ts +17 -0
- package/dist/pages/8.11/OptimizeHomePage.js +171 -0
- package/dist/pages/8.11/OptimizeReportPage.d.ts +49 -0
- package/dist/pages/8.11/OptimizeReportPage.js +184 -0
- package/dist/pages/8.11/OptimizeSharePage.d.ts +16 -0
- package/dist/pages/8.11/OptimizeSharePage.js +100 -0
- package/dist/pages/8.11/PlayPage.d.ts +17 -0
- package/dist/pages/8.11/PlayPage.js +157 -0
- package/dist/pages/8.11/ProcessApplicationPage.d.ts +32 -0
- package/dist/pages/8.11/ProcessApplicationPage.js +496 -0
- package/dist/pages/8.11/SettingsPage.d.ts +10 -0
- package/dist/pages/8.11/SettingsPage.js +53 -0
- package/dist/pages/8.11/SignUpPage.d.ts +42 -0
- package/dist/pages/8.11/SignUpPage.js +134 -0
- package/dist/pages/8.11/TaskDetailsPage.d.ts +77 -0
- package/dist/pages/8.11/TaskDetailsPage.js +324 -0
- package/dist/pages/8.11/TaskPanelPage.d.ts +26 -0
- package/dist/pages/8.11/TaskPanelPage.js +245 -0
- package/dist/pages/8.11/TaskProcessesPage.d.ts +18 -0
- package/dist/pages/8.11/TaskProcessesPage.js +134 -0
- package/dist/pages/8.11/UtilitiesPage.d.ts +56 -0
- package/dist/pages/8.11/UtilitiesPage.js +1024 -0
- package/dist/pages/8.11/WorkspaceMembersPage.d.ts +21 -0
- package/dist/pages/8.11/WorkspaceMembersPage.js +268 -0
- package/dist/tests/8.11/access-user-role-management.spec.d.ts +1 -0
- package/dist/tests/8.11/access-user-role-management.spec.js +487 -0
- package/dist/tests/8.11/agentic-ai-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.11/agentic-ai-user-flows.spec.js +209 -0
- package/dist/tests/8.11/aws-cluster-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.11/aws-cluster-user-flows.spec.js +188 -0
- package/dist/tests/8.11/aws-connectors-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.11/aws-connectors-user-flows.spec.js +167 -0
- package/dist/tests/8.11/cluster-variables.spec.d.ts +1 -0
- package/dist/tests/8.11/cluster-variables.spec.js +202 -0
- package/dist/tests/8.11/connectors-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.11/connectors-user-flows.spec.js +537 -0
- package/dist/tests/8.11/console-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.11/console-user-flows.spec.js +199 -0
- package/dist/tests/8.11/hto-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.11/hto-user-flows.spec.js +358 -0
- package/dist/tests/8.11/idp-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.11/idp-user-flows.spec.js +316 -0
- package/dist/tests/8.11/login-negative-tests.spec.d.ts +1 -0
- package/dist/tests/8.11/login-negative-tests.spec.js +29 -0
- package/dist/tests/8.11/login.spec.d.ts +1 -0
- package/dist/tests/8.11/login.spec.js +29 -0
- package/dist/tests/8.11/navigation.spec.d.ts +1 -0
- package/dist/tests/8.11/navigation.spec.js +59 -0
- package/dist/tests/8.11/operate-access-flow.spec.d.ts +1 -0
- package/dist/tests/8.11/operate-access-flow.spec.js +136 -0
- package/dist/tests/8.11/optimize-agentic-control-panel-api.spec.d.ts +1 -0
- package/dist/tests/8.11/optimize-agentic-control-panel-api.spec.js +96 -0
- package/dist/tests/8.11/optimize-agentic-control-panel-ui.spec.d.ts +1 -0
- package/dist/tests/8.11/optimize-agentic-control-panel-ui.spec.js +69 -0
- package/dist/tests/8.11/optimize-api-tests.spec.d.ts +1 -0
- package/dist/tests/8.11/optimize-api-tests.spec.js +1194 -0
- package/dist/tests/8.11/optimize-collections-api.spec.d.ts +1 -0
- package/dist/tests/8.11/optimize-collections-api.spec.js +184 -0
- package/dist/tests/8.11/optimize-collections-ui.spec.d.ts +1 -0
- package/dist/tests/8.11/optimize-collections-ui.spec.js +46 -0
- package/dist/tests/8.11/optimize-data-filters-api.spec.d.ts +1 -0
- package/dist/tests/8.11/optimize-data-filters-api.spec.js +195 -0
- package/dist/tests/8.11/optimize-data-filters-ui.spec.d.ts +1 -0
- package/dist/tests/8.11/optimize-data-filters-ui.spec.js +306 -0
- package/dist/tests/8.11/optimize-exporter-filters-importer-e2e.spec.d.ts +1 -0
- package/dist/tests/8.11/optimize-exporter-filters-importer-e2e.spec.js +316 -0
- package/dist/tests/8.11/optimize-sharing-alerts-export-api.spec.d.ts +1 -0
- package/dist/tests/8.11/optimize-sharing-alerts-export-api.spec.js +337 -0
- package/dist/tests/8.11/optimize-sharing-alerts-export-ui.spec.d.ts +1 -0
- package/dist/tests/8.11/optimize-sharing-alerts-export-ui.spec.js +198 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-audit-log.spec.d.ts +1 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-audit-log.spec.js +146 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-call-tools.spec.d.ts +1 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-call-tools.spec.js +208 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-e2e-flow.spec.d.ts +1 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-e2e-flow.spec.js +151 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-list-tools.spec.d.ts +1 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-list-tools.spec.js +242 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-cluster-tools.spec.d.ts +1 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-cluster-tools.spec.js +75 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-incident-tools.spec.d.ts +1 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-incident-tools.spec.js +123 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-user-task-tools.spec.d.ts +1 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-user-task-tools.spec.js +151 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-variable-tools.spec.d.ts +1 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-variable-tools.spec.js +123 -0
- package/dist/tests/8.11/play.spec.d.ts +1 -0
- package/dist/tests/8.11/play.spec.js +93 -0
- package/dist/tests/8.11/rba-enabled-v2-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.11/rba-enabled-v2-user-flows.spec.js +495 -0
- package/dist/tests/8.11/saas-migration-path-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.11/saas-migration-path-user-flows.spec.js +133 -0
- package/dist/tests/8.11/smoke-tests.spec.d.ts +1 -0
- package/dist/tests/8.11/smoke-tests.spec.js +339 -0
- package/dist/tests/8.11/test-setup.spec.d.ts +1 -0
- package/dist/tests/8.11/test-setup.spec.js +256 -0
- package/dist/tests/8.11/web-modeler-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.11/web-modeler-user-flows.spec.js +523 -0
- package/dist/utils/clusterVersions.d.ts +2 -1
- package/dist/utils/clusterVersions.js +1 -0
- package/dist/utils/consoleApiHelpers.js +1 -0
- package/package.json +1 -1
- package/playwright.config.ts +10 -0
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LoginPage = void 0;
|
|
4
|
+
const test_1 = require("@playwright/test");
|
|
5
|
+
const UtilitiesPage_1 = require("./UtilitiesPage");
|
|
6
|
+
const authErrorClassification_1 = require("../../utils/authErrorClassification");
|
|
7
|
+
const consoleApiHelpers_1 = require("../../utils/consoleApiHelpers");
|
|
8
|
+
const sessionRecovery_1 = require("../../utils/sessionRecovery");
|
|
9
|
+
const userNameInputValidInputSchema = {
|
|
10
|
+
_schema: {
|
|
11
|
+
maxlength: 254,
|
|
12
|
+
minlength: 5,
|
|
13
|
+
violationEffect: 'ARIA_INVALID_STATE',
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
class LoginPage {
|
|
17
|
+
page;
|
|
18
|
+
usernameInput;
|
|
19
|
+
passwordInput;
|
|
20
|
+
continueButton;
|
|
21
|
+
loginButton;
|
|
22
|
+
loginMessage;
|
|
23
|
+
errorMessage;
|
|
24
|
+
passwordHeading;
|
|
25
|
+
rateLimitError;
|
|
26
|
+
constructor(page) {
|
|
27
|
+
this.page = page;
|
|
28
|
+
this.usernameInput = {
|
|
29
|
+
locator: page
|
|
30
|
+
.getByLabel('Email address')
|
|
31
|
+
.and(page.locator(':not([id="c4-invite-email"])')),
|
|
32
|
+
schema: userNameInputValidInputSchema,
|
|
33
|
+
};
|
|
34
|
+
this.passwordInput = page
|
|
35
|
+
.getByLabel(/^Password\s*\*?$/i)
|
|
36
|
+
.or(page.locator('input[type="password"]'))
|
|
37
|
+
.first();
|
|
38
|
+
this.continueButton = page.getByRole('button', {
|
|
39
|
+
name: 'Continue',
|
|
40
|
+
exact: true,
|
|
41
|
+
});
|
|
42
|
+
this.loginMessage = page.getByText('Log in to continue to Camunda.');
|
|
43
|
+
this.passwordHeading = page.getByRole('heading', {
|
|
44
|
+
name: 'Enter Your Password',
|
|
45
|
+
});
|
|
46
|
+
// The identity provider occasionally returns a generic error / rate
|
|
47
|
+
// limit page under load ("...rate limit has been reached") that has
|
|
48
|
+
// none of the usual auth controls. Ported from 8.9's LoginPage.ts
|
|
49
|
+
// (fix(8.9): back off when Auth0 returns rate-limit page) -- 8.10 was
|
|
50
|
+
// missing this detection entirely, so a rate-limited login here fell
|
|
51
|
+
// through to the generic 10-20s retry backoff instead of the 60-90s
|
|
52
|
+
// needed to outlast a typical rate-limit window.
|
|
53
|
+
//
|
|
54
|
+
// Kept as one locator because every caller wants to stop waiting on
|
|
55
|
+
// either page; which of the two rendered is decided at throw time by
|
|
56
|
+
// classifyAuthErrorPage, since only that distinction says whether the
|
|
57
|
+
// remedy is a higher limit or an allow-listed runner IP.
|
|
58
|
+
this.rateLimitError = page
|
|
59
|
+
.getByText(authErrorClassification_1.AUTH0_QUOTA_TEXT)
|
|
60
|
+
.or(page.getByText(authErrorClassification_1.AUTH0_GENERIC_ERROR_TEXT));
|
|
61
|
+
this.loginButton = page.getByRole('button', {
|
|
62
|
+
name: 'Continue',
|
|
63
|
+
exact: true,
|
|
64
|
+
});
|
|
65
|
+
this.errorMessage = page.getByText('Wrong email or password');
|
|
66
|
+
}
|
|
67
|
+
async fillUsername(username) {
|
|
68
|
+
await this.usernameInput.locator.fill(username);
|
|
69
|
+
}
|
|
70
|
+
async clickContinueButton() {
|
|
71
|
+
await this.continueButton.click({ timeout: 30000 });
|
|
72
|
+
}
|
|
73
|
+
async fillPassword(password) {
|
|
74
|
+
await this.passwordInput.waitFor({ state: 'visible', timeout: 120000 });
|
|
75
|
+
await this.passwordInput.fill(password);
|
|
76
|
+
}
|
|
77
|
+
async clickLoginButton() {
|
|
78
|
+
await this.loginButton.click({ timeout: 60000 });
|
|
79
|
+
}
|
|
80
|
+
// Auth0 responds to a rejected password by re-rendering the same password
|
|
81
|
+
// step with an error message rather than navigating anywhere, so success
|
|
82
|
+
// and failure aren't told apart by a URL or element one side has and the
|
|
83
|
+
// other doesn't. Without this check, a permanently wrong password falls
|
|
84
|
+
// through into assertTestUsesCorrectOrganization's generic ~120s wait for a
|
|
85
|
+
// Console/Hub shell that is never coming, and loginWithRetry then spends
|
|
86
|
+
// its remaining attempts resubmitting the exact same doomed credentials.
|
|
87
|
+
async throwIfCredentialsRejected(username) {
|
|
88
|
+
const message = await (0, authErrorClassification_1.classifyLoginRejection)(this.page, username);
|
|
89
|
+
if (message) {
|
|
90
|
+
throw new Error(message);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
async login(credentials = {}) {
|
|
94
|
+
const { username = process.env.C8_USERNAME, password = process.env.C8_PASSWORD, } = credentials;
|
|
95
|
+
// The Hub bearer-token cache in consoleApiHelpers.ts is keyed by Page for
|
|
96
|
+
// the tab's whole lifetime; without clearing it here, a flow that logs a
|
|
97
|
+
// different user into the same page could have getUserToken() return the
|
|
98
|
+
// PREVIOUS user's token.
|
|
99
|
+
(0, sessionRecovery_1.trackSignedInUser)(this.page, username);
|
|
100
|
+
(0, consoleApiHelpers_1.resetHubBearerToken)(this.page);
|
|
101
|
+
await (0, test_1.expect)(this.usernameInput.locator).toBeVisible({ timeout: 200000 });
|
|
102
|
+
await this.fillUsername(username);
|
|
103
|
+
await this.clickContinueButton();
|
|
104
|
+
await this.fillPassword(password);
|
|
105
|
+
await (0, test_1.expect)(this.loginButton).toBeVisible({ timeout: 120000 });
|
|
106
|
+
await this.clickLoginButton();
|
|
107
|
+
await this.throwIfCredentialsRejected(username);
|
|
108
|
+
await (0, UtilitiesPage_1.assertTestUsesCorrectOrganization)(this.page);
|
|
109
|
+
}
|
|
110
|
+
// The identity provider's email step submits through client-side JS, so a
|
|
111
|
+
// `Continue` click that lands while the form is still hydrating is swallowed:
|
|
112
|
+
// the click resolves, nothing navigates, and the page silently stays on the
|
|
113
|
+
// email step. `fillPassword` then waits out its whole 120s budget for a
|
|
114
|
+
// password field that will never render, and because every one of
|
|
115
|
+
// loginWithRetry's 5 attempts loses the click the same way the only symptom
|
|
116
|
+
// is "Login failed after 5 attempts: ... waiting for getByLabel(/^Password/)
|
|
117
|
+
// to be visible" -- the nightly failure in run 34319318325.
|
|
118
|
+
//
|
|
119
|
+
// Re-submitting the email is idempotent, so spend the same overall budget on
|
|
120
|
+
// three attempts instead of one, and only re-click while the email step is
|
|
121
|
+
// still on screen: that proves the previous click did not advance the flow.
|
|
122
|
+
async submitUsernameStep(username) {
|
|
123
|
+
const maxAttempts = 3;
|
|
124
|
+
const passwordStepTimeout = 40000;
|
|
125
|
+
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
|
|
126
|
+
await this.fillUsername(username);
|
|
127
|
+
await this.clickContinueButton();
|
|
128
|
+
const reachedPasswordStep = await this.passwordInput
|
|
129
|
+
.waitFor({ state: 'visible', timeout: passwordStepTimeout })
|
|
130
|
+
.then(() => true)
|
|
131
|
+
.catch(() => false);
|
|
132
|
+
if (reachedPasswordStep) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
// Surface a rate-limit page with the marker loginWithRetry keys its
|
|
136
|
+
// 60-90s backoff on, rather than burning the remaining attempts on a
|
|
137
|
+
// form the provider is not going to serve. The marker also records
|
|
138
|
+
// which of the two Auth0 failure modes this was, and the error copy
|
|
139
|
+
// behind it, so a recurrence can be diagnosed from the run log alone.
|
|
140
|
+
await (0, authErrorClassification_1.throwIfAuthErrorPage)(this.page);
|
|
141
|
+
// Neither the password step nor the email step is on screen: some
|
|
142
|
+
// interstitial we do not model. Hand back to fillPassword's own wait
|
|
143
|
+
// instead of re-typing blindly into a page we cannot identify.
|
|
144
|
+
if (!(await this.usernameInput.locator.isVisible().catch(() => false))) {
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
console.warn(`Email step did not advance to the password step (attempt ${attempt}/${maxAttempts}); re-submitting`);
|
|
148
|
+
}
|
|
149
|
+
throw new Error(`Login form stayed on the email step after ${maxAttempts} submissions`);
|
|
150
|
+
}
|
|
151
|
+
async loginWithTestUser(credentials = {}) {
|
|
152
|
+
const { username = process.env.C8_USERNAME_TEST, password = process.env.C8_PASSWORD_TEST, } = credentials;
|
|
153
|
+
// See login() above: this re-authenticates the same page and must clear
|
|
154
|
+
// the Hub bearer-token cache too, or getUserToken() can return the
|
|
155
|
+
// previous user's cached token.
|
|
156
|
+
(0, sessionRecovery_1.trackSignedInUser)(this.page, username);
|
|
157
|
+
(0, consoleApiHelpers_1.resetHubBearerToken)(this.page);
|
|
158
|
+
// Skip navigation if the auth0 login page is already loaded — re-navigating
|
|
159
|
+
// to '/' when already on auth0 undoes the redirect and causes a 60-second
|
|
160
|
+
// waitForURL race. This is the common case when called from loginWithRetry,
|
|
161
|
+
// which already lands on the auth0 page before calling this method.
|
|
162
|
+
const alreadyOnLoginPage = await this.usernameInput.locator
|
|
163
|
+
.isVisible({ timeout: 2000 })
|
|
164
|
+
.catch(() => false);
|
|
165
|
+
if (!alreadyOnLoginPage) {
|
|
166
|
+
// Navigate to app root to trigger auth redirect. The Console app (at
|
|
167
|
+
// console.* hostnames) embeds a hidden invite-user email input also labeled
|
|
168
|
+
// "Email address" that would otherwise satisfy the locator below before the
|
|
169
|
+
// auth0 redirect has had a chance to complete.
|
|
170
|
+
await this.page.goto('/');
|
|
171
|
+
await this.page
|
|
172
|
+
.waitForURL((url) => !url.hostname.includes('console'), {
|
|
173
|
+
timeout: 60000,
|
|
174
|
+
})
|
|
175
|
+
.catch(() => { });
|
|
176
|
+
}
|
|
177
|
+
const onPasswordStep = (await this.passwordHeading
|
|
178
|
+
.isVisible({ timeout: 5000 })
|
|
179
|
+
.catch(() => false)) ||
|
|
180
|
+
(await this.passwordInput.isVisible({ timeout: 5000 }).catch(() => false));
|
|
181
|
+
if (!onPasswordStep) {
|
|
182
|
+
await (0, test_1.expect)(this.usernameInput.locator).toBeVisible({ timeout: 120000 });
|
|
183
|
+
await this.submitUsernameStep(username);
|
|
184
|
+
}
|
|
185
|
+
await this.fillPassword(password);
|
|
186
|
+
await (0, test_1.expect)(this.loginButton).toBeVisible({ timeout: 120000 });
|
|
187
|
+
await this.clickLoginButton();
|
|
188
|
+
await this.throwIfCredentialsRejected(username);
|
|
189
|
+
await (0, UtilitiesPage_1.assertTestUsesCorrectOrganization)(this.page);
|
|
190
|
+
}
|
|
191
|
+
async loginFailAssertion() {
|
|
192
|
+
try {
|
|
193
|
+
await (0, test_1.expect)(this.errorMessage).toContainText('Wrong email or password');
|
|
194
|
+
}
|
|
195
|
+
catch (error) {
|
|
196
|
+
await (0, test_1.expect)(this.page.getByText('Your account has been blocked after multiple consecutive login attempts')).toBeVisible({ timeout: 20000 });
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
async loginWithoutOrgAssertion(credentials = {}) {
|
|
200
|
+
const { username = process.env.C8_USERNAME, password = process.env.C8_PASSWORD, } = credentials;
|
|
201
|
+
// See login() above: this re-authenticates the same page and must clear
|
|
202
|
+
// the Hub bearer-token cache too, or getUserToken() can return the
|
|
203
|
+
// previous user's cached token.
|
|
204
|
+
(0, sessionRecovery_1.trackSignedInUser)(this.page, username);
|
|
205
|
+
(0, consoleApiHelpers_1.resetHubBearerToken)(this.page);
|
|
206
|
+
await (0, test_1.expect)(this.usernameInput.locator).toBeVisible({ timeout: 180000 });
|
|
207
|
+
await this.fillUsername(username);
|
|
208
|
+
await this.clickContinueButton();
|
|
209
|
+
await this.fillPassword(password);
|
|
210
|
+
await (0, test_1.expect)(this.loginButton).toBeVisible({ timeout: 120000 });
|
|
211
|
+
await this.clickLoginButton();
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
exports.LoginPage = LoginPage;
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
import { Page, Locator } from '@playwright/test';
|
|
2
|
+
declare class ModelerCreatePage {
|
|
3
|
+
private page;
|
|
4
|
+
private processApplicationPage;
|
|
5
|
+
readonly generalPanel: Locator;
|
|
6
|
+
private deployDiagramDialog;
|
|
7
|
+
readonly processIdInput: Locator;
|
|
8
|
+
readonly startEventElement: Locator;
|
|
9
|
+
readonly appendTaskButton: Locator;
|
|
10
|
+
readonly changeTypeButton: Locator;
|
|
11
|
+
readonly userTaskOption: Locator;
|
|
12
|
+
readonly appendEndEventButton: Locator;
|
|
13
|
+
readonly startInstanceSubButton: Locator;
|
|
14
|
+
readonly viewProcessInstanceLink: Locator;
|
|
15
|
+
readonly nameInput: Locator;
|
|
16
|
+
readonly diagramBreadcrumb: Locator;
|
|
17
|
+
readonly diagramActionsButton: Locator;
|
|
18
|
+
readonly renameDiagramNameButton: Locator;
|
|
19
|
+
readonly diagramNameInput: Locator;
|
|
20
|
+
readonly renameInput: Locator;
|
|
21
|
+
readonly renameSubmitButton: Locator;
|
|
22
|
+
readonly variableInput: Locator;
|
|
23
|
+
readonly businessIdInput: Locator;
|
|
24
|
+
readonly embedFormButton: Locator;
|
|
25
|
+
readonly embedButton: Locator;
|
|
26
|
+
readonly newForm: Locator;
|
|
27
|
+
readonly deploySubButton: Locator;
|
|
28
|
+
readonly deployMenuItem: Locator;
|
|
29
|
+
readonly additionalActionsButton: Locator;
|
|
30
|
+
readonly cancelButton: Locator;
|
|
31
|
+
readonly restConnectorOption: Locator;
|
|
32
|
+
readonly changeElementSearchInput: Locator;
|
|
33
|
+
readonly changeElementTabStrip: Locator;
|
|
34
|
+
readonly reusableAssetsTab: Locator;
|
|
35
|
+
readonly webhookMessageStartEventConnectorOption: Locator;
|
|
36
|
+
readonly webhookTab: Locator;
|
|
37
|
+
readonly webhookIsActiveButton: Locator;
|
|
38
|
+
readonly copyWebhookUrlToClipboardButton: Locator;
|
|
39
|
+
readonly createTask: Locator;
|
|
40
|
+
readonly createEndEvent: Locator;
|
|
41
|
+
readonly canvas: Locator;
|
|
42
|
+
readonly zoomOutButton: Locator;
|
|
43
|
+
readonly endEventCanvas: Locator;
|
|
44
|
+
readonly connectToOtherElementButton: Locator;
|
|
45
|
+
readonly firstPlacedElement: Locator;
|
|
46
|
+
readonly secondPlacedElement: Locator;
|
|
47
|
+
readonly appendElementButton: Locator;
|
|
48
|
+
readonly appendElementIndicator: Locator;
|
|
49
|
+
readonly appendCreatePad: Locator;
|
|
50
|
+
readonly payloadInput: Locator;
|
|
51
|
+
readonly marketPlaceButton: Locator;
|
|
52
|
+
readonly publicHolidayConnectorOption: Locator;
|
|
53
|
+
readonly publicHolidayYearOption: Locator;
|
|
54
|
+
readonly publicHolidayCountryCodeOption: Locator;
|
|
55
|
+
readonly implementationSection: Locator;
|
|
56
|
+
readonly implementationOptions: Locator;
|
|
57
|
+
readonly intermediateBoundaryEvent: Locator;
|
|
58
|
+
readonly intermediateWebhookConnectorOption: Locator;
|
|
59
|
+
readonly correlationKeyProcessInput: Locator;
|
|
60
|
+
readonly correlationKeyPayloadInput: Locator;
|
|
61
|
+
readonly firstElement: Locator;
|
|
62
|
+
readonly secondElement: Locator;
|
|
63
|
+
readonly thirdElement: Locator;
|
|
64
|
+
readonly payloadNameInput: Locator;
|
|
65
|
+
readonly payloadNumberInput: Locator;
|
|
66
|
+
readonly payloadCheckboxInput: Locator;
|
|
67
|
+
readonly payloadDateInput: Locator;
|
|
68
|
+
readonly form: Locator;
|
|
69
|
+
readonly formPropertySection: Locator;
|
|
70
|
+
readonly formLinkingTypeDropdown: Locator;
|
|
71
|
+
readonly formLinkTypeOptions: Locator;
|
|
72
|
+
readonly addFormJsonConfigurationInput: Locator;
|
|
73
|
+
readonly publicationSection: Locator;
|
|
74
|
+
readonly publicAccessToggle: Locator;
|
|
75
|
+
readonly publicationTab: Locator;
|
|
76
|
+
readonly copyPublicLinkButton: Locator;
|
|
77
|
+
readonly closeButton: Locator;
|
|
78
|
+
readonly rbaEnabledDeployedDialog: Locator;
|
|
79
|
+
readonly viewProcessLink: Locator;
|
|
80
|
+
readonly appendGatewayButton: Locator;
|
|
81
|
+
readonly parallelGatewayOption: Locator;
|
|
82
|
+
readonly firstPlacedGateway: Locator;
|
|
83
|
+
readonly secondPlacedGateway: Locator;
|
|
84
|
+
readonly serviceTaskOption: Locator;
|
|
85
|
+
readonly taskDefinitionPanel: Locator;
|
|
86
|
+
readonly jobTypeInput: Locator;
|
|
87
|
+
readonly playTab: Locator;
|
|
88
|
+
readonly continueToPlayButton: Locator;
|
|
89
|
+
readonly assigneeInput: Locator;
|
|
90
|
+
readonly candidateGroupsInput: Locator;
|
|
91
|
+
readonly candidateUsersInput: Locator;
|
|
92
|
+
readonly assignmentSection: Locator;
|
|
93
|
+
readonly priorityInput: Locator;
|
|
94
|
+
readonly startEventVariableInputWithThreeVariables: Locator;
|
|
95
|
+
readonly zeebeRestAddressVariable: Locator;
|
|
96
|
+
readonly variableAssignmentValueTextbox: Locator;
|
|
97
|
+
readonly zeebeSecretVariable: Locator;
|
|
98
|
+
readonly variableAssignmentValueTextboxSecondVariable: Locator;
|
|
99
|
+
readonly zeebeClientIdVariable: Locator;
|
|
100
|
+
readonly variableAssignmentValueTextboxThirdVariable: Locator;
|
|
101
|
+
readonly connectorsDocHandlingStartEventElement: Locator;
|
|
102
|
+
readonly detailsPanelToggle: Locator;
|
|
103
|
+
readonly timerEventOption: Locator;
|
|
104
|
+
readonly timerEventSettings: Locator;
|
|
105
|
+
readonly timerType: Locator;
|
|
106
|
+
readonly timerValue: Locator;
|
|
107
|
+
readonly eighthPlacedElement: Locator;
|
|
108
|
+
readonly deployAndRunMainButton: Locator;
|
|
109
|
+
readonly deployAndRunSubButton: Locator;
|
|
110
|
+
readonly deployRunActions: Locator;
|
|
111
|
+
readonly deployAndRunMenuItem: Locator;
|
|
112
|
+
readonly dialog: Locator;
|
|
113
|
+
readonly backupDeployButton: Locator;
|
|
114
|
+
readonly globalConnectToolButton: Locator;
|
|
115
|
+
readonly formLinkedSuccessMessage: Locator;
|
|
116
|
+
readonly webhookActiveMessage: Locator;
|
|
117
|
+
readonly diagramNameBreadcrumb: (diagramName: string) => Locator;
|
|
118
|
+
constructor(page: Page);
|
|
119
|
+
clickSecondDeployButton(): Promise<void>;
|
|
120
|
+
modelJobWorkerDiagram(processName: string, embedFrom?: boolean, processId?: string): Promise<void>;
|
|
121
|
+
private waitForDiagramEditorToLoad;
|
|
122
|
+
private onModelerLoginPage;
|
|
123
|
+
private waitForModelerSession;
|
|
124
|
+
private linkFormToUserTask;
|
|
125
|
+
modelCamundaUserTaskDiagram(processName: string, processId?: string, formName?: string): Promise<void>;
|
|
126
|
+
assignToCandidateGroup(taskName: string, candidateGroup: string, assignee?: string): Promise<void>;
|
|
127
|
+
assignToCandidateUser(taskName: string, candidateUser: string, assignee?: string): Promise<void>;
|
|
128
|
+
expandAssignmentSection(): Promise<void>;
|
|
129
|
+
expandFormsSection(): Promise<void>;
|
|
130
|
+
clickAssigneeInput(): Promise<void>;
|
|
131
|
+
fillAssigneeInput(name: string): Promise<void>;
|
|
132
|
+
clickCandidateGroupsInput(): Promise<void>;
|
|
133
|
+
fillCandidateGroupsInput(name: string): Promise<void>;
|
|
134
|
+
clickCandidateUsersInput(): Promise<void>;
|
|
135
|
+
fillCandidateUsersInput(candidateUser: string): Promise<void>;
|
|
136
|
+
selectUserTask(userTask: string): Promise<void>;
|
|
137
|
+
clickGeneralPropertiesPanel(): Promise<void>;
|
|
138
|
+
clickProcessIdInput(): Promise<void>;
|
|
139
|
+
fillProcessIdInput(id: string): Promise<void>;
|
|
140
|
+
clickStartEventElement(): Promise<void>;
|
|
141
|
+
clickAppendTaskButton(): Promise<void>;
|
|
142
|
+
clickChangeTypeButton(): Promise<void>;
|
|
143
|
+
clickUserTaskOption(): Promise<void>;
|
|
144
|
+
clickForm(name: string): Promise<void>;
|
|
145
|
+
clickUserTask(id: string): Promise<void>;
|
|
146
|
+
clickAppendEndEventButton(parentElement?: string): Promise<void>;
|
|
147
|
+
fillPriorityInput(priority: string): Promise<void>;
|
|
148
|
+
clickPriorityInput(): Promise<void>;
|
|
149
|
+
setPriority(taskName: string, priority: number, numberOfTasks: number): Promise<void>;
|
|
150
|
+
clickCloseButton(): Promise<void>;
|
|
151
|
+
clickAdditionalActionsButton(): Promise<void>;
|
|
152
|
+
clickDeployMenuItem(): Promise<void>;
|
|
153
|
+
deployDiagram(clusterName: string): Promise<void>;
|
|
154
|
+
assertDeployAndRunNotPermitted(): Promise<void>;
|
|
155
|
+
clickStartInstanceMainButton(): Promise<void>;
|
|
156
|
+
clickStartInstanceSubButton(): Promise<void>;
|
|
157
|
+
runProcessInstance(clusterName: string, variables?: string, formVariables?: {
|
|
158
|
+
[key: string]: string;
|
|
159
|
+
}, textToVisible?: string, hasDeploymentPermission?: boolean, businessId?: string): Promise<void>;
|
|
160
|
+
selectCluster(clusterName: string): Promise<void>;
|
|
161
|
+
clickViewProcessInstanceLink(): Promise<void>;
|
|
162
|
+
clickNameInput(): Promise<void>;
|
|
163
|
+
fillNamedInput(name: string): Promise<void>;
|
|
164
|
+
clickDiagramBreadcrumb(): Promise<void>;
|
|
165
|
+
private clickDiagramMenuTrigger;
|
|
166
|
+
clickEditDiagramNameButton(): Promise<void>;
|
|
167
|
+
enterDiagramName(name: string): Promise<void>;
|
|
168
|
+
private diagramNameEditorOpen;
|
|
169
|
+
clickVariableInput(): Promise<void>;
|
|
170
|
+
fillVariableInput(variable: string): Promise<void>;
|
|
171
|
+
clickEmbedFormButton(): Promise<void>;
|
|
172
|
+
clickEmbedButton(): Promise<void>;
|
|
173
|
+
clickNewForm(): Promise<void>;
|
|
174
|
+
clickDeploySubButton(): Promise<void>;
|
|
175
|
+
clickCancelButton(): Promise<void>;
|
|
176
|
+
private waitForVisible;
|
|
177
|
+
revealChangeElementTemplate(option: Locator, searchTerm: string): Promise<void>;
|
|
178
|
+
clickRestConnectorOption(): Promise<void>;
|
|
179
|
+
clickWebhookStartEventConnectorOption(): Promise<void>;
|
|
180
|
+
clickWebhookTab(): Promise<void>;
|
|
181
|
+
clickWebhookIsActiveButton(): Promise<void>;
|
|
182
|
+
assertThreeElementsVisible(): Promise<void>;
|
|
183
|
+
clickDeployButtonWithRetry(retries?: number): Promise<void>;
|
|
184
|
+
clickDeploySubButtonWithRetry(clusterName: string): Promise<void>;
|
|
185
|
+
clickCreateTask(): Promise<void>;
|
|
186
|
+
clickCreateEndEvent(): Promise<void>;
|
|
187
|
+
fitElementIntoCanvas(element: Locator, margin?: number, maxZoomOutSteps?: number): Promise<void>;
|
|
188
|
+
clickShapeBelowContextPad(element: Locator): Promise<void>;
|
|
189
|
+
clickCanvas(): Promise<void>;
|
|
190
|
+
clickEndEventCanvas(): Promise<void>;
|
|
191
|
+
clickConnectToOtherElementButton(): Promise<void>;
|
|
192
|
+
clickFirstPlacedElement(): Promise<void>;
|
|
193
|
+
clickSecondPlacedElement(): Promise<void>;
|
|
194
|
+
clickSecondElement(): Promise<void>;
|
|
195
|
+
private openAppendCreatePad;
|
|
196
|
+
clickAppendElementButton(): Promise<void>;
|
|
197
|
+
clickMarketPlaceButton(): Promise<void>;
|
|
198
|
+
private openChangeElementPopup;
|
|
199
|
+
clickPublicHolidayConnectorOption(): Promise<void>;
|
|
200
|
+
clickPublicHolidayYearOption(): Promise<void>;
|
|
201
|
+
fillPublicHolidayYearOption(year: string): Promise<void>;
|
|
202
|
+
clickPublicHolidayCountryCodeOption(): Promise<void>;
|
|
203
|
+
fillPublicHolidayCountryCodeOption(countryCode: string): Promise<void>;
|
|
204
|
+
chooseImplementationOption(implementationType: string): Promise<void>;
|
|
205
|
+
assertImplementationOption(implementationType: string): Promise<void>;
|
|
206
|
+
private expandImplementationOptionIfNecessary;
|
|
207
|
+
clickIntermediateBoundaryEvent(): Promise<void>;
|
|
208
|
+
clickIntermediateWebhookConnectorOption(): Promise<void>;
|
|
209
|
+
clickCorrelationKeyProcessInput(): Promise<void>;
|
|
210
|
+
fillCorrelationKeyProcessInput(correlationKeyProcess: string): Promise<void>;
|
|
211
|
+
clickCorrelationKeyPayloadInput(): Promise<void>;
|
|
212
|
+
fillCorrelationKeyPayloadInput(correlationKeyPayload: string): Promise<void>;
|
|
213
|
+
clickIdInput(): Promise<void>;
|
|
214
|
+
fillIdInput(id: string): Promise<void>;
|
|
215
|
+
fillStartFormName(name: string): Promise<void>;
|
|
216
|
+
fillStartFormDate(date: string): Promise<void>;
|
|
217
|
+
checkStartFormCheckbox(): Promise<void>;
|
|
218
|
+
fillStartFormNumber(number: string): Promise<void>;
|
|
219
|
+
chooseFormLinkingTypeOption(formLinkType: string): Promise<void>;
|
|
220
|
+
clickAppendGatewayButton(): Promise<void>;
|
|
221
|
+
clickParallelGatewayOption(): Promise<void>;
|
|
222
|
+
clickFirstPlacedGateway(): Promise<void>;
|
|
223
|
+
clickSecondPlacedGateway(userTaskId?: string): Promise<void>;
|
|
224
|
+
addParallelUserTasks(numberOfTasks: number, taskName: string): Promise<void>;
|
|
225
|
+
clickServiceTaskOption(): Promise<void>;
|
|
226
|
+
clickTaskDefinitionPropertiesPanel(): Promise<void>;
|
|
227
|
+
clickJobTypeInput(): Promise<void>;
|
|
228
|
+
fillJobTypeInput(name: string): Promise<void>;
|
|
229
|
+
private suppressTestModeAnnouncement;
|
|
230
|
+
switchToPlay(afterNavigation?: boolean): Promise<void>;
|
|
231
|
+
private selectPlayDeploySingleResource;
|
|
232
|
+
completePlayConfiguration(clusterName: string): Promise<void>;
|
|
233
|
+
embedForm(formName: string): Promise<void>;
|
|
234
|
+
openDetailsPanelIfCollapsed(): Promise<void>;
|
|
235
|
+
fillStartEventVariablesForDocHandling(zeebeUrl: string, zeebeClientId: string, zeebeClientSecret: string): Promise<void>;
|
|
236
|
+
private expandOutputMappingEntry;
|
|
237
|
+
fillZeebeClientId(clientId: string): Promise<void>;
|
|
238
|
+
fillZeebeSecretValue(zeebeSecret: string): Promise<void>;
|
|
239
|
+
fillZeebeRestValue(zeebeUrl: string): Promise<void>;
|
|
240
|
+
clickTimerEventOption(): Promise<void>;
|
|
241
|
+
clickTimerEventSettings(): Promise<void>;
|
|
242
|
+
selectTimerType(type: string): Promise<void>;
|
|
243
|
+
clickTimerValue(): Promise<void>;
|
|
244
|
+
fillTimerValue(value: string): Promise<void>;
|
|
245
|
+
clickEighthPlacedElement(): Promise<void>;
|
|
246
|
+
clickGlobalConnectToolButton(): Promise<void>;
|
|
247
|
+
linkFormToStartEvent(formName: string): Promise<void>;
|
|
248
|
+
expandPublicationSection(): Promise<void>;
|
|
249
|
+
enablePublicAccessIfDisabled(): Promise<void>;
|
|
250
|
+
clickPublicationTab(): Promise<void>;
|
|
251
|
+
clickCopyPublicLinkButton(): Promise<void>;
|
|
252
|
+
getPublicationLink(): Promise<string>;
|
|
253
|
+
assertFormEmbedded(): Promise<void>;
|
|
254
|
+
assertDiagramNameSet(diagramName: string): Promise<void>;
|
|
255
|
+
}
|
|
256
|
+
export { ModelerCreatePage };
|