@camunda/e2e-test-suite 0.0.142 → 0.0.144

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.
Files changed (29) hide show
  1. package/dist/fixtures/c8Run-8.7.d.ts +4 -0
  2. package/dist/fixtures/c8Run-8.7.js +8 -0
  3. package/dist/pages/c8Run-8.7/IdentityHomePage.d.ts +23 -0
  4. package/dist/pages/c8Run-8.7/IdentityHomePage.js +98 -0
  5. package/dist/pages/c8Run-8.7/IdentityLoginPage.d.ts +15 -0
  6. package/dist/pages/c8Run-8.7/IdentityLoginPage.js +46 -0
  7. package/dist/pages/c8Run-8.7/OperateHomePage.d.ts +1 -0
  8. package/dist/pages/c8Run-8.7/OperateHomePage.js +18 -2
  9. package/dist/pages/c8Run-8.7/OperateLoginPage.d.ts +1 -0
  10. package/dist/pages/c8Run-8.7/OperateLoginPage.js +16 -7
  11. package/dist/pages/c8Run-8.7/OperateProcessesPage.js +4 -2
  12. package/dist/pages/c8Run-8.7/TaskDetailsPage.js +3 -1
  13. package/dist/pages/c8Run-8.7/TaskListLoginPage.d.ts +1 -0
  14. package/dist/pages/c8Run-8.7/TaskListLoginPage.js +16 -7
  15. package/dist/pages/c8Run-8.7/TaskPanelPage.js +6 -1
  16. package/dist/pages/c8Run-8.7/UtilitiesPage.d.ts +4 -1
  17. package/dist/pages/c8Run-8.7/UtilitiesPage.js +45 -5
  18. package/dist/tests/8.9/navigation.spec.js +2 -1
  19. package/dist/tests/8.9/smoke-tests.spec.js +2 -1
  20. package/dist/tests/c8Run-8.7/api-tests.spec.js +22 -62
  21. package/dist/tests/c8Run-8.7/connectors-api-tests.spec-docker.d.ts +1 -0
  22. package/dist/tests/c8Run-8.7/connectors-api-tests.spec-docker.js +48 -0
  23. package/dist/tests/c8Run-8.7/connectors-user-flows.spec.js +2 -4
  24. package/dist/tests/c8Run-8.7/hto-user-flows.spec.js +1 -8
  25. package/dist/tests/c8Run-8.7/operate-api-tests-docker.spec.d.ts +1 -0
  26. package/dist/tests/c8Run-8.7/operate-api-tests-docker.spec.js +107 -0
  27. package/dist/tests/c8Run-8.7/tasklist-api-tests-docker.spec.d.ts +1 -0
  28. package/dist/tests/c8Run-8.7/tasklist-api-tests-docker.spec.js +77 -0
  29. package/package.json +1 -1
@@ -6,6 +6,8 @@ import { TaskListLoginPage } from '../pages/c8Run-8.7/TaskListLoginPage';
6
6
  import { OperateProcessesPage } from '../pages/c8Run-8.7/OperateProcessesPage';
7
7
  import { OperateProcessInstancePage } from '../pages/c8Run-8.7/OperateProcessInstancePage';
8
8
  import { TaskDetailsPage } from '../pages/c8Run-8.7/TaskDetailsPage';
9
+ import { IdentityHomePage } from '../pages/c8Run-8.7/IdentityHomePage';
10
+ import { IdentityLoginPage } from '../pages/c8Run-8.7/IdentityLoginPage';
9
11
  type PlaywrightFixtures = {
10
12
  makeAxeBuilder: () => AxeBuilder;
11
13
  operateLoginPage: OperateLoginPage;
@@ -15,6 +17,8 @@ type PlaywrightFixtures = {
15
17
  operateProcessesPage: OperateProcessesPage;
16
18
  operateProcessInstancePage: OperateProcessInstancePage;
17
19
  taskDetailsPage: TaskDetailsPage;
20
+ identityHomePage: IdentityHomePage;
21
+ identityLoginPage: IdentityLoginPage;
18
22
  };
19
23
  declare const test: import("@playwright/test").TestType<import("@playwright/test").PlaywrightTestArgs & import("@playwright/test").PlaywrightTestOptions & PlaywrightFixtures, import("@playwright/test").PlaywrightWorkerArgs & import("@playwright/test").PlaywrightWorkerOptions>;
20
24
  export { test };
@@ -20,6 +20,8 @@ const TaskListLoginPage_1 = require("../pages/c8Run-8.7/TaskListLoginPage");
20
20
  const OperateProcessesPage_1 = require("../pages/c8Run-8.7/OperateProcessesPage");
21
21
  const OperateProcessInstancePage_1 = require("../pages/c8Run-8.7/OperateProcessInstancePage");
22
22
  const TaskDetailsPage_1 = require("../pages/c8Run-8.7/TaskDetailsPage");
23
+ const IdentityHomePage_1 = require("../pages/c8Run-8.7/IdentityHomePage");
24
+ const IdentityLoginPage_1 = require("../pages/c8Run-8.7/IdentityLoginPage");
23
25
  const test = test_1.test.extend({
24
26
  makeAxeBuilder: async ({ page }, use) => {
25
27
  const makeAxeBuilder = () => new playwright_1.default({ page }).withTags([
@@ -52,5 +54,11 @@ const test = test_1.test.extend({
52
54
  taskDetailsPage: async ({ page }, use) => {
53
55
  await use(new TaskDetailsPage_1.TaskDetailsPage(page));
54
56
  },
57
+ identityHomePage: async ({ page }, use) => {
58
+ await use(new IdentityHomePage_1.IdentityHomePage(page));
59
+ },
60
+ identityLoginPage: async ({ page }, use) => {
61
+ await use(new IdentityLoginPage_1.IdentityLoginPage(page));
62
+ },
55
63
  });
56
64
  exports.test = test;
@@ -0,0 +1,23 @@
1
+ import { Page, Locator } from '@playwright/test';
2
+ declare class IdentityHomePage {
3
+ private page;
4
+ readonly identityBanner: Locator;
5
+ readonly tasklistCell: Locator;
6
+ readonly operateCell: Locator;
7
+ readonly connectorsCell: Locator;
8
+ readonly accessToAPIsTab: Locator;
9
+ readonly writePermissionCell: Locator;
10
+ readonly readPermissionCell: Locator;
11
+ readonly assignPermissionsButton: Locator;
12
+ readonly dialog: Locator;
13
+ readonly writePermissionCheckBox: Locator;
14
+ readonly readPermissionCheckBox: Locator;
15
+ readonly addButton: Locator;
16
+ readonly permissionCell: (name: string) => Locator;
17
+ readonly select: Locator;
18
+ constructor(page: Page);
19
+ assignPermissionToTasklistAPI(): Promise<void>;
20
+ assignPermissionToOperateAPI(): Promise<void>;
21
+ selectOptionFromDropdown(option: string): Promise<void>;
22
+ }
23
+ export { IdentityHomePage };
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IdentityHomePage = void 0;
4
+ const test_1 = require("@playwright/test");
5
+ const sleep_1 = require("../../utils/sleep");
6
+ const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLocatorWithRetry");
7
+ class IdentityHomePage {
8
+ page;
9
+ identityBanner;
10
+ tasklistCell;
11
+ operateCell;
12
+ connectorsCell;
13
+ accessToAPIsTab;
14
+ writePermissionCell;
15
+ readPermissionCell;
16
+ assignPermissionsButton;
17
+ dialog;
18
+ writePermissionCheckBox;
19
+ readPermissionCheckBox;
20
+ addButton;
21
+ permissionCell;
22
+ select;
23
+ constructor(page) {
24
+ this.page = page;
25
+ this.identityBanner = page.getByRole('link', {
26
+ name: 'Camunda logo Identity',
27
+ });
28
+ this.accessToAPIsTab = page.getByRole('tab', { name: 'Access to APIs' });
29
+ this.writePermissionCell = page.getByRole('cell', { name: 'write:*' });
30
+ this.readPermissionCell = page.getByRole('cell', { name: 'read:*' });
31
+ this.assignPermissionsButton = page.getByRole('button', {
32
+ name: 'Assign permissions',
33
+ });
34
+ this.dialog = page.getByRole('dialog');
35
+ this.writePermissionCheckBox = page
36
+ .locator('label')
37
+ .filter({ hasText: 'write:* (Write permission)' });
38
+ this.readPermissionCheckBox = page
39
+ .locator('label')
40
+ .filter({ hasText: 'read:*' });
41
+ this.addButton = page.getByRole('button', { name: 'Add' });
42
+ this.permissionCell = (name) => page.getByRole('cell', { name: name });
43
+ this.tasklistCell = this.permissionCell('Tasklist');
44
+ this.operateCell = this.permissionCell('Operate');
45
+ this.connectorsCell = this.permissionCell('Connectors');
46
+ this.select = this.page.locator('select');
47
+ }
48
+ async assignPermissionToTasklistAPI() {
49
+ await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, this.tasklistCell);
50
+ await this.tasklistCell.click();
51
+ await this.accessToAPIsTab.click();
52
+ await (0, sleep_1.sleep)(2000);
53
+ if ((await this.writePermissionCell.isVisible()) &&
54
+ (await this.readPermissionCell.isVisible())) {
55
+ console.log('Permissions already assigned to Tasklist API');
56
+ }
57
+ else {
58
+ await this.assignPermissionsButton.click();
59
+ await this.selectOptionFromDropdown('Tasklist API');
60
+ await (0, test_1.expect)(this.dialog).toBeVisible();
61
+ await this.writePermissionCheckBox.click();
62
+ await this.readPermissionCheckBox.click();
63
+ await this.addButton.click();
64
+ await (0, test_1.expect)(this.permissionCell('write:*')).toBeVisible();
65
+ await (0, test_1.expect)(this.permissionCell('read:*')).toBeVisible();
66
+ await (0, sleep_1.sleep)(5000);
67
+ }
68
+ }
69
+ async assignPermissionToOperateAPI() {
70
+ await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, this.operateCell);
71
+ await this.operateCell.click();
72
+ await this.accessToAPIsTab.click();
73
+ await (0, sleep_1.sleep)(2000);
74
+ if ((await this.writePermissionCell.isVisible()) &&
75
+ (await this.readPermissionCell.isVisible())) {
76
+ console.log('Permissions already assigned to Operate API');
77
+ }
78
+ else {
79
+ await this.assignPermissionsButton.click();
80
+ await this.selectOptionFromDropdown('Operate API');
81
+ await (0, test_1.expect)(this.dialog).toBeVisible();
82
+ await this.writePermissionCheckBox.click();
83
+ await this.readPermissionCheckBox.click();
84
+ await this.addButton.click();
85
+ await (0, test_1.expect)(this.permissionCell('write:*')).toBeVisible();
86
+ await (0, test_1.expect)(this.permissionCell('read:*')).toBeVisible();
87
+ await (0, sleep_1.sleep)(5000);
88
+ }
89
+ }
90
+ async selectOptionFromDropdown(option) {
91
+ await this.select.click();
92
+ await this.select.selectOption({
93
+ label: option,
94
+ });
95
+ await (0, sleep_1.sleep)(1000);
96
+ }
97
+ }
98
+ exports.IdentityHomePage = IdentityHomePage;
@@ -0,0 +1,15 @@
1
+ import { Page, Locator } from '@playwright/test';
2
+ declare class IdentityLoginPage {
3
+ private page;
4
+ readonly usernameInput: Locator;
5
+ readonly passwordInput: Locator;
6
+ readonly loginButton: Locator;
7
+ readonly backupLogin: Locator;
8
+ constructor(page: Page);
9
+ fillUsername(username: string): Promise<void>;
10
+ clickUsername(): Promise<void>;
11
+ fillPassword(password: string): Promise<void>;
12
+ clickLoginButton(): Promise<void>;
13
+ login(username: string, password: string): Promise<void>;
14
+ }
15
+ export { IdentityLoginPage };
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IdentityLoginPage = void 0;
4
+ const test_1 = require("@playwright/test");
5
+ class IdentityLoginPage {
6
+ page;
7
+ usernameInput;
8
+ passwordInput;
9
+ loginButton;
10
+ backupLogin;
11
+ constructor(page) {
12
+ this.page = page;
13
+ this.usernameInput = page.getByLabel('Username');
14
+ this.passwordInput = page.getByRole('textbox', { name: 'password' });
15
+ this.loginButton = page.getByRole('button', { name: 'Login' });
16
+ this.backupLogin = page.getByRole('button', { name: 'Log in' });
17
+ }
18
+ async fillUsername(username) {
19
+ await this.usernameInput.fill(username);
20
+ }
21
+ async clickUsername() {
22
+ await this.usernameInput.click({ timeout: 60000 });
23
+ }
24
+ async fillPassword(password) {
25
+ await this.passwordInput.fill(password);
26
+ }
27
+ async clickLoginButton() {
28
+ const login = this.loginButton.or(this.backupLogin).first();
29
+ await (0, test_1.expect)(login).toBeVisible({ timeout: 60000 });
30
+ await login.click({ timeout: 60000 });
31
+ }
32
+ async login(username, password) {
33
+ try {
34
+ await (0, test_1.expect)(this.usernameInput).toBeVisible();
35
+ await (0, test_1.expect)(this.passwordInput).toBeVisible();
36
+ await this.clickUsername();
37
+ await this.fillUsername(username);
38
+ await this.fillPassword(password);
39
+ await this.clickLoginButton();
40
+ }
41
+ catch (error) {
42
+ await (0, test_1.expect)(this.page.getByRole('link', { name: 'Camunda logo Identity' })).toBeVisible();
43
+ }
44
+ }
45
+ }
46
+ exports.IdentityLoginPage = IdentityLoginPage;
@@ -8,6 +8,7 @@ declare class OperateHomePage {
8
8
  readonly variableValueInput: Locator;
9
9
  readonly saveVariableButton: Locator;
10
10
  readonly editVariableSpinner: Locator;
11
+ readonly processPageHeading: Locator;
11
12
  constructor(page: Page);
12
13
  operateBannerIsVisible(): Promise<void>;
13
14
  clickProcessesTab(): Promise<void>;
@@ -2,6 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OperateHomePage = void 0;
4
4
  const test_1 = require("@playwright/test");
5
+ const clickLocatorWithRetry_1 = require("../../utils/assertionHelpers/clickLocatorWithRetry");
6
+ const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLocatorWithRetry");
5
7
  class OperateHomePage {
6
8
  page;
7
9
  operateBanner;
@@ -11,6 +13,7 @@ class OperateHomePage {
11
13
  variableValueInput;
12
14
  saveVariableButton;
13
15
  editVariableSpinner;
16
+ processPageHeading;
14
17
  constructor(page) {
15
18
  this.page = page;
16
19
  this.operateBanner = page.getByRole('link', { name: 'Camunda logo Operate' });
@@ -25,12 +28,25 @@ class OperateHomePage {
25
28
  .getByTestId('variable-operation-spinner')
26
29
  .locator('circle')
27
30
  .nth(1);
31
+ this.processPageHeading = page
32
+ .getByTestId('expanded-panel')
33
+ .getByRole('heading', { name: 'Process' });
28
34
  }
29
35
  async operateBannerIsVisible() {
30
- await (0, test_1.expect)(this.operateBanner).toBeVisible();
36
+ await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, this.operateBanner, {
37
+ postAction: async () => {
38
+ await this.page.reload();
39
+ },
40
+ });
31
41
  }
32
42
  async clickProcessesTab() {
33
- await this.processesTab.click();
43
+ await (0, clickLocatorWithRetry_1.clickLocatorWithRetry)(this.page, this.processesTab);
44
+ await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, this.processPageHeading, {
45
+ preAction: async () => {
46
+ await (0, test_1.expect)(this.processesTab).toBeVisible({ timeout: 10000 });
47
+ await this.processesTab.click({ timeout: 10000 });
48
+ },
49
+ });
34
50
  }
35
51
  async clickEditVariableButton(variableName) {
36
52
  const editVariableButton = 'Edit variable ' + variableName;
@@ -4,6 +4,7 @@ declare class OperateLoginPage {
4
4
  readonly usernameInput: Locator;
5
5
  readonly passwordInput: Locator;
6
6
  readonly loginButton: Locator;
7
+ readonly backupLogin: Locator;
7
8
  constructor(page: Page);
8
9
  fillUsername(username: string): Promise<void>;
9
10
  clickUsername(): Promise<void>;
@@ -7,11 +7,13 @@ class OperateLoginPage {
7
7
  usernameInput;
8
8
  passwordInput;
9
9
  loginButton;
10
+ backupLogin;
10
11
  constructor(page) {
11
12
  this.page = page;
12
13
  this.usernameInput = page.getByLabel('Username');
13
14
  this.passwordInput = page.getByRole('textbox', { name: 'password' });
14
15
  this.loginButton = page.getByRole('button', { name: 'Login' });
16
+ this.backupLogin = page.getByRole('button', { name: 'Log in' });
15
17
  }
16
18
  async fillUsername(username) {
17
19
  await this.usernameInput.fill(username);
@@ -23,15 +25,22 @@ class OperateLoginPage {
23
25
  await this.passwordInput.fill(password);
24
26
  }
25
27
  async clickLoginButton() {
26
- await this.loginButton.click({ timeout: 60000 });
28
+ const login = this.loginButton.or(this.backupLogin).first();
29
+ await (0, test_1.expect)(login).toBeVisible({ timeout: 60000 });
30
+ await login.click({ timeout: 60000 });
27
31
  }
28
32
  async login(username, password) {
29
- await (0, test_1.expect)(this.usernameInput).toBeVisible({ timeout: 180000 });
30
- await this.clickUsername();
31
- await this.fillUsername(username);
32
- await this.fillPassword(password);
33
- await (0, test_1.expect)(this.loginButton).toBeVisible({ timeout: 120000 });
34
- await this.clickLoginButton();
33
+ try {
34
+ await (0, test_1.expect)(this.usernameInput).toBeVisible();
35
+ await (0, test_1.expect)(this.passwordInput).toBeVisible();
36
+ await this.clickUsername();
37
+ await this.fillUsername(username);
38
+ await this.fillPassword(password);
39
+ await this.clickLoginButton();
40
+ }
41
+ catch (error) {
42
+ await (0, test_1.expect)(this.page.getByRole('link', { name: 'Camunda logo Operate' })).toBeVisible();
43
+ }
35
44
  }
36
45
  }
37
46
  exports.OperateLoginPage = OperateLoginPage;
@@ -44,8 +44,10 @@ class OperateProcessesPage {
44
44
  await (0, test_1.expect)(this.processCompletedCheckbox).toBeVisible({
45
45
  timeout: 30000,
46
46
  });
47
- await this.processCompletedCheckbox.check();
48
- await (0, sleep_1.sleep)(2000);
47
+ if (!(await this.processCompletedCheckbox.isChecked({ timeout: 60000 }))) {
48
+ await this.processCompletedCheckbox.click({ timeout: 120000 });
49
+ await (0, sleep_1.sleep)(2000);
50
+ }
49
51
  }
50
52
  async clickProcessIncidentsCheckbox() {
51
53
  await this.processIncidentsCheckbox.click({ timeout: 90000 });
@@ -97,7 +97,9 @@ class TaskDetailsPage {
97
97
  .getByText('Assigned to me');
98
98
  }
99
99
  async clickAssignToMeButton() {
100
- await this.assignToMeButton.click({ timeout: 60000 });
100
+ if (!(await this.assignedToMeText.isVisible())) {
101
+ await this.assignToMeButton.click({ timeout: 60000 });
102
+ }
101
103
  }
102
104
  async clickUnassignButton() {
103
105
  await this.unassignButton.click();
@@ -4,6 +4,7 @@ declare class TaskListLoginPage {
4
4
  readonly usernameInput: Locator;
5
5
  readonly passwordInput: Locator;
6
6
  readonly loginButton: Locator;
7
+ readonly backupLogin: Locator;
7
8
  constructor(page: Page);
8
9
  fillUsername(username: string): Promise<void>;
9
10
  clickUsername(): Promise<void>;
@@ -7,11 +7,13 @@ class TaskListLoginPage {
7
7
  usernameInput;
8
8
  passwordInput;
9
9
  loginButton;
10
+ backupLogin;
10
11
  constructor(page) {
11
12
  this.page = page;
12
13
  this.usernameInput = page.getByLabel('Username');
13
14
  this.passwordInput = page.getByRole('textbox', { name: 'password' });
14
15
  this.loginButton = page.getByRole('button', { name: 'Login' });
16
+ this.backupLogin = page.getByRole('button', { name: 'Log in' });
15
17
  }
16
18
  async fillUsername(username) {
17
19
  await this.usernameInput.fill(username);
@@ -23,15 +25,22 @@ class TaskListLoginPage {
23
25
  await this.passwordInput.fill(password);
24
26
  }
25
27
  async clickLoginButton() {
26
- await this.loginButton.click({ timeout: 60000 });
28
+ const login = this.loginButton.or(this.backupLogin).first();
29
+ await (0, test_1.expect)(login).toBeVisible({ timeout: 60000 });
30
+ await login.click({ timeout: 60000 });
27
31
  }
28
32
  async login(username, password) {
29
- await (0, test_1.expect)(this.usernameInput).toBeVisible({ timeout: 180000 });
30
- await this.clickUsername();
31
- await this.fillUsername(username);
32
- await this.fillPassword(password);
33
- await (0, test_1.expect)(this.loginButton).toBeVisible({ timeout: 120000 });
34
- await this.clickLoginButton();
33
+ try {
34
+ await (0, test_1.expect)(this.usernameInput).toBeVisible();
35
+ await (0, test_1.expect)(this.passwordInput).toBeVisible();
36
+ await this.clickUsername();
37
+ await this.fillUsername(username);
38
+ await this.fillPassword(password);
39
+ await this.clickLoginButton();
40
+ }
41
+ catch (error) {
42
+ await (0, test_1.expect)(this.page.getByRole('link', { name: 'Camunda logo Tasklist' })).toBeVisible();
43
+ }
35
44
  }
36
45
  }
37
46
  exports.TaskListLoginPage = TaskListLoginPage;
@@ -9,6 +9,7 @@
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.TaskPanelPage = void 0;
11
11
  const test_1 = require("@playwright/test");
12
+ const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLocatorWithRetry");
12
13
  class TaskPanelPage {
13
14
  assignmentTag;
14
15
  assignToMeButton;
@@ -59,7 +60,11 @@ class TaskPanelPage {
59
60
  .click({ timeout: 20000 });
60
61
  }
61
62
  async taskListBannerIsVisible() {
62
- await (0, test_1.expect)(this.taskListPageBanner).toBeVisible();
63
+ await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, this.taskListPageBanner, {
64
+ postAction: async () => {
65
+ await this.page.reload();
66
+ },
67
+ });
63
68
  }
64
69
  async asssertUnnassignedTaskEmptyMessage() {
65
70
  await (0, test_1.expect)(this.emptyTaskMessage).toBeVisible();
@@ -1,6 +1,9 @@
1
- import { Page } from '@playwright/test';
1
+ import { Page, APIRequestContext } from '@playwright/test';
2
2
  import { TaskPanelPage } from '../c8Run-8.7/TaskPanelPage';
3
3
  import { TaskDetailsPage } from '../c8Run-8.7/TaskDetailsPage';
4
+ export declare const dockerBaseUrls: Record<string, string>;
5
+ export declare function getBaseAppUrl(appName: string): string;
4
6
  export declare function navigateToApp(page: Page, appName: string): Promise<void>;
7
+ export declare function getAccessTokenFor(request: APIRequestContext, appName: string): Promise<string>;
5
8
  export declare function validateURL(page: Page, URL: RegExp): Promise<void>;
6
9
  export declare function completeTaskWithRetry(taskPanelPage: TaskPanelPage, taskDetailsPage: TaskDetailsPage, taskName: string, taskPriority: string, maxRetries?: number): Promise<void>;
@@ -7,18 +7,58 @@
7
7
  * except in compliance with the Camunda License 1.0.
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.completeTaskWithRetry = exports.validateURL = exports.navigateToApp = void 0;
10
+ exports.completeTaskWithRetry = exports.validateURL = exports.getAccessTokenFor = exports.navigateToApp = exports.getBaseAppUrl = exports.dockerBaseUrls = void 0;
11
11
  const test_1 = require("@playwright/test");
12
12
  const sleep_1 = require("../../utils/sleep");
13
+ exports.dockerBaseUrls = {
14
+ operate: 'http://localhost:8081',
15
+ tasklist: 'http://localhost:8082',
16
+ identity: 'http://localhost:8084',
17
+ };
18
+ function getBaseAppUrl(appName) {
19
+ if (process.env.RUN_AS_DOCKER_COMPOSE != 'true') {
20
+ return 'http://localhost:8080';
21
+ }
22
+ return exports.dockerBaseUrls[appName];
23
+ }
24
+ exports.getBaseAppUrl = getBaseAppUrl;
13
25
  async function navigateToApp(page, appName) {
14
- page.goto('/' + appName.toLowerCase() + '/login');
26
+ if (process.env.RUN_AS_DOCKER_COMPOSE === 'true') {
27
+ if (appName == 'operate') {
28
+ await page.goto(exports.dockerBaseUrls[appName] + '/operate');
29
+ }
30
+ else if (appName == 'tasklist') {
31
+ await page.goto(exports.dockerBaseUrls[appName] + '/tasklist');
32
+ }
33
+ else if (appName == 'identity') {
34
+ await page.goto(exports.dockerBaseUrls[appName]);
35
+ }
36
+ }
37
+ else {
38
+ await page.goto('/' + appName.toLowerCase() + '/login');
39
+ }
15
40
  }
16
41
  exports.navigateToApp = navigateToApp;
42
+ async function getAccessTokenFor(request, appName) {
43
+ const response = await request.post('http://localhost:18080/auth/realms/camunda-platform/protocol/openid-connect/token', {
44
+ headers: {
45
+ 'Content-Type': 'application/x-www-form-urlencoded',
46
+ },
47
+ form: {
48
+ client_id: appName,
49
+ client_secret: process.env.APP_CLIENT_SECRET,
50
+ grant_type: 'client_credentials',
51
+ },
52
+ });
53
+ const body = await response.json();
54
+ return body.access_token;
55
+ }
56
+ exports.getAccessTokenFor = getAccessTokenFor;
17
57
  async function validateURL(page, URL) {
18
58
  (0, test_1.expect)(page).toHaveURL(URL);
19
59
  }
20
60
  exports.validateURL = validateURL;
21
- async function completeTaskWithRetry(taskPanelPage, taskDetailsPage, taskName, taskPriority, maxRetries = 3) {
61
+ async function completeTaskWithRetry(taskPanelPage, taskDetailsPage, taskName, taskPriority, maxRetries = 5) {
22
62
  for (let attempt = 0; attempt < maxRetries; attempt++) {
23
63
  try {
24
64
  await taskPanelPage.openTask(taskName);
@@ -29,7 +69,7 @@ async function completeTaskWithRetry(taskPanelPage, taskDetailsPage, taskName, t
29
69
  await (0, test_1.expect)(taskDetailsPage.detailsPanel.getByText(taskPriority)).toBeVisible();
30
70
  await taskDetailsPage.taskCompletedBanner.waitFor({ state: 'hidden' });
31
71
  await taskDetailsPage.clickCompleteTaskButton();
32
- await (0, test_1.expect)(taskPanelPage.availableTasks.getByText(taskName, { exact: true }).first()).not.toBeVisible({ timeout: 15000 });
72
+ await (0, test_1.expect)(taskPanelPage.availableTasks.getByText(taskName, { exact: true }).first()).not.toBeVisible();
33
73
  return;
34
74
  }
35
75
  catch (error) {
@@ -37,7 +77,7 @@ async function completeTaskWithRetry(taskPanelPage, taskDetailsPage, taskName, t
37
77
  console.warn(`Attempt ${attempt + 1} failed for completing task ${taskName}. Retrying...`);
38
78
  }
39
79
  else {
40
- throw new Error(`Assertion failed after ${maxRetries} attempts`);
80
+ throw new Error(`Assertion failed after ${maxRetries} attempts` + error);
41
81
  }
42
82
  }
43
83
  }
@@ -7,7 +7,8 @@ const UtilitiesPage_1 = require("../../pages/8.9/UtilitiesPage");
7
7
  const users_1 = require("../../utils/users");
8
8
  const testUser = (0, users_1.getTestUser)('twentyFirstUser');
9
9
  _8_9_1.test.describe.configure({ mode: 'parallel' });
10
- _8_9_1.test.describe('Navigation Tests', () => {
10
+ //Skip until multi users can be reliably created in test orgs
11
+ _8_9_1.test.describe.skip('Navigation Tests', () => {
11
12
  const clusterName = 'Test Cluster';
12
13
  _8_9_1.test.beforeEach(async ({ page, loginPage }, testInfo) => {
13
14
  await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, testUser, (testInfo.workerIndex + 1) * 1000);
@@ -17,7 +17,8 @@ const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLoc
17
17
  const users_1 = require("../../utils/users");
18
18
  const testUser = (0, users_1.getTestUser)('twentySeventhUser');
19
19
  _8_9_1.test.describe.configure({ mode: 'parallel' });
20
- _8_9_1.test.describe('Smoke Tests', () => {
20
+ //Skip until multi users can be reliably created in test orgs
21
+ _8_9_1.test.describe.skip('Smoke Tests', () => {
21
22
  const clusterName = 'Test Cluster';
22
23
  _8_9_1.test.beforeEach(async ({ page, loginPage }, testInfo) => {
23
24
  await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, testUser, (testInfo.workerIndex + 1) * 1000);
@@ -3,65 +3,25 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const c8Run_8_7_1 = require("../../fixtures/c8Run-8.7");
4
4
  const apiHelpers_1 = require("../../utils/apiHelpers");
5
5
  const sleep_1 = require("../../utils/sleep");
6
- const zeebeClient_1 = require("../../utils/zeebeClient");
7
- c8Run_8_7_1.test.beforeAll(async () => {
8
- await Promise.all([
9
- (0, zeebeClient_1.deploy)('./resources/User_Task_Process_With_Form.bpmn'),
10
- (0, zeebeClient_1.deploy)('./resources/New Form.form'),
11
- (0, zeebeClient_1.deploy)('./resources/User_Task_Process_With_Form.bpmn'),
12
- (0, zeebeClient_1.deploy)('./resources/Start_Form_Process.bpmn'),
13
- ]);
14
- await Promise.all([
15
- (0, zeebeClient_1.createInstances)('Form_User_Task', 1, 3),
16
- (0, zeebeClient_1.createInstances)('Start_Form_Process', 1, 1),
17
- ]);
18
- await (0, apiHelpers_1.authC8runAPI)('demo', 'demo');
19
- await (0, sleep_1.sleep)(5000);
20
- });
21
- c8Run_8_7_1.test.describe('API tests', () => {
22
- c8Run_8_7_1.test.use({ storageState: 'utils/.auth' });
23
- (0, c8Run_8_7_1.test)('Search for process definitions', async ({ request }) => {
24
- const processDefinitionsList = await request.post('/v1/process-definitions/search');
25
- await (0, apiHelpers_1.assertResponseStatus)(processDefinitionsList, 200);
26
- });
27
- (0, c8Run_8_7_1.test)('Get a process definition via key', async ({ request }) => {
28
- const searchProcessDefinitions = await request.post('/v1/process-definitions/search');
29
- const processKey = await searchProcessDefinitions.json();
30
- const response = await request.get('/v1/process-definitions/' + processKey.items[0].key);
31
- await (0, apiHelpers_1.assertResponseStatus)(response, 200);
32
- });
33
- (0, c8Run_8_7_1.test)('Search for process instances', async ({ request }) => {
34
- const processInstancesList = await request.post('/v1/process-instances/search');
35
- await (0, apiHelpers_1.assertResponseStatus)(processInstancesList, 200);
36
- });
37
- (0, c8Run_8_7_1.test)('Search for flownode-instances', async ({ request }) => {
38
- const flowNodeInstancesList = await request.post('/v1/flownode-instances/search');
39
- await (0, apiHelpers_1.assertResponseStatus)(flowNodeInstancesList, 200);
40
- });
41
- (0, c8Run_8_7_1.test)('Search for variables for process instancess', async ({ request }) => {
42
- const variablesInstancesList = await request.post('/v1/variables/search');
43
- await (0, apiHelpers_1.assertResponseStatus)(variablesInstancesList, 200);
44
- });
45
- (0, c8Run_8_7_1.test)('Search for incidents', async ({ request }) => {
46
- const incidentsList = await request.post('/v1/incidents/search');
47
- await (0, apiHelpers_1.assertResponseStatus)(incidentsList, 200);
48
- });
49
- (0, c8Run_8_7_1.test)('Get connectors status', async ({ request }) => {
50
- const connectorsStatus = await request.get(process.env.C8RUN_CONNECTORS_API_URL + '/actuator/health');
51
- await (0, apiHelpers_1.assertResponseStatus)(connectorsStatus, 200);
52
- });
53
- (0, c8Run_8_7_1.test)('Get a inbound connectors list', async ({ request }) => {
54
- const connectorsInboundList = await request.get(process.env.C8RUN_CONNECTORS_API_URL + '/inbound');
55
- await (0, apiHelpers_1.assertResponseStatus)(connectorsInboundList, 200);
56
- });
57
- (0, c8Run_8_7_1.test)('Search for tasks', async ({ request }) => {
58
- const taskList = await request.post('/v1/tasks/search');
59
- await (0, apiHelpers_1.assertResponseStatus)(taskList, 200);
60
- });
61
- (0, c8Run_8_7_1.test)('Get a task via ID', async ({ request }) => {
62
- const searchTasks = await request.post('/v1/tasks/search');
63
- const taskID = await searchTasks.json();
64
- const response = await request.get('/v1/tasks/' + taskID[0].id);
65
- await (0, apiHelpers_1.assertResponseStatus)(response, 200);
66
- });
67
- });
6
+ const _setup_1 = require("../../test-setup.js");
7
+ if (process.env.RUN_AS_DOCKER_COMPOSE != 'true') {
8
+ c8Run_8_7_1.test.beforeAll(async () => {
9
+ await (0, apiHelpers_1.authC8runAPI)('demo', 'demo');
10
+ await (0, sleep_1.sleep)(5000);
11
+ });
12
+ c8Run_8_7_1.test.describe.parallel('API tests', () => {
13
+ c8Run_8_7_1.test.afterEach(async ({ page }, testInfo) => {
14
+ await (0, _setup_1.captureScreenshot)(page, testInfo);
15
+ await (0, _setup_1.captureFailureVideo)(page, testInfo);
16
+ });
17
+ c8Run_8_7_1.test.use({ storageState: 'utils/.auth' });
18
+ (0, c8Run_8_7_1.test)('Get connectors status', async ({ request }) => {
19
+ const connectorsStatus = await request.get(process.env.C8RUN_CONNECTORS_API_URL + '/actuator/health');
20
+ await (0, apiHelpers_1.assertResponseStatus)(connectorsStatus, 200);
21
+ });
22
+ (0, c8Run_8_7_1.test)('Get a inbound connectors list', async ({ request }) => {
23
+ const connectorsInboundList = await request.get(process.env.C8RUN_CONNECTORS_API_URL + '/inbound');
24
+ await (0, apiHelpers_1.assertResponseStatus)(connectorsInboundList, 200);
25
+ });
26
+ });
27
+ }
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH under
4
+ * one or more contributor license agreements. See the NOTICE file distributed
5
+ * with this work for additional information regarding copyright ownership.
6
+ * Licensed under the Camunda License 1.0. You may not use this file
7
+ * except in compliance with the Camunda License 1.0.
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ const c8Run_8_7_1 = require("../../fixtures/c8Run-8.7");
11
+ const apiHelpers_1 = require("../../utils/apiHelpers");
12
+ const UtilitiesPage_1 = require("../../pages/c8Run-8.7/UtilitiesPage");
13
+ const _setup_1 = require("../../test-setup.js");
14
+ const baseUrl = process.env.C8RUN_CONNECTORS_API_URL;
15
+ let connectorsToken = '';
16
+ if (process.env.RUN_AS_DOCKER_COMPOSE == 'true') {
17
+ c8Run_8_7_1.test.describe('Connectors API tests', () => {
18
+ c8Run_8_7_1.test.use({
19
+ baseURL: baseUrl,
20
+ });
21
+ c8Run_8_7_1.test.beforeEach(async ({ page, request }) => {
22
+ await (0, UtilitiesPage_1.navigateToApp)(page, 'identity');
23
+ connectorsToken = await (0, UtilitiesPage_1.getAccessTokenFor)(request, 'connectors');
24
+ });
25
+ c8Run_8_7_1.test.afterEach(async ({ page }, testInfo) => {
26
+ await (0, _setup_1.captureScreenshot)(page, testInfo);
27
+ await (0, _setup_1.captureFailureVideo)(page, testInfo);
28
+ });
29
+ (0, c8Run_8_7_1.test)('Get connectors status', async ({ request }) => {
30
+ const connectorsStatus = await request.get('/actuator/health', {
31
+ headers: {
32
+ Authorization: `Bearer ${connectorsToken}`,
33
+ 'Content-Type': 'application/json',
34
+ },
35
+ });
36
+ await (0, apiHelpers_1.assertResponseStatus)(connectorsStatus, 200);
37
+ });
38
+ (0, c8Run_8_7_1.test)('Get a inbound connectors list', async ({ request }) => {
39
+ const connectorsInboundList = await request.get('/inbound', {
40
+ headers: {
41
+ Authorization: `Bearer ${connectorsToken}`,
42
+ 'Content-Type': 'application/json',
43
+ },
44
+ });
45
+ await (0, apiHelpers_1.assertResponseStatus)(connectorsInboundList, 200);
46
+ });
47
+ });
48
+ }
@@ -76,7 +76,7 @@ c8Run_8_7_1.test.describe('Connectors User Flow Tests', () => {
76
76
  });
77
77
  });
78
78
  });
79
- (0, c8Run_8_7_1.test)('Start Event Webhook Connector No Auth User Flow', async ({ page, request, operateHomePage, operateProcessInstancePage, operateProcessesPage, }) => {
79
+ (0, c8Run_8_7_1.test)('Start Event Webhook Connector No Auth User Flow', async ({ request, operateHomePage, operateProcessInstancePage, operateProcessesPage, }) => {
80
80
  await c8Run_8_7_1.test.step('Make Authorization Request', async () => {
81
81
  await (0, sleep_1.sleep)(300000);
82
82
  const response = await request.get(process.env.C8RUN_CONNECTORS_API_URL + '/inbound/test-webhook-id');
@@ -85,13 +85,12 @@ c8Run_8_7_1.test.describe('Connectors User Flow Tests', () => {
85
85
  await c8Run_8_7_1.test.step('Assert Diagram Has Successfully Completed in Operate', async () => {
86
86
  await (0, test_1.expect)(operateHomePage.processesTab).toBeVisible({ timeout: 120000 });
87
87
  await operateHomePage.clickProcessesTab();
88
- await page.reload();
89
88
  await operateProcessesPage.clickProcessCompletedCheckbox();
90
89
  await operateProcessesPage.clickProcessInstanceLink('Start_Event_Webhook_Connector_No_Auth_Process');
91
90
  await operateProcessInstancePage.completedIconAssertion();
92
91
  });
93
92
  });
94
- (0, c8Run_8_7_1.test)('Intermediate Event Webhook Connector No Auth User Flow', async ({ page, request, operateHomePage, operateProcessInstancePage, operateProcessesPage, }) => {
93
+ (0, c8Run_8_7_1.test)('Intermediate Event Webhook Connector No Auth User Flow', async ({ request, operateHomePage, operateProcessInstancePage, operateProcessesPage, }) => {
95
94
  await c8Run_8_7_1.test.step('Make Authorization Request', async () => {
96
95
  await (0, sleep_1.sleep)(60000);
97
96
  const response = await request.post(process.env.C8RUN_CONNECTORS_API_URL +
@@ -105,7 +104,6 @@ c8Run_8_7_1.test.describe('Connectors User Flow Tests', () => {
105
104
  await c8Run_8_7_1.test.step('Assert Diagram Has Successfully Completed in Operate', async () => {
106
105
  await (0, test_1.expect)(operateHomePage.processesTab).toBeVisible({ timeout: 120000 });
107
106
  await operateHomePage.clickProcessesTab();
108
- await page.reload();
109
107
  await operateProcessesPage.clickProcessCompletedCheckbox();
110
108
  await operateProcessesPage.clickProcessInstanceLink('Intermediate_Event_Webhook_Connector_No_Auth_Process');
111
109
  await operateProcessInstancePage.completedIconAssertion();
@@ -48,12 +48,7 @@ c8Run_8_7_1.test.describe('HTO User Flow Tests', () => {
48
48
  await operateProcessInstancePage.activeIconAssertion();
49
49
  await (0, UtilitiesPage_1.navigateToApp)(page, 'tasklist');
50
50
  await taskListLoginPage.login('demo', 'demo');
51
- await taskPanelPage.openTask('Job_Worker_Process');
52
- await taskDetailsPage.clickAssignToMeButton();
53
- await taskDetailsPage.clickCompleteTaskButton();
54
- await (0, test_1.expect)(page.getByText('Task completed')).toBeVisible({
55
- timeout: 200000,
56
- });
51
+ await (0, UtilitiesPage_1.completeTaskWithRetry)(taskPanelPage, taskDetailsPage, 'Job_Worker_Process', 'Medium');
57
52
  await (0, UtilitiesPage_1.navigateToApp)(page, 'operate');
58
53
  await operateLoginPage.login('demo', 'demo');
59
54
  await (0, test_1.expect)(operateHomePage.processesTab).toBeVisible({ timeout: 120000 });
@@ -164,7 +159,6 @@ c8Run_8_7_1.test.describe('HTO User Flow Tests', () => {
164
159
  await (0, test_1.expect)(operateHomePage.processesTab).toBeVisible({ timeout: 120000 });
165
160
  await operateHomePage.clickProcessesTab();
166
161
  await operateProcessesPage.clickProcessCompletedCheckbox();
167
- await page.reload();
168
162
  await operateProcessesPage.clickProcessInstanceLink('Zeebe_User_Task');
169
163
  await operateProcessInstancePage.completedIconAssertion();
170
164
  });
@@ -190,7 +184,6 @@ c8Run_8_7_1.test.describe('HTO User Flow Tests', () => {
190
184
  await operateLoginPage.login('demo', 'demo');
191
185
  await operateHomePage.clickProcessesTab();
192
186
  await operateProcessesPage.clickProcessCompletedCheckbox();
193
- await page.reload();
194
187
  await operateProcessesPage.clickProcessInstanceLink('Zeebe_User_Task_Process_With_Priority');
195
188
  await operateProcessInstancePage.completedIconAssertion();
196
189
  });
@@ -0,0 +1,107 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH under
4
+ * one or more contributor license agreements. See the NOTICE file distributed
5
+ * with this work for additional information regarding copyright ownership.
6
+ * Licensed under the Camunda License 1.0. You may not use this file
7
+ * except in compliance with the Camunda License 1.0.
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ const c8Run_8_7_1 = require("../../fixtures/c8Run-8.7");
11
+ const apiHelpers_1 = require("../../utils/apiHelpers");
12
+ const zeebeClient_1 = require("../../utils/zeebeClient");
13
+ const test_1 = require("@playwright/test");
14
+ const UtilitiesPage_1 = require("../../pages/c8Run-8.7/UtilitiesPage");
15
+ const sleep_1 = require("../../utils/sleep");
16
+ const constants_1 = require("../../utils/constants");
17
+ const _setup_1 = require("../../test-setup.js");
18
+ const operateBaseURL = (0, UtilitiesPage_1.getBaseAppUrl)('operate');
19
+ if (process.env.RUN_AS_DOCKER_COMPOSE == 'true') {
20
+ c8Run_8_7_1.test.beforeAll(async () => {
21
+ await Promise.all([
22
+ (0, zeebeClient_1.deploy)('./resources/User_Task_Process_With_Form_API.bpmn'),
23
+ (0, zeebeClient_1.deploy)('./resources/New Form.form'),
24
+ ]);
25
+ await Promise.all([(0, zeebeClient_1.createInstances)('Form_User_Task_API', 1, 3)]);
26
+ await (0, sleep_1.sleep)(5000);
27
+ });
28
+ let operateToken = '';
29
+ c8Run_8_7_1.test.describe('Operate API tests', () => {
30
+ c8Run_8_7_1.test.use({
31
+ baseURL: operateBaseURL,
32
+ });
33
+ c8Run_8_7_1.test.beforeEach(async ({ page, identityLoginPage, identityHomePage, request }) => {
34
+ await (0, UtilitiesPage_1.navigateToApp)(page, 'identity');
35
+ await identityLoginPage.login('demo', 'demo');
36
+ await identityHomePage.assignPermissionToOperateAPI();
37
+ operateToken = await (0, UtilitiesPage_1.getAccessTokenFor)(request, 'operate');
38
+ });
39
+ c8Run_8_7_1.test.afterEach(async ({ page }, testInfo) => {
40
+ await (0, _setup_1.captureScreenshot)(page, testInfo);
41
+ await (0, _setup_1.captureFailureVideo)(page, testInfo);
42
+ });
43
+ (0, c8Run_8_7_1.test)('Search for process definitions', async ({ request }) => {
44
+ await (0, test_1.expect)(async () => {
45
+ const processDefinitionsList = await request.post('/v1/process-definitions/search', {
46
+ headers: {
47
+ Authorization: `Bearer ${operateToken}`,
48
+ 'Content-Type': 'application/json',
49
+ },
50
+ });
51
+ await (0, apiHelpers_1.assertResponseStatus)(processDefinitionsList, 200);
52
+ }).toPass(constants_1.defaultAssertionOptions);
53
+ });
54
+ (0, c8Run_8_7_1.test)('Get a process definition via key', async ({ request }) => {
55
+ const searchProcessDefinitions = await request.post('/v1/process-definitions/search', {
56
+ headers: {
57
+ Authorization: `Bearer ${operateToken}`,
58
+ 'Content-Type': 'application/json',
59
+ },
60
+ });
61
+ const processKey = await searchProcessDefinitions.json();
62
+ const response = await request.get('/v1/process-definitions/' + processKey.items[0].key, {
63
+ headers: {
64
+ Authorization: `Bearer ${operateToken}`,
65
+ 'Content-Type': 'application/json',
66
+ },
67
+ });
68
+ await (0, apiHelpers_1.assertResponseStatus)(response, 200);
69
+ });
70
+ (0, c8Run_8_7_1.test)('Search for process instances', async ({ request }) => {
71
+ const processInstancesList = await request.post('/v1/process-instances/search', {
72
+ headers: {
73
+ Authorization: `Bearer ${operateToken}`,
74
+ 'Content-Type': 'application/json',
75
+ },
76
+ });
77
+ await (0, apiHelpers_1.assertResponseStatus)(processInstancesList, 200);
78
+ });
79
+ (0, c8Run_8_7_1.test)('Search for flownode-instances', async ({ request }) => {
80
+ const flowNodeInstancesList = await request.post('/v1/flownode-instances/search', {
81
+ headers: {
82
+ Authorization: `Bearer ${operateToken}`,
83
+ 'Content-Type': 'application/json',
84
+ },
85
+ });
86
+ await (0, apiHelpers_1.assertResponseStatus)(flowNodeInstancesList, 200);
87
+ });
88
+ (0, c8Run_8_7_1.test)('Search for variables for process instancess', async ({ request }) => {
89
+ const variablesInstancesList = await request.post('/v1/variables/search', {
90
+ headers: {
91
+ Authorization: `Bearer ${operateToken}`,
92
+ 'Content-Type': 'application/json',
93
+ },
94
+ });
95
+ await (0, apiHelpers_1.assertResponseStatus)(variablesInstancesList, 200);
96
+ });
97
+ (0, c8Run_8_7_1.test)('Search for incidents', async ({ request }) => {
98
+ const incidentsList = await request.post('/v1/incidents/search', {
99
+ headers: {
100
+ Authorization: `Bearer ${operateToken}`,
101
+ 'Content-Type': 'application/json',
102
+ },
103
+ });
104
+ await (0, apiHelpers_1.assertResponseStatus)(incidentsList, 200);
105
+ });
106
+ });
107
+ }
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH under
4
+ * one or more contributor license agreements. See the NOTICE file distributed
5
+ * with this work for additional information regarding copyright ownership.
6
+ * Licensed under the Camunda License 1.0. You may not use this file
7
+ * except in compliance with the Camunda License 1.0.
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ const c8Run_8_7_1 = require("../../fixtures/c8Run-8.7");
11
+ const zeebeClient_1 = require("../../utils/zeebeClient");
12
+ const test_1 = require("@playwright/test");
13
+ const UtilitiesPage_1 = require("../../pages/c8Run-8.7/UtilitiesPage");
14
+ const sleep_1 = require("../../utils/sleep");
15
+ const constants_1 = require("../../utils/constants");
16
+ const _setup_1 = require("../../test-setup.js");
17
+ const tasklistBaseURL = (0, UtilitiesPage_1.getBaseAppUrl)('tasklist');
18
+ if (process.env.RUN_AS_DOCKER_COMPOSE == 'true') {
19
+ c8Run_8_7_1.test.beforeAll(async () => {
20
+ await Promise.all([
21
+ (0, zeebeClient_1.deploy)('./resources/User_Task_Process_With_Form_API.bpmn'),
22
+ (0, zeebeClient_1.deploy)('./resources/New Form.form'),
23
+ ]);
24
+ await Promise.all([(0, zeebeClient_1.createInstances)('Form_User_Task_API', 1, 3)]);
25
+ await (0, sleep_1.sleep)(5000);
26
+ });
27
+ let tasklistToken = '';
28
+ c8Run_8_7_1.test.describe('Tasklist API tests', () => {
29
+ c8Run_8_7_1.test.use({
30
+ baseURL: tasklistBaseURL,
31
+ });
32
+ c8Run_8_7_1.test.beforeEach(async ({ page, identityLoginPage, identityHomePage, request }) => {
33
+ await (0, UtilitiesPage_1.navigateToApp)(page, 'identity');
34
+ await identityLoginPage.login('demo', 'demo');
35
+ await identityHomePage.assignPermissionToTasklistAPI();
36
+ tasklistToken = await (0, UtilitiesPage_1.getAccessTokenFor)(request, 'tasklist');
37
+ });
38
+ c8Run_8_7_1.test.afterEach(async ({ page }, testInfo) => {
39
+ await (0, _setup_1.captureScreenshot)(page, testInfo);
40
+ await (0, _setup_1.captureFailureVideo)(page, testInfo);
41
+ });
42
+ (0, c8Run_8_7_1.test)('Search for tasks', async ({ request }) => {
43
+ await (0, test_1.expect)(async () => {
44
+ const taskList = await request.post(tasklistBaseURL + '/v1/tasks/search', {
45
+ headers: {
46
+ Authorization: `Bearer ${tasklistToken}`,
47
+ 'Content-Type': 'application/json',
48
+ },
49
+ });
50
+ (0, test_1.expect)(taskList.status()).toBe(200);
51
+ }).toPass(constants_1.defaultAssertionOptions);
52
+ });
53
+ (0, c8Run_8_7_1.test)('Get a task via ID', async ({ request }) => {
54
+ let taskData = [];
55
+ await (0, test_1.expect)(async () => {
56
+ const response = await request.post(tasklistBaseURL + '/v1/tasks/search', {
57
+ headers: {
58
+ Authorization: `Bearer ${tasklistToken}`,
59
+ 'Content-Type': 'application/json',
60
+ },
61
+ });
62
+ (0, test_1.expect)(response.status()).toBe(200);
63
+ taskData = await response.json();
64
+ (0, test_1.expect)(taskData.length).toBeGreaterThan(0);
65
+ }).toPass(constants_1.defaultAssertionOptions);
66
+ await (0, test_1.expect)(async () => {
67
+ const response = await request.get(tasklistBaseURL + `/v1/tasks/${taskData[0].id}`, {
68
+ headers: {
69
+ Authorization: `Bearer ${tasklistToken}`,
70
+ 'Content-Type': 'application/json',
71
+ },
72
+ });
73
+ (0, test_1.expect)(response.status()).toBe(200);
74
+ }).toPass(constants_1.defaultAssertionOptions);
75
+ });
76
+ });
77
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.142",
3
+ "version": "0.0.144",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",