@camunda/e2e-test-suite 0.0.1152 → 0.0.1154

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.
@@ -32,6 +32,7 @@ declare class OperateProcessInstancePage {
32
32
  private reenterViaConsole;
33
33
  reload(): Promise<boolean>;
34
34
  assertProcessCompleteStatusWithRetry(timeout?: number, maxRetries?: number): Promise<void>;
35
+ assertProcessVariableIsVisible(variableName: string, timeout?: number, maxRetries?: number): Promise<void>;
35
36
  assertProcessVariableContainsText(variableName: string, text: string): Promise<void>;
36
37
  assertProcessVariableHasDocumentCount(variableName: string, count: number, softFail?: boolean): Promise<void>;
37
38
  clickDiagramTask(taskName: string): Promise<void>;
@@ -797,6 +797,29 @@ class OperateProcessInstancePage {
797
797
  }
798
798
  }
799
799
  }
800
+ // Operate's Variables tab fetches the scope's variables once per page
801
+ // load and does not re-poll them — only the instance header and the
802
+ // diagram are polled. So when a slow connector job completes *after* the
803
+ // panel has already rendered (AWS Bedrock knowledge-base retrieval has
804
+ // been observed taking ~6 minutes), the header flips to COMPLETED while
805
+ // the Variables panel still shows the pre-completion snapshot
806
+ // ("The element has no variables") and the output variable never appears.
807
+ // Reload between attempts so each retry re-fetches the variables, the
808
+ // same recovery `assertProcessVariableContainsText` already uses.
809
+ async assertProcessVariableIsVisible(variableName, timeout = 30000, maxRetries = 3) {
810
+ for (let retries = 0; retries < maxRetries; retries++) {
811
+ try {
812
+ await (0, test_1.expect)(this.connectorResultVariableName(variableName)).toBeVisible({ timeout: timeout });
813
+ return;
814
+ }
815
+ catch (error) {
816
+ console.log(`Variable ${variableName} is not visible yet (attempt ${retries + 1}): ${error}`);
817
+ await this.page.reload();
818
+ await (0, sleep_1.sleep)(10000);
819
+ }
820
+ }
821
+ throw new Error(`Variable ${variableName} was not visible after ${maxRetries} attempts.`);
822
+ }
800
823
  async assertProcessVariableContainsText(variableName, text) {
801
824
  const maxRetries = 3;
802
825
  for (let retries = 0; retries < maxRetries; retries++) {
@@ -52,9 +52,16 @@ class NavigationPage {
52
52
  .and(page.locator(':not([href$="/login"])'))
53
53
  .or(page.locator('a').filter({ hasText: 'Camunda logoModeler' }))
54
54
  .first();
55
- this.tasklistPageBanner = page.getByRole('link', {
56
- name: 'Camunda logo Tasklist',
57
- });
55
+ // Tasklist renders the Design System header since the Carbon shell was
56
+ // deleted -- the logo is its own anchor (aria-label="Camunda logo", with
57
+ // an aria-hidden svg) and "Tasklist" moved into the breadcrumb nav, so
58
+ // the legacy shell's combined "Camunda logo Tasklist" name no longer
59
+ // exists. Match either shell so the banner resolves on both.
60
+ this.tasklistPageBanner = page
61
+ .getByRole('navigation', { name: 'Camunda context' })
62
+ .getByRole('link', { name: 'Tasklist', exact: true })
63
+ .or(page.getByRole('link', { name: 'Camunda logo Tasklist' }))
64
+ .first();
58
65
  this.optimizePageBanner = page.getByRole('link', {
59
66
  name: 'Camunda logo Optimize',
60
67
  });
@@ -21,9 +21,14 @@ class TaskPanelPage {
21
21
  this.filterOptions = page
22
22
  .locator('[aria-label="Filter controls"] li')
23
23
  .filter({ hasText: 'Expand to show filters' });
24
- this.tasklistBanner = page.getByRole('link', {
25
- name: 'Camunda logo Tasklist',
26
- });
24
+ // Same Design System header rollout NavigationPage.tasklistPageBanner
25
+ // covers: "Tasklist" is a breadcrumb link once the Carbon shell is gone,
26
+ // and "Camunda logo Tasklist" while it is still served.
27
+ this.tasklistBanner = page
28
+ .getByRole('navigation', { name: 'Camunda context' })
29
+ .getByRole('link', { name: 'Tasklist', exact: true })
30
+ .or(page.getByRole('link', { name: 'Camunda logo Tasklist' }))
31
+ .first();
27
32
  this.collapseFilter = page.locator('button[aria-controls="task-nav-bar"][aria-expanded="true"]');
28
33
  this.processesPageTab = page.getByRole('link', { name: 'Processes' });
29
34
  this.tasksTab = page.getByRole('link', { name: 'Tasks', exact: true });
@@ -106,7 +106,7 @@ _8_10_1.test.describe('AWS Connectors User Flows', () => {
106
106
  await operateProcessInstancePage.assertProcessCompleteStatusWithRetry();
107
107
  // Assert retrievedChunks variable is present and contains at least one
108
108
  // entry with a sourceUri (list with at least one entry containing a source URI)
109
- await (0, test_1.expect)(operateProcessInstancePage.connectorResultVariableName('retrievedChunks')).toBeVisible({ timeout: 30000 });
109
+ await operateProcessInstancePage.assertProcessVariableIsVisible('retrievedChunks');
110
110
  await operateProcessInstancePage.assertProcessVariableContainsText('retrievedChunks', 'sourceUri');
111
111
  });
112
112
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1152",
3
+ "version": "0.0.1154",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",