@camunda/e2e-test-suite 0.0.1508 → 0.0.1509

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.
@@ -169,7 +169,14 @@ class IdpCreatePage {
169
169
  });
170
170
  this.structured_SuccessfullPublishNotification =
171
171
  page.getByText('Template published');
172
- this.providerDropdown = page.getByRole('combobox', { name: 'Provider' });
172
+ // The design-system `SelectTrigger` the IDP dialogs now render carries
173
+ // `aria-labelledby` pointing at a `Label` that emits no matching `id`, so
174
+ // the trigger exposes no accessible name and a role+name query matches
175
+ // nothing. Target the trigger ids the dialogs set, keeping the role+name
176
+ // match for the Carbon variant.
177
+ this.providerDropdown = page
178
+ .locator('#idp-classification-project-provider-select, #idp-extraction-project-provider-select')
179
+ .or(page.getByRole('combobox', { name: 'Provider' }));
173
180
  this.idpClassificationAddDocumentTypeButton = page.locator('[data-test="add-document-type-empty"]');
174
181
  this.idpClassificationInvoiceTypeOption = page.getByRole('button', {
175
182
  name: 'Invoice Business invoices and',
@@ -188,17 +195,25 @@ class IdpCreatePage {
188
195
  this.classificationRunTestButton = page.getByRole('button', {
189
196
  name: 'Run Test',
190
197
  });
191
- this.classificationTestResultsPanel = page.locator('[data-test="test-template-tab-panel"]');
198
+ this.classificationTestResultsPanel = page.getByRole('tabpanel', {
199
+ name: 'Test template',
200
+ });
192
201
  this.classifyingLoader = page.getByText('Classifying...');
202
+ // Hub notifications render either as a Carbon alert or, once the
203
+ // design-system toast is on, as a sonner toast carrying no alert role.
204
+ const publishSuccessText = 'IDP project published successfully.';
193
205
  this.classificationSuccessfullPublishNotification = page
194
206
  .getByRole('alert')
195
- .filter({ hasText: 'IDP project published successfully.' });
207
+ .filter({ hasText: publishSuccessText })
208
+ .or(page
209
+ .locator('[data-sonner-toast]')
210
+ .filter({ hasText: publishSuccessText }));
196
211
  const modelResultsRegion = this.classificationTestResultsPanel.getByRole('region', { name: 'Model results' });
197
212
  this.classificationModelName = modelResultsRegion
198
- .locator('.cds--tile span[title]')
213
+ .locator('[data-slot="card-title"]')
199
214
  .first();
200
215
  this.classificationAccuracyValue = modelResultsRegion
201
- .locator('.cds--tile')
216
+ .locator('[data-slot="card-content"]')
202
217
  .first()
203
218
  .locator('span:has-text("Accuracy") + span');
204
219
  }
@@ -213,11 +228,20 @@ class IdpCreatePage {
213
228
  await this.idpExtractionTemplateName.fill(name);
214
229
  }
215
230
  async clickCreateIdpClassificationTemplateButton() {
216
- await this.createNewDropdownButton.click({ timeout: 60000 });
217
- await (0, test_1.expect)(this.createClassificationTemplateOption).toBeVisible({
218
- timeout: 10000,
219
- });
220
- await this.createClassificationTemplateOption.click({ timeout: 60000 });
231
+ for (let attempt = 0; attempt < 3; attempt++) {
232
+ await this.createNewDropdownButton.click({ timeout: 60000 });
233
+ try {
234
+ await (0, test_1.expect)(this.createClassificationTemplateOption).toBeVisible({
235
+ timeout: 10000,
236
+ });
237
+ await this.createClassificationTemplateOption.click({ timeout: 10000 });
238
+ return;
239
+ }
240
+ catch {
241
+ // menu did not open, or item detached before the click; retry
242
+ }
243
+ }
244
+ throw new Error('Failed to click create classification template option after 3 attempts');
221
245
  }
222
246
  async fillIdpClassificationTemplateName(name) {
223
247
  await this.idpClassificationTemplateName.fill(name);
@@ -464,10 +488,17 @@ class IdpCreatePage {
464
488
  await this.selectDocumentDropdown.click();
465
489
  }
466
490
  async selectDocumentTypeOption(documentType) {
467
- const option = this.page
468
- .locator('[data-test="test-template-tab-panel"]')
469
- .getByText(new RegExp(`^${documentType}$`));
470
- await (0, test_1.expect)(option).toBeVisible();
491
+ // The upload surface is a design-system `Dialog` holding a Carbon
492
+ // dropdown: its listbox renders outside
493
+ // `[data-test="test-template-tab-panel"]`, and the page snapshot at
494
+ // failure shows the listbox as a top-level node with no `dialog` ancestor
495
+ // to scope to. The modal hides the rest of the page from the a11y tree,
496
+ // so the option name alone identifies it.
497
+ const option = this.page.getByRole('option', {
498
+ name: documentType,
499
+ exact: true,
500
+ });
501
+ await (0, test_1.expect)(option).toBeVisible({ timeout: 30000 });
471
502
  await option.click();
472
503
  }
473
504
  async clickSelectFilesButton() {
@@ -500,8 +531,14 @@ class IdpCreatePage {
500
531
  await (0, test_1.expect)(this.classificationSuccessfullPublishNotification).toBeVisible();
501
532
  }
502
533
  async selectProvider(provider) {
534
+ await (0, test_1.expect)(this.providerDropdown).toBeVisible({ timeout: 60000 });
503
535
  await (0, test_1.expect)(async () => {
504
- await this.providerDropdown.click({ timeout: 10000 });
536
+ // The dialog can hand the trigger an already-open listbox; clicking it
537
+ // then closes the menu instead of opening it.
538
+ const isExpanded = (await this.providerDropdown.getAttribute('aria-expanded')) === 'true';
539
+ if (!isExpanded) {
540
+ await this.providerDropdown.click({ timeout: 10000 });
541
+ }
505
542
  await (0, test_1.expect)(this.providerDropdown).toHaveAttribute('aria-expanded', 'true', { timeout: 5000 });
506
543
  }).toPass({ timeout: 60000 });
507
544
  const providerOption = this.page
@@ -188,17 +188,25 @@ class IdpCreatePage {
188
188
  this.classificationRunTestButton = page.getByRole('button', {
189
189
  name: 'Run Test',
190
190
  });
191
- this.classificationTestResultsPanel = page.locator('[data-test="test-template-tab-panel"]');
191
+ this.classificationTestResultsPanel = page.getByRole('tabpanel', {
192
+ name: 'Test template',
193
+ });
192
194
  this.classifyingLoader = page.getByText('Classifying...');
195
+ // Hub notifications render either as a Carbon alert or, once the
196
+ // design-system toast is on, as a sonner toast carrying no alert role.
197
+ const publishSuccessText = 'IDP project published successfully.';
193
198
  this.classificationSuccessfullPublishNotification = page
194
199
  .getByRole('alert')
195
- .filter({ hasText: 'IDP project published successfully.' });
200
+ .filter({ hasText: publishSuccessText })
201
+ .or(page
202
+ .locator('[data-sonner-toast]')
203
+ .filter({ hasText: publishSuccessText }));
196
204
  const modelResultsRegion = this.classificationTestResultsPanel.getByRole('region', { name: 'Model results' });
197
205
  this.classificationModelName = modelResultsRegion
198
- .locator('.cds--tile span[title]')
206
+ .locator('[data-slot="card-title"]')
199
207
  .first();
200
208
  this.classificationAccuracyValue = modelResultsRegion
201
- .locator('.cds--tile')
209
+ .locator('[data-slot="card-content"]')
202
210
  .first()
203
211
  .locator('span:has-text("Accuracy") + span');
204
212
  }
@@ -213,11 +221,19 @@ class IdpCreatePage {
213
221
  await this.idpExtractionTemplateName.fill(name);
214
222
  }
215
223
  async clickCreateIdpClassificationTemplateButton() {
216
- await this.createNewDropdownButton.click({ timeout: 60000 });
217
- await (0, test_1.expect)(this.createClassificationTemplateOption).toBeVisible({
218
- timeout: 10000,
219
- });
220
- await this.createClassificationTemplateOption.click({ timeout: 60000 });
224
+ // The IDP application page is still settling right after creation, and a
225
+ // click that lands during that remount either leaves the dropdown shut or
226
+ // detaches the item mid-click. Reopen and re-click until the create
227
+ // dialog is actually up.
228
+ await (0, test_1.expect)(async () => {
229
+ if (!(await this.createClassificationTemplateOption.isVisible())) {
230
+ await this.createNewDropdownButton.click({ timeout: 10000 });
231
+ }
232
+ await this.createClassificationTemplateOption.click({ timeout: 10000 });
233
+ await (0, test_1.expect)(this.idpClassificationTemplateName).toBeVisible({
234
+ timeout: 10000,
235
+ });
236
+ }).toPass({ timeout: 90000 });
221
237
  }
222
238
  async fillIdpClassificationTemplateName(name) {
223
239
  await this.idpClassificationTemplateName.fill(name);
@@ -464,10 +480,17 @@ class IdpCreatePage {
464
480
  await this.selectDocumentDropdown.click();
465
481
  }
466
482
  async selectDocumentTypeOption(documentType) {
483
+ // The document-type list renders in a portal outside the tab panel, so it
484
+ // has to be reached through the listbox rather than the panel subtree.
467
485
  const option = this.page
468
- .locator('[data-test="test-template-tab-panel"]')
469
- .getByText(new RegExp(`^${documentType}$`));
470
- await (0, test_1.expect)(option).toBeVisible();
486
+ .locator('[role="listbox"] [role="option"]')
487
+ .filter({ hasText: new RegExp(`^${documentType}$`) });
488
+ await (0, test_1.expect)(async () => {
489
+ if (!(await option.isVisible())) {
490
+ await this.selectDocumentDropdown.click({ timeout: 10000 });
491
+ }
492
+ await (0, test_1.expect)(option).toBeVisible({ timeout: 5000 });
493
+ }).toPass({ timeout: 60000 });
471
494
  await option.click();
472
495
  }
473
496
  async clickSelectFilesButton() {
@@ -500,14 +523,18 @@ class IdpCreatePage {
500
523
  await (0, test_1.expect)(this.classificationSuccessfullPublishNotification).toBeVisible();
501
524
  }
502
525
  async selectProvider(provider) {
503
- await (0, test_1.expect)(async () => {
504
- await this.providerDropdown.click({ timeout: 10000 });
505
- await (0, test_1.expect)(this.providerDropdown).toHaveAttribute('aria-expanded', 'true', { timeout: 5000 });
506
- }).toPass({ timeout: 60000 });
507
526
  const providerOption = this.page
508
527
  .locator('[role="listbox"] [role="option"]')
509
528
  .filter({ hasText: new RegExp(`^${provider}$`) });
510
- await (0, test_1.expect)(providerOption).toBeVisible({ timeout: 120000 });
529
+ // The dialog subtree is marked aria-hidden while the listbox is open, so
530
+ // the trigger stops matching its role once expanded. Confirm the open
531
+ // state on the portalled listbox rather than re-querying the trigger.
532
+ await (0, test_1.expect)(async () => {
533
+ if (!(await providerOption.isVisible())) {
534
+ await this.providerDropdown.click({ timeout: 10000 });
535
+ }
536
+ await (0, test_1.expect)(providerOption).toBeVisible({ timeout: 5000 });
537
+ }).toPass({ timeout: 60000 });
511
538
  await providerOption.click({ timeout: 120000 });
512
539
  }
513
540
  }
@@ -1109,12 +1109,21 @@ class ModelerHomePage {
1109
1109
  const baseClusterName = clusterName.split('(')[0].trim();
1110
1110
  // With Hub's Environments feature on (camunda-hub#29210) the IDP create
1111
1111
  // dialog picks an Environment row instead of a cluster toggle.
1112
- const hasEnvironmentRow = await this.becameVisible(this.dialog.locator('[data-test^="environment-row-"]').first(), 10000);
1113
- if (hasEnvironmentRow) {
1112
+ const environmentRow = this.dialog
1113
+ .locator('[data-test^="environment-row-"]')
1114
+ .first();
1115
+ const cluster = this.dialog.getByText(new RegExp(`^${baseClusterName}`));
1116
+ // The workspace's environments can still be loading when the dialog opens,
1117
+ // and an empty list is indistinguishable from the pre-Environments shape.
1118
+ // Wait for whichever renders first so a slow load does not take the legacy
1119
+ // branch and then fail on a cluster row that was never going to appear.
1120
+ await (0, test_1.expect)(environmentRow.or(cluster).first()).toBeVisible({
1121
+ timeout: 60000,
1122
+ });
1123
+ if (await environmentRow.isVisible()) {
1114
1124
  await (0, modelerCluster_1.selectDeployEnvironment)(this.dialog, baseClusterName);
1115
1125
  return;
1116
1126
  }
1117
- const cluster = this.dialog.getByText(new RegExp(`^${baseClusterName}`));
1118
1127
  await (0, test_1.expect)(cluster).toBeVisible({
1119
1128
  timeout: 30000,
1120
1129
  });
@@ -195,17 +195,25 @@ class IdpCreatePage {
195
195
  this.classificationRunTestButton = page.getByRole('button', {
196
196
  name: 'Run Test',
197
197
  });
198
- this.classificationTestResultsPanel = page.locator('[data-test="test-template-tab-panel"]');
198
+ this.classificationTestResultsPanel = page.getByRole('tabpanel', {
199
+ name: 'Test template',
200
+ });
199
201
  this.classifyingLoader = page.getByText('Classifying...');
202
+ // Hub notifications render either as a Carbon alert or, once the
203
+ // design-system toast is on, as a sonner toast carrying no alert role.
204
+ const publishSuccessText = 'IDP project published successfully.';
200
205
  this.classificationSuccessfullPublishNotification = page
201
206
  .getByRole('alert')
202
- .filter({ hasText: 'IDP project published successfully.' });
207
+ .filter({ hasText: publishSuccessText })
208
+ .or(page
209
+ .locator('[data-sonner-toast]')
210
+ .filter({ hasText: publishSuccessText }));
203
211
  const modelResultsRegion = this.classificationTestResultsPanel.getByRole('region', { name: 'Model results' });
204
212
  this.classificationModelName = modelResultsRegion
205
- .locator('.cds--tile span[title]')
213
+ .locator('[data-slot="card-title"]')
206
214
  .first();
207
215
  this.classificationAccuracyValue = modelResultsRegion
208
- .locator('.cds--tile')
216
+ .locator('[data-slot="card-content"]')
209
217
  .first()
210
218
  .locator('span:has-text("Accuracy") + span');
211
219
  }
@@ -503,9 +511,11 @@ class IdpCreatePage {
503
511
  await this.selectDocumentDropdown.click();
504
512
  }
505
513
  async selectDocumentTypeOption(documentType) {
514
+ // The document-type listbox renders in a portal outside the tab panel,
515
+ // so scope the option to the open listbox rather than to the panel.
506
516
  const option = this.page
507
- .locator('[data-test="test-template-tab-panel"]')
508
- .getByText(new RegExp(`^${documentType}$`));
517
+ .locator('[role="listbox"] [role="option"]')
518
+ .filter({ hasText: new RegExp(`^${documentType}$`) });
509
519
  await (0, test_1.expect)(option).toBeVisible();
510
520
  await option.click();
511
521
  }
@@ -541,13 +551,19 @@ class IdpCreatePage {
541
551
  await (0, test_1.expect)(this.classificationSuccessfullPublishNotification).toBeVisible({ timeout: 120000 });
542
552
  }
543
553
  async selectProvider(provider) {
554
+ // While the provider listbox is open the dialog subtree is aria-hidden, so
555
+ // the combobox drops out of the accessibility tree and role locators stop
556
+ // resolving it. Gate the retry on the listbox instead of the combobox.
557
+ const providerOptions = this.page.locator('[role="listbox"] [role="option"]');
544
558
  await (0, test_1.expect)(async () => {
545
- await this.providerDropdown.click({ timeout: 10000 });
546
- await (0, test_1.expect)(this.providerDropdown).toHaveAttribute('aria-expanded', 'true', { timeout: 5000 });
559
+ if ((await providerOptions.count()) === 0) {
560
+ await this.providerDropdown.click({ timeout: 10000 });
561
+ }
562
+ await (0, test_1.expect)(providerOptions.first()).toBeVisible({ timeout: 5000 });
547
563
  }).toPass({ timeout: 60000 });
548
- const providerOption = this.page
549
- .locator('[role="listbox"] [role="option"]')
550
- .filter({ hasText: new RegExp(`^${provider}$`) });
564
+ const providerOption = providerOptions.filter({
565
+ hasText: new RegExp(`^${provider}$`),
566
+ });
551
567
  await (0, test_1.expect)(providerOption).toBeVisible({ timeout: 120000 });
552
568
  await providerOption.click({ timeout: 120000 });
553
569
  }
@@ -53,7 +53,7 @@ const structuredTestCases = [
53
53
  const classificationTestCases = [
54
54
  {
55
55
  provider: 'AWS',
56
- model: 'Claude Sonnet 4',
56
+ model: 'Claude Sonnet 4.6',
57
57
  uploadFiles: ['idp/idp_sample_bank_statement.pdf'],
58
58
  },
59
59
  ];
@@ -234,8 +234,7 @@ _8_10_1.test.describe('IDP User Flow Tests', () => {
234
234
  });
235
235
  _8_10_1.test.describe('Classification Template', () => {
236
236
  for (const params of classificationTestCases) {
237
- // Skipped due to bug #29644: https://github.com/camunda/camunda-hub/issues/29644
238
- _8_10_1.test.skip(`${params.provider} classification - User creates an idp application with a classification template`, async ({ page, idpCreatePage, modelerHomePage, homePage, appsPage, clusterPage, clusterSecretsPage, }) => {
237
+ (0, _8_10_1.test)(`${params.provider} classification - User creates an idp application with a classification template`, async ({ page, idpCreatePage, modelerHomePage, homePage, appsPage, clusterPage, clusterSecretsPage, }) => {
239
238
  _8_10_1.test.slow();
240
239
  const idpApplicationName = await (0, randomName_1.randomNameAgregator)(`${params.provider} classification` + ' - IDP_Application_Name');
241
240
  const idpClassificationTemplateName = await (0, randomName_1.randomNameAgregator)(`${params.provider} classification` +
@@ -146,8 +146,7 @@ _8_11_1.test.describe('Agentic Orchestation User Flows', () => {
146
146
  });
147
147
  _8_11_1.test.describe('AI Agent sub process - provider user tests flow', () => {
148
148
  for (const params of aiAgentSubProcessTestCases) {
149
- // Skipped due to bug #8490: https://github.com/camunda/connectors/issues/8490
150
- _8_11_1.test.skip(`AI agent sub process with tools provides feedback to user - ${params.provider}`, async ({ appsPage, operateHomePage, operateProcessInstancePage, operateProcessesPage, taskPanelPage, taskDetailsPage, }) => {
149
+ (0, _8_11_1.test)(`AI agent sub process with tools provides feedback to user - ${params.provider}`, async ({ appsPage, operateHomePage, operateProcessInstancePage, operateProcessesPage, taskPanelPage, taskDetailsPage, }) => {
151
150
  _8_11_1.test.slow();
152
151
  const processKey = await (0, apiHelpers_1.deployProcess)(params.bpmnPath, authToken);
153
152
  if (processKey == null) {
@@ -53,7 +53,7 @@ const structuredTestCases = [
53
53
  const classificationTestCases = [
54
54
  {
55
55
  provider: 'AWS',
56
- model: 'Claude Sonnet 4',
56
+ model: 'Claude Sonnet 4.6',
57
57
  uploadFiles: ['idp/idp_sample_bank_statement.pdf'],
58
58
  },
59
59
  ];
@@ -234,8 +234,7 @@ _8_11_1.test.describe('IDP User Flow Tests', () => {
234
234
  });
235
235
  _8_11_1.test.describe('Classification Template', () => {
236
236
  for (const params of classificationTestCases) {
237
- // Skipped due to bug #29644: https://github.com/camunda/camunda-hub/issues/29644
238
- _8_11_1.test.skip(`${params.provider} classification - User creates an idp application with a classification template`, async ({ page, idpCreatePage, modelerHomePage, homePage, appsPage, clusterPage, clusterSecretsPage, }) => {
237
+ (0, _8_11_1.test)(`${params.provider} classification - User creates an idp application with a classification template`, async ({ page, idpCreatePage, modelerHomePage, homePage, appsPage, clusterPage, clusterSecretsPage, }) => {
239
238
  _8_11_1.test.slow();
240
239
  const idpApplicationName = await (0, randomName_1.randomNameAgregator)(`${params.provider} classification` + ' - IDP_Application_Name');
241
240
  const idpClassificationTemplateName = await (0, randomName_1.randomNameAgregator)(`${params.provider} classification` +
@@ -53,7 +53,7 @@ const structuredTestCases = [
53
53
  const classificationTestCases = [
54
54
  {
55
55
  provider: 'AWS',
56
- model: 'Claude Sonnet 4',
56
+ model: 'Claude Sonnet 4.6',
57
57
  uploadFiles: ['idp/idp_sample_bank_statement.pdf'],
58
58
  },
59
59
  ];
@@ -237,8 +237,7 @@ _8_9_1.test.describe('IDP User Flow Tests', () => {
237
237
  });
238
238
  _8_9_1.test.describe('Classification Template', () => {
239
239
  for (const params of classificationTestCases) {
240
- // Skipped due to bug #29644: https://github.com/camunda/camunda-hub/issues/29644
241
- _8_9_1.test.skip(`${params.provider} classification - User creates an idp application with a classification template`, async ({ page, idpCreatePage, modelerHomePage, homePage, appsPage, clusterPage, clusterSecretsPage, }) => {
240
+ (0, _8_9_1.test)(`${params.provider} classification - User creates an idp application with a classification template`, async ({ page, idpCreatePage, modelerHomePage, homePage, appsPage, clusterPage, clusterSecretsPage, }) => {
242
241
  _8_9_1.test.slow();
243
242
  const idpApplicationName = await (0, randomName_1.randomNameAgregator)(`${params.provider} classification` + ' - IDP_Application_Name');
244
243
  const idpClassificationTemplateName = await (0, randomName_1.randomNameAgregator)(`${params.provider} classification` +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1508",
3
+ "version": "0.0.1509",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",