Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
DGB2018 committed Jun 11, 2019
2 parents 09b5543 + d21953e commit 5c77576
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,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)
Expand Down
7 changes: 6 additions & 1 deletion src/components/Period/Period.css
Original file line number Diff line number Diff line change
@@ -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;
}
7 changes: 5 additions & 2 deletions src/components/Period/Period.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
Row,
Select,
TextField,
Label,
} from '@folio/stripes/components';

import css from './Period.css';
Expand Down Expand Up @@ -104,9 +105,11 @@ class Period extends React.Component {

return (
<React.Fragment>
<Row className={css.label}>
<Row className={css.labelRow}>
<Col xs={12}>
<FormattedMessage id={fieldLabel} />
<Label className={css.label} required>
<FormattedMessage id={fieldLabel} />
</Label>
</Col>
</Row>
<Row>
Expand Down
6 changes: 5 additions & 1 deletion test/bigtest/interactors/service-point-create.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
8 changes: 6 additions & 2 deletions test/bigtest/tests/service-point-create-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});
});

Expand All @@ -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;
});
});
});
Expand Down

0 comments on commit 5c77576

Please sign in to comment.