Skip to content

Commit 8f0c9fa

Browse files
authored
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
1 parent bec4a98 commit 8f0c9fa

File tree

1 file changed

+17
-23
lines changed

1 file changed

+17
-23
lines changed

packages/twenty-e2e-testing/tests/workflow-run.spec.ts

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,12 @@ test('The workflow run visualizer shows the executed draft version without the l
88
await workflowVisualizer.createInitialTrigger('manual');
99

1010
const manualTriggerAvailabilitySelect = page.getByRole('button', {
11-
name: 'When record(s) are selected',
11+
name: 'When record is selected',
1212
});
1313

1414
await manualTriggerAvailabilitySelect.click();
1515

16-
const alwaysAvailableOption = page.getByText(
17-
'When no record(s) are selected',
18-
);
16+
const alwaysAvailableOption = page.getByText('When no record is selected');
1917

2018
await alwaysAvailableOption.click();
2119

@@ -74,14 +72,12 @@ test('Workflow Runs with a pending form step can be opened in the side panel and
7472
await workflowVisualizer.createInitialTrigger('manual');
7573

7674
const manualTriggerAvailabilitySelect = page.getByRole('button', {
77-
name: 'When record(s) are selected',
75+
name: 'When record is selected',
7876
});
7977

8078
await manualTriggerAvailabilitySelect.click();
8179

82-
const alwaysAvailableOption = page.getByText(
83-
'When no record(s) are selected',
84-
);
80+
const alwaysAvailableOption = page.getByText('When no record is selected');
8581

8682
await alwaysAvailableOption.click();
8783

@@ -90,29 +86,23 @@ test('Workflow Runs with a pending form step can be opened in the side panel and
9086
const { createdStepId: firstStepId } =
9187
await workflowVisualizer.createStep('form');
9288

89+
const addFormFieldButton = page.getByText('Add Field', { exact: true });
90+
91+
await addFormFieldButton.click();
92+
9393
await workflowVisualizer.closeSidePanel();
9494

9595
const launchTestButton = page.getByLabel(workflowVisualizer.workflowName);
9696

9797
await launchTestButton.click();
9898

99-
await workflowVisualizer.seeRunsButton.click();
100-
10199
const workflowRunName = `#1 - ${workflowVisualizer.workflowName}`;
102100

103-
const workflowRunNameCell = page.getByRole('cell', { name: workflowRunName });
104-
105-
await expect(workflowRunNameCell).toBeVisible();
106-
107-
await workflowVisualizer.setWorkflowsOpenInMode('side-panel');
108-
109-
// 1. Exit the dropdown
110-
await workflowRunNameCell.click();
111-
// 2. Actually open the workflow run in the side panel
112-
await workflowRunNameCell.click();
113-
114101
await expect(workflowVisualizer.stepHeaderInCommandMenu).toContainText(
115102
'Form',
103+
{
104+
timeout: 30_000,
105+
},
116106
);
117107

118108
await workflowVisualizer.goBackInCommandMenu.click();
@@ -122,15 +112,19 @@ test('Workflow Runs with a pending form step can be opened in the side panel and
122112

123113
await expect(workflowRunNameInCommandMenu).toBeVisible();
124114

125-
await workflowVisualizer.triggerNode.click();
115+
await workflowVisualizer.commandMenu
116+
.locator(workflowVisualizer.triggerNode)
117+
.click();
126118

127119
await expect(workflowVisualizer.stepHeaderInCommandMenu).toContainText(
128120
'Launch manually',
129121
);
130122

131123
await workflowVisualizer.goBackInCommandMenu.click();
132124

133-
const formStep = workflowVisualizer.getStepNode(firstStepId);
125+
const formStep = workflowVisualizer.commandMenu.locator(
126+
workflowVisualizer.getStepNode(firstStepId),
127+
);
134128

135129
await formStep.click();
136130

0 commit comments

Comments
 (0)