Skip to content

Commit

Permalink
UIEUS-362-use-functional-components
Browse files Browse the repository at this point in the history
  • Loading branch information
elsenhans committed Aug 19, 2024
1 parent 14535b1 commit e2a884c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/components/views/UDP.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ describe('UDP', () => {
expect(screen.getByText('Delete reports')).toBeVisible();
});

test('should render Expand all', async () => {
expect(screen.getByText('Expand all')).toBeVisible();
await userEvent.click(screen.getByText('Expand all'));
expect(screen.getByText('Collapse all')).toBeVisible();
});

test('click upload counter report', async () => {
await userEvent.click(screen.getByText('Upload COUNTER report'));
const heading = screen.getByRole('heading', { name: 'Upload COUNTER report' });
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/UDPs.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ const UDPs = ({

const renderIsEmptyMessage = (query, result) => {
if (!result) {
return 'no source yet';
return <FormattedMessage id="ui-erm-usage.noSourceYet" />;
}

return (
Expand Down
1 change: 1 addition & 0 deletions translations/ui-erm-usage/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"usage-data-providers": "Usage data providers",
"usage-data-provider-pluralizable": "{count} {count, plural, one {usage-data-provider} other {usage-data-providers}}",
"appMenu.keyboardShortcuts": "Keyboard shortcuts",
"noSourceYet": "No source yet",

"meta.title": "eUsage",

Expand Down

0 comments on commit e2a884c

Please sign in to comment.