Fix e2e tests (#12783)

Fixes:

- Trigger labels have been updated in the workflows
- Workflow runs are now opened by default in the side panel when
launched manually by the user
This commit is contained in:
Baptiste Devessier
2025-06-23 13:34:35 +02:00
committed by GitHub
parent bec4a98ae7
commit 8f0c9facf2

View File

@ -8,14 +8,12 @@ test('The workflow run visualizer shows the executed draft version without the l
await workflowVisualizer.createInitialTrigger('manual'); await workflowVisualizer.createInitialTrigger('manual');
const manualTriggerAvailabilitySelect = page.getByRole('button', { const manualTriggerAvailabilitySelect = page.getByRole('button', {
name: 'When record(s) are selected', name: 'When record is selected',
}); });
await manualTriggerAvailabilitySelect.click(); await manualTriggerAvailabilitySelect.click();
const alwaysAvailableOption = page.getByText( const alwaysAvailableOption = page.getByText('When no record is selected');
'When no record(s) are selected',
);
await alwaysAvailableOption.click(); await alwaysAvailableOption.click();
@ -74,14 +72,12 @@ test('Workflow Runs with a pending form step can be opened in the side panel and
await workflowVisualizer.createInitialTrigger('manual'); await workflowVisualizer.createInitialTrigger('manual');
const manualTriggerAvailabilitySelect = page.getByRole('button', { const manualTriggerAvailabilitySelect = page.getByRole('button', {
name: 'When record(s) are selected', name: 'When record is selected',
}); });
await manualTriggerAvailabilitySelect.click(); await manualTriggerAvailabilitySelect.click();
const alwaysAvailableOption = page.getByText( const alwaysAvailableOption = page.getByText('When no record is selected');
'When no record(s) are selected',
);
await alwaysAvailableOption.click(); await alwaysAvailableOption.click();
@ -90,29 +86,23 @@ test('Workflow Runs with a pending form step can be opened in the side panel and
const { createdStepId: firstStepId } = const { createdStepId: firstStepId } =
await workflowVisualizer.createStep('form'); await workflowVisualizer.createStep('form');
const addFormFieldButton = page.getByText('Add Field', { exact: true });
await addFormFieldButton.click();
await workflowVisualizer.closeSidePanel(); await workflowVisualizer.closeSidePanel();
const launchTestButton = page.getByLabel(workflowVisualizer.workflowName); const launchTestButton = page.getByLabel(workflowVisualizer.workflowName);
await launchTestButton.click(); await launchTestButton.click();
await workflowVisualizer.seeRunsButton.click();
const workflowRunName = `#1 - ${workflowVisualizer.workflowName}`; const workflowRunName = `#1 - ${workflowVisualizer.workflowName}`;
const workflowRunNameCell = page.getByRole('cell', { name: workflowRunName });
await expect(workflowRunNameCell).toBeVisible();
await workflowVisualizer.setWorkflowsOpenInMode('side-panel');
// 1. Exit the dropdown
await workflowRunNameCell.click();
// 2. Actually open the workflow run in the side panel
await workflowRunNameCell.click();
await expect(workflowVisualizer.stepHeaderInCommandMenu).toContainText( await expect(workflowVisualizer.stepHeaderInCommandMenu).toContainText(
'Form', 'Form',
{
timeout: 30_000,
},
); );
await workflowVisualizer.goBackInCommandMenu.click(); await workflowVisualizer.goBackInCommandMenu.click();
@ -122,7 +112,9 @@ test('Workflow Runs with a pending form step can be opened in the side panel and
await expect(workflowRunNameInCommandMenu).toBeVisible(); await expect(workflowRunNameInCommandMenu).toBeVisible();
await workflowVisualizer.triggerNode.click(); await workflowVisualizer.commandMenu
.locator(workflowVisualizer.triggerNode)
.click();
await expect(workflowVisualizer.stepHeaderInCommandMenu).toContainText( await expect(workflowVisualizer.stepHeaderInCommandMenu).toContainText(
'Launch manually', 'Launch manually',
@ -130,7 +122,9 @@ test('Workflow Runs with a pending form step can be opened in the side panel and
await workflowVisualizer.goBackInCommandMenu.click(); await workflowVisualizer.goBackInCommandMenu.click();
const formStep = workflowVisualizer.getStepNode(firstStepId); const formStep = workflowVisualizer.commandMenu.locator(
workflowVisualizer.getStepNode(firstStepId),
);
await formStep.click(); await formStep.click();