Skip to content

Commit

Permalink
chore: cleanup, bug fixes KER-346
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkojamG committed Oct 31, 2024
1 parent f1f0a82 commit ee65c8e
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 469 deletions.
15 changes: 0 additions & 15 deletions cities/helsinki/assets/sass/hel/_hearing-list.scss
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
.hearings-search {
&__container {
.Select-control,
.is-open .Select-control,
.Select-menu {
border: 2px solid $black;
border-radius: 0;
}

.Select-control {
background-color: transparent;
}
}
}

.page-section--all-hearings-header {
background-color: $light-gray;

Expand Down
5 changes: 3 additions & 2 deletions src/components/HearingList/HearingList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ const HearingList = ({
})}
</HDSTabs.TabList>
<HDSTabs.TabPanel className='hearings-list-tab-panel'>
<section className='hearings-list-tab-panel-container'>
<section id='hearings-section' className='hearings-list-tab-panel-container'>
{jumpLink}
{noHearings}

Expand Down Expand Up @@ -159,9 +159,10 @@ const HearingList = ({
</section>
</HDSTabs.TabPanel>
<HDSTabs.TabPanel className='hearings-list-tab-panel'>
<section className='hearings-list-tab-panel-container'>
<section id='hearings-section' className='hearings-list-tab-panel-container'>
{jumpLink}
{noHearings}
{isLoading && <LoadSpinner />}
{hasHearings && !isLoading ? hearingListMap : null}
</section>
</HDSTabs.TabPanel>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react';
import { screen, fireEvent } from '@testing-library/react';

import HearingsSearch from '../HearingsSearch';
import renderWithProviders from '../../utils/renderWithProviders';
import { getIntlAsProp } from '../../../test-utils';
import HearingsSearch from '../HearingsSearch/HearingsSearch';
import renderWithProviders from '../../../utils/renderWithProviders';
import { getIntlAsProp } from '../../../../test-utils';

const mockHandleSearch = jest.fn();
const mockHandleSelectLabels = jest.fn();
Expand Down
3 changes: 2 additions & 1 deletion src/components/LabelList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { injectIntl } from 'react-intl';
import { Tag } from 'hds-react';
import { capitalize } from 'lodash';

import getAttr from '../utils/getAttr';
import Link from './LinkWithLang';
Expand All @@ -26,7 +27,7 @@ export const Labels = (props) => {
}}
key={label.id || label}
>
<Tag theme={{ '--tag-background': 'var(--color-fog)' }}>{getAttr(label.label, language)}</Tag>
<Tag theme={{ '--tag-background': 'var(--color-fog)' }}>{capitalize(getAttr(label.label, language))}</Tag>
</Link>
);

Expand Down
4 changes: 2 additions & 2 deletions src/views/Hearings/__tests__/Hearings.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ const renderComponent = (storeOverrides) => {
);
};

describe('Hearings', () => {
it('renders without crashing', () => {
describe('<Hearings />', () => {
it('should render correctly', () => {
renderComponent();
});

Expand Down
Loading

0 comments on commit ee65c8e

Please sign in to comment.