Skip to content

Commit febeb3a

Browse files
authored
fix: remove duplicated action identifier in label (#14393)
1 parent 696f1a5 commit febeb3a

File tree

6 files changed

+4
-13
lines changed

6 files changed

+4
-13
lines changed

frontend/language/src/nb.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@
688688
"process_editor.configuration_panel_actions_action_card_custom": "Lag egendefinert handling",
689689
"process_editor.configuration_panel_actions_action_card_custom_label": "Skriv inn navnet på handlingen du vil lage",
690690
"process_editor.configuration_panel_actions_action_card_title": "Handling {{actionIndex}}",
691-
"process_editor.configuration_panel_actions_action_label": "Handling {{actionIndex}}: {{actionName}}",
691+
"process_editor.configuration_panel_actions_action_label": "Handling {{actionIndex}}:",
692692
"process_editor.configuration_panel_actions_action_selector_label": "Velg en handling fra listen",
693693
"process_editor.configuration_panel_actions_action_tab_predefined": "Velg standard handling",
694694
"process_editor.configuration_panel_actions_action_type_help_text": "Hjelpetekst for å velge handlingstype",

frontend/packages/process-editor/src/components/ConfigPanel/ConfigContent/EditActions/ActionsEditor/ActionsEditor.test.tsx

-5
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ describe('ActionsEditor', () => {
2121
const actionButton = screen.getByRole('button', {
2222
name: textMock('process_editor.configuration_panel_actions_action_label', {
2323
actionIndex: 1,
24-
actionName: 'reject',
2524
}),
2625
});
2726
expect(actionButton).toBeInTheDocument();
@@ -40,7 +39,6 @@ describe('ActionsEditor', () => {
4039
const actionButton = screen.getByRole('button', {
4140
name: textMock('process_editor.configuration_panel_actions_action_label', {
4241
actionIndex: 1,
43-
actionName: 'reject',
4442
}),
4543
});
4644
expect(actionButton).toBeInTheDocument();
@@ -52,7 +50,6 @@ describe('ActionsEditor', () => {
5250
const actionButton = screen.getByRole('button', {
5351
name: textMock('process_editor.configuration_panel_actions_action_label', {
5452
actionIndex: 1,
55-
actionName: 'reject',
5653
}),
5754
});
5855

@@ -77,7 +74,6 @@ describe('ActionsEditor', () => {
7774
const actionButton = screen.getByRole('button', {
7875
name: textMock('process_editor.configuration_panel_actions_action_label', {
7976
actionIndex: 1,
80-
actionName: 'reject',
8177
}),
8278
});
8379
expect(actionButton).toBeInTheDocument();
@@ -112,7 +108,6 @@ describe('ActionsEditor', () => {
112108
const actionButton = screen.queryByRole('button', {
113109
name: textMock('process_editor.configuration_panel_actions_action_label', {
114110
actionIndex: 1,
115-
actionName: 'reject',
116111
}),
117112
});
118113
expect(actionButton).not.toBeInTheDocument();

frontend/packages/process-editor/src/components/ConfigPanel/ConfigContent/EditActions/ActionsEditor/ActionsEditor.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ export const ActionsEditor = ({
4343

4444
const actionLabel = t('process_editor.configuration_panel_actions_action_label', {
4545
actionIndex: actionIndex + 1,
46-
actionName: actionElement.action,
4746
});
4847

4948
if (componentMode === 'edit') {

frontend/packages/process-editor/src/components/ConfigPanel/ConfigContent/EditActions/EditActions.test.tsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ describe('EditActions', () => {
111111
const viewModeElement = screen.getByText(
112112
textMock('process_editor.configuration_panel_actions_action_label', {
113113
actionIndex: 1,
114-
actionName: 'reject',
115114
}),
116115
);
117116
expect(viewModeElement).toBeInTheDocument();
@@ -159,7 +158,7 @@ describe('EditActions', () => {
159158
getUniqueKey: () => [],
160159
}));
161160

162-
await renderEditActions();
161+
renderEditActions();
163162
const addButton = screen.getByRole('button', {
164163
name: textMock('process_editor.configuration_panel_actions_add_new'),
165164
});
@@ -194,7 +193,6 @@ describe('EditActions', () => {
194193
const viewModeElement = screen.getByText(
195194
textMock('process_editor.configuration_panel_actions_action_label', {
196195
actionIndex: 1,
197-
actionName: 'reject',
198196
}),
199197
);
200198
expect(viewModeElement).toBeInTheDocument();

frontend/testing/playwright/pages/ProcessEditorPage/ActionsConfig.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,11 @@ export class ActionsConfig extends BasePage {
6363
.click();
6464
}
6565

66-
public async editAction(action: string): Promise<void> {
66+
public async editAction(): Promise<void> {
6767
await this.page
6868
.getByRole('button', {
6969
name: this.textMock('process_editor.configuration_panel_actions_action_label', {
7070
actionIndex: '1',
71-
actionName: action,
7271
}),
7372
})
7473
.click();

frontend/testing/playwright/tests/process-editor/task-actions.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ test('should be possible to remove action from task', async ({
6060
const giteaPage = new GiteaPage(page, { app: testAppName });
6161
const processEditorPage = await setupProcessEditorActionConfigPanel(page, testAppName);
6262

63-
await processEditorPage.actionsConfig.editAction('write');
63+
await processEditorPage.actionsConfig.editAction();
6464

6565
await processEditorPage.actionsConfig.deleteAction('write');
6666
await commitAndPushToGitea(page, testAppName);

0 commit comments

Comments
 (0)