Skip to content

Commit b6d3ba6

Browse files
committed
Fixed issues in playwright tests
1 parent b9fa0f0 commit b6d3ba6

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

tests/v2/run_mock_tasks.spec.js

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ test('Collect and run mock tasks [v2]', async ({ page, workflow, request }) => {
1212
await page.waitForURL(workflow.url);
1313
await waitPageLoading(page);
1414

15+
test.slow();
16+
1517
/** @type {string} */
1618
let datasetName1;
1719
/** @type {number} */
@@ -84,7 +86,7 @@ test('Collect and run mock tasks [v2]', async ({ page, workflow, request }) => {
8486
});
8587

8688
await test.step('Check tasks list', async () => {
87-
await expect(page.getByRole('table').last().locator('tbody tr')).toHaveCount(rowsCount + 13);
89+
await expect(page.getByRole('table').last().locator('tbody tr')).toHaveCount(rowsCount + 14);
8890
});
8991

9092
await test.step('Delete task collection log', async () => {
@@ -115,6 +117,15 @@ test('Collect and run mock tasks [v2]', async ({ page, workflow, request }) => {
115117
await waitPageLoading(page);
116118
});
117119

120+
await test.step('Verify that the last dataset has been automatically selected', async () => {
121+
await expect(
122+
page
123+
.getByRole('combobox', { name: 'Dataset', exact: true })
124+
.first()
125+
.getByRole('option', { selected: true })
126+
).toHaveText(datasetName2);
127+
});
128+
118129
await test.step('Select the first dataset', async () => {
119130
await page
120131
.getByRole('combobox', { name: 'Dataset', exact: true })
@@ -181,6 +192,15 @@ test('Collect and run mock tasks [v2]', async ({ page, workflow, request }) => {
181192
await waitPageLoading(page);
182193
});
183194

195+
await test.step('Verify that the dataset used in the last job has been automatically selected', async () => {
196+
await expect(
197+
page
198+
.getByRole('combobox', { name: 'Dataset', exact: true })
199+
.first()
200+
.getByRole('option', { selected: true })
201+
).toHaveText(datasetName1);
202+
});
203+
184204
await test.step('Select the second dataset', async () => {
185205
await page
186206
.getByRole('combobox', { name: 'Dataset', exact: true })

tests/v2/workflow_task_input_filters.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ test('Workflow task input filters [v2]', async ({ page, workflow }) => {
8585
await test.step('Add valid filters', async () => {
8686
await page.getByPlaceholder('Key').fill('key1');
8787
await page.getByPlaceholder('Value').fill('value1');
88-
await page.getByRole('button', { name: 'Add type' }).click();
88+
await page.getByRole('button', { name: 'Add type filter', exact: true }).click();
8989
await page.getByPlaceholder('Key').nth(1).fill('key2');
9090
await page.getByRole('button', { name: 'Save' }).click();
9191
await page.getByText('Input filters successfully updated').waitFor();

0 commit comments

Comments
 (0)