Skip to content

Commit a7de34d

Browse files
committed
Added e2e test for workflow task meta properties
1 parent 3f804ce commit a7de34d

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
import { test } from './workflow_fixture.js';
2+
import { waitPageLoading } from '../utils.js';
3+
import { createFakeTask, deleteTask } from './task_utils.js';
4+
5+
test('Workflow task meta properties [v2]', async ({ page, workflow }) => {
6+
await page.waitForURL(workflow.url);
7+
await waitPageLoading(page);
8+
9+
let taskName;
10+
await test.step('Create test tasks', async () => {
11+
taskName = await createFakeTask(page, { type: 'non_parallel' });
12+
});
13+
14+
await test.step('Open workflow page', async () => {
15+
await workflow.openWorkflowPage();
16+
});
17+
18+
await test.step('Add tasks to workflow', async () => {
19+
await workflow.addUserTask(taskName);
20+
await workflow.selectTask(taskName);
21+
});
22+
23+
await test.step('Open Meta tab', async () => {
24+
await page.getByText('Meta', { exact: true }).click();
25+
});
26+
27+
await test.step('Add first property', async () => {
28+
await page.getByRole('button', { name: 'Add property' }).click();
29+
await page.getByPlaceholder('Arg name').fill('k1');
30+
await page.getByPlaceholder('Argument default value').fill('v1');
31+
await page.getByLabel('Save argument').click();
32+
});
33+
34+
await test.step('Add second property', async () => {
35+
await page.getByRole('button', { name: 'Add property' }).click();
36+
await page.getByPlaceholder('Arg name').fill('k2');
37+
await page.getByPlaceholder('Argument default value').fill('v2');
38+
await page.getByLabel('Save argument').click();
39+
});
40+
41+
await test.step('Verify that meta contains the 2 properties', async () => {
42+
await page.getByText('k1').waitFor();
43+
await page.getByText('k2').waitFor();
44+
await page.getByText('v1').waitFor();
45+
await page.getByText('v2').waitFor();
46+
});
47+
48+
await test.step('Cleanup', async () => {
49+
await workflow.removeCurrentTask();
50+
await deleteTask(page, taskName);
51+
});
52+
});

0 commit comments

Comments
 (0)