diff --git a/CHANGELOG.md b/CHANGELOG.md index b5c0a93d..1df88152 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ * Add an address list to Settings - Tenant - Addresses. UINV-6 * Bug fixes: UITEN-4, UITEN-8 (was UIORG-172), UITEN-9 (was UIORG-163), UIOR-296 +* Bug fix: mark Hold shelf expiration period as required. Fixes UIORG-153. ## [2.9.1](https://github.com/folio-org/ui-organization/tree/v2.9.1) (2019-05-20) [Full Changelog](https://github.com/folio-org/ui-organization/compare/v2.9.0...v2.9.1) diff --git a/src/components/Period/Period.css b/src/components/Period/Period.css index 414a0ff0..8dc41851 100644 --- a/src/components/Period/Period.css +++ b/src/components/Period/Period.css @@ -1,6 +1,11 @@ @import "@folio/stripes-components/lib/variables.css"; -.label { +.labelRow { margin-bottom: 0.25rem; +} + +.label { font-size: var(--font-size-small); + line-height: 1.15; + margin-bottom: 0; } diff --git a/src/components/Period/Period.js b/src/components/Period/Period.js index 683820d5..cd29c11e 100644 --- a/src/components/Period/Period.js +++ b/src/components/Period/Period.js @@ -19,6 +19,7 @@ import { Row, Select, TextField, + Label, } from '@folio/stripes/components'; import css from './Period.css'; @@ -104,9 +105,11 @@ class Period extends React.Component { return ( - + - + diff --git a/test/bigtest/interactors/service-point-create.js b/test/bigtest/interactors/service-point-create.js index 9d938f29..c053fc51 100644 --- a/test/bigtest/interactors/service-point-create.js +++ b/test/bigtest/interactors/service-point-create.js @@ -7,11 +7,15 @@ import { selectable, } from '@bigtest/interactor'; +@interactor class HoldShelfExpirationPeriod { + isAsteriskPresent = isPresent('[data-test-holdshelfexpiry] span[class*="asterisk"]'); +} + @interactor class ServicePointCreatePage { title = text('[class*=paneTitleLabel---]'); pickupLocationSelect = isPresent('[data-test-pickup-location]'); choosePickupLocation = selectable('[data-test-pickup-location]'); - holdShelfExpirationPeriodPresent = isPresent('[data-test-holdshelfexpiry]'); + holdShelfExpirationPeriod = new HoldShelfExpirationPeriod('[data-test-holdshelfexpiry]'); holdSlipCheckboxPresent = isPresent('#staff-slip-checkbox-0'); clickHoldSlipCheckbox = clickable('#staff-slip-checkbox-0'); diff --git a/test/bigtest/tests/service-point-create-test.js b/test/bigtest/tests/service-point-create-test.js index e93812d1..2e93e19f 100644 --- a/test/bigtest/tests/service-point-create-test.js +++ b/test/bigtest/tests/service-point-create-test.js @@ -53,7 +53,11 @@ describe('ServicePointCreate', () => { }); it('shows hold shelf expiration period', () => { - expect(ServicePointCreatePage.holdShelfExpirationPeriodPresent).to.be.true; + expect(ServicePointCreatePage.holdShelfExpirationPeriod.isPresent).to.be.true; + }); + + it('hold shelf experation period is marked as required', () => { + expect(ServicePointCreatePage.holdShelfExpirationPeriod.isAsteriskPresent).to.be.true; }); }); @@ -63,7 +67,7 @@ describe('ServicePointCreate', () => { }); it('hides hold shelf expiration period', () => { - expect(ServicePointCreatePage.holdShelfExpirationPeriodPresent).to.be.false; + expect(ServicePointCreatePage.holdShelfExpirationPeriod.isPresent).to.be.false; }); }); });