Skip to content

Commit

Permalink
Upgrade some deps and fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jducro committed May 24, 2019
1 parent 8f9edde commit b67004d
Show file tree
Hide file tree
Showing 3 changed files with 2,019 additions and 602 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,25 @@ exports[`>>> DropDown --- Snapshot +++capturing Snapshot of DropDown 1`] = `
className="dp-pc_field"
>
<div
className="css-10nd86i react-select"
className="css-1pcexqc-container react-select"
id={undefined}
onKeyDown={[Function]}
>
<div
className="css-1aya2g8 react-select__control"
className="css-bg1rzq-control react-select__control"
onMouseDown={[Function]}
onTouchEnd={[Function]}
>
<div
className="css-1rtrksz react-select__value-container react-select__value-container--has-value"
className="css-1hwfws3 react-select__value-container react-select__value-container--has-value"
>
<div
className="css-va7pk8 react-select__single-value"
className="css-dvua67-singleValue react-select__single-value"
>
First
</div>
<div
className="css-rsyb7x"
className="css-1g6gooi"
>
<div
className="react-select__input"
Expand Down Expand Up @@ -58,6 +58,7 @@ exports[`>>> DropDown --- Snapshot +++capturing Snapshot of DropDown 1`] = `
"boxSizing": "content-box",
"color": "inherit",
"fontSize": "inherit",
"label": "input",
"opacity": 1,
"outline": 0,
"padding": 0,
Expand Down Expand Up @@ -91,7 +92,7 @@ exports[`>>> DropDown --- Snapshot +++capturing Snapshot of DropDown 1`] = `
>
<div
aria-hidden="true"
className="css-1ep9fjw react-select__indicator react-select__clear-indicator"
className="css-16pqwjk-indicatorContainer react-select__indicator react-select__clear-indicator"
onMouseDown={[Function]}
onTouchEnd={[Function]}
>
Expand All @@ -109,11 +110,11 @@ exports[`>>> DropDown --- Snapshot +++capturing Snapshot of DropDown 1`] = `
</svg>
</div>
<span
className="css-d8oujb react-select__indicator-separator"
className="css-bgvzuu-indicatorSeparator react-select__indicator-separator"
/>
<div
aria-hidden="true"
className="css-1ep9fjw react-select__indicator react-select__dropdown-indicator"
className="css-16pqwjk-indicatorContainer react-select__indicator react-select__dropdown-indicator"
onMouseDown={[Function]}
onTouchEnd={[Function]}
>
Expand Down
8 changes: 6 additions & 2 deletions tests/jest/Layouts/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ describe('>>> Layout helper class', () => {
});
});

const futureDate = new Date();
futureDate.setDate(futureDate.getDate() + 10);
const formattedFutureDate = `${futureDate.getFullYear()}-${futureDate.getMonth() + 1}-${futureDate.getDate()}`;

describe('>>> Layout Field validations', () => {
it('should validate required fields', () => {
const field = new LayoutField({
Expand Down Expand Up @@ -99,7 +103,7 @@ describe('>>> Layout Field validations', () => {
type: 'date',
validation: ['dateRange']
});
expect(field.validate('2018-10-10')).toBeUndefined();
expect(field.validate(formattedFutureDate)).toBeUndefined();
expect(field.validate('1989-06-04')).toBe('Date should be after now');
});

Expand All @@ -109,7 +113,7 @@ describe('>>> Layout Field validations', () => {
type: 'date',
validation: ['dateRange::2018-01-01']
});
expect(field.validate('2018-10-10')).toBe('Date should be before 2018-01-01');
expect(field.validate(formattedFutureDate)).toBe('Date should be before 2018-01-01');
expect(field.validate('1989-06-04')).toBeUndefined();
});

Expand Down
Loading

0 comments on commit b67004d

Please sign in to comment.