Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove duplicated action identifier in label #14393

Merged
merged 2 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/language/src/nb.json
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@
"process_editor.configuration_panel_actions_action_card_custom": "Lag egendefinert handling",
"process_editor.configuration_panel_actions_action_card_custom_label": "Skriv inn navnet på handlingen du vil lage",
"process_editor.configuration_panel_actions_action_card_title": "Handling {{actionIndex}}",
"process_editor.configuration_panel_actions_action_label": "Handling {{actionIndex}}: {{actionName}}",
"process_editor.configuration_panel_actions_action_label": "Handling {{actionIndex}}:",
"process_editor.configuration_panel_actions_action_selector_label": "Velg en handling fra listen",
"process_editor.configuration_panel_actions_action_tab_predefined": "Velg standard handling",
"process_editor.configuration_panel_actions_action_type_help_text": "Hjelpetekst for å velge handlingstype",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ describe('ActionsEditor', () => {
const actionButton = screen.getByRole('button', {
name: textMock('process_editor.configuration_panel_actions_action_label', {
actionIndex: 1,
actionName: 'reject',
}),
});
expect(actionButton).toBeInTheDocument();
Expand All @@ -40,7 +39,6 @@ describe('ActionsEditor', () => {
const actionButton = screen.getByRole('button', {
name: textMock('process_editor.configuration_panel_actions_action_label', {
actionIndex: 1,
actionName: 'reject',
}),
});
expect(actionButton).toBeInTheDocument();
Expand All @@ -52,7 +50,6 @@ describe('ActionsEditor', () => {
const actionButton = screen.getByRole('button', {
name: textMock('process_editor.configuration_panel_actions_action_label', {
actionIndex: 1,
actionName: 'reject',
}),
});

Expand All @@ -77,7 +74,6 @@ describe('ActionsEditor', () => {
const actionButton = screen.getByRole('button', {
name: textMock('process_editor.configuration_panel_actions_action_label', {
actionIndex: 1,
actionName: 'reject',
}),
});
expect(actionButton).toBeInTheDocument();
Expand Down Expand Up @@ -112,7 +108,6 @@ describe('ActionsEditor', () => {
const actionButton = screen.queryByRole('button', {
name: textMock('process_editor.configuration_panel_actions_action_label', {
actionIndex: 1,
actionName: 'reject',
}),
});
expect(actionButton).not.toBeInTheDocument();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ export const ActionsEditor = ({

const actionLabel = t('process_editor.configuration_panel_actions_action_label', {
actionIndex: actionIndex + 1,
actionName: actionElement.action,
});

if (componentMode === 'edit') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ describe('EditActions', () => {
const viewModeElement = screen.getByText(
textMock('process_editor.configuration_panel_actions_action_label', {
actionIndex: 1,
actionName: 'reject',
}),
);
expect(viewModeElement).toBeInTheDocument();
Expand Down Expand Up @@ -159,7 +158,7 @@ describe('EditActions', () => {
getUniqueKey: () => [],
}));

await renderEditActions();
renderEditActions();
const addButton = screen.getByRole('button', {
name: textMock('process_editor.configuration_panel_actions_add_new'),
});
Expand Down Expand Up @@ -194,7 +193,6 @@ describe('EditActions', () => {
const viewModeElement = screen.getByText(
textMock('process_editor.configuration_panel_actions_action_label', {
actionIndex: 1,
actionName: 'reject',
}),
);
expect(viewModeElement).toBeInTheDocument();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,11 @@ export class ActionsConfig extends BasePage {
.click();
}

public async editAction(action: string): Promise<void> {
public async editAction(): Promise<void> {
await this.page
.getByRole('button', {
name: this.textMock('process_editor.configuration_panel_actions_action_label', {
actionIndex: '1',
actionName: action,
}),
})
.click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ test('should be possible to remove action from task', async ({
const giteaPage = new GiteaPage(page, { app: testAppName });
const processEditorPage = await setupProcessEditorActionConfigPanel(page, testAppName);

await processEditorPage.actionsConfig.editAction('write');
await processEditorPage.actionsConfig.editAction();

await processEditorPage.actionsConfig.deleteAction('write');
await commitAndPushToGitea(page, testAppName);
Expand Down
Loading