From 54f3ccde7e7c8286de5e651c6f0a1942016a3680 Mon Sep 17 00:00:00 2001 From: mikkojamG Date: Thu, 19 Sep 2024 14:20:08 +0300 Subject: [PATCH] chore: fixing e2e tests KER-346 --- e2e/tests/pages/map.spec.js | 4 ++-- src/components/LabelList.jsx | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/e2e/tests/pages/map.spec.js b/e2e/tests/pages/map.spec.js index d1eb46304..ea6695ca7 100644 --- a/e2e/tests/pages/map.spec.js +++ b/e2e/tests/pages/map.spec.js @@ -13,8 +13,8 @@ test.describe('Map Page', () => { await expect(page.getByRole('combobox', { name: 'Etsi otsikoista' })).toBeVisible(); }); - test('should display "Etsi..." text', async ({ page }) => { - await expect(page.getByText('Etsi...')).toBeVisible(); + test('should display "Hae aiheista" combobox', async ({ page }) => { + await expect(page.getByRole('combobox', { name: 'Hae aiheista' })).toBeVisible(); }); test('should display "Etsi" button', async ({ page }) => { diff --git a/src/components/LabelList.jsx b/src/components/LabelList.jsx index 85c3488a0..29d28640d 100644 --- a/src/components/LabelList.jsx +++ b/src/components/LabelList.jsx @@ -3,7 +3,6 @@ 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'; @@ -27,7 +26,7 @@ export const Labels = (props) => { }} key={label.id || label} > - {capitalize(getAttr(label.label, language))} + {getAttr(label.label, language)} );