From 5d9f85c2a86696563ab5d88d21a249816745b242 Mon Sep 17 00:00:00 2001 From: Riley Bauer <34456002+rileyjbauer@users.noreply.github.com> Date: Sat, 10 Nov 2018 15:56:57 -0800 Subject: [PATCH] Removes the magic in Input, reducing it to a styled TextField (#150) * Removes the magic in Input, rducing it to a styled TextField * Automatically use height='auto' for multiline inputs --- frontend/src/atoms/Input.test.tsx | 21 +- frontend/src/atoms/Input.tsx | 20 +- .../atoms/__snapshots__/Input.test.tsx.snap | 20 +- frontend/src/components/Trigger.tsx | 35 +- .../src/components/UploadPipelineDialog.tsx | 14 +- .../__snapshots__/Trigger.test.tsx.snap | 11660 +--------------- .../UploadPipelineDialog.test.tsx.snap | 1146 +- frontend/src/pages/NewExperiment.tsx | 9 +- frontend/src/pages/NewRun.tsx | 16 +- .../__snapshots__/NewExperiment.test.tsx.snap | 1179 +- 10 files changed, 166 insertions(+), 13954 deletions(-) diff --git a/frontend/src/atoms/Input.test.tsx b/frontend/src/atoms/Input.test.tsx index fa54ad44307..fd1938ac9c7 100644 --- a/frontend/src/atoms/Input.test.tsx +++ b/frontend/src/atoms/Input.test.tsx @@ -20,29 +20,18 @@ import Input from './Input'; import { shallow } from 'enzyme'; import toJson from 'enzyme-to-json'; -const mockInstance = { state: {} } as any; describe('Input', () => { + const handleChange = jest.fn(); + const value = 'some input value'; + it('renders with the right styles by default', () => { - const tree = shallow(); + const tree = shallow(); expect(toJson(tree)).toMatchSnapshot(); }); it('accepts height and width as prop overrides', () => { - const tree = shallow(); - expect(toJson(tree)).toMatchSnapshot(); - }); - - it('gets its value from the instance state field', () => { - mockInstance.state.fieldname = 'field value'; - const tree = shallow(); + const tree = shallow(); expect(toJson(tree)).toMatchSnapshot(); }); - - it('calls the instance handleChange function if defined', () => { - mockInstance.handleChange = jest.fn(); - const tree = shallow(); - tree.simulate('change'); - expect(mockInstance.handleChange).toHaveBeenCalledWith('fieldname'); - }); }); diff --git a/frontend/src/atoms/Input.tsx b/frontend/src/atoms/Input.tsx index 5617b7c1590..367f4be2b6f 100644 --- a/frontend/src/atoms/Input.tsx +++ b/frontend/src/atoms/Input.tsx @@ -19,18 +19,20 @@ import TextField, { TextFieldProps } from '@material-ui/core/TextField'; import { commonCss } from '../Css'; interface InputProps extends TextFieldProps { - field: string; height?: number | string; - instance: any; width?: number; } export default (props: InputProps) => { - const { field, height, instance, width, ...rest } = props; - return - {props.children} - ; + const { height, width, ...rest } = props; + return ( + + {props.children} + + ); }; diff --git a/frontend/src/atoms/__snapshots__/Input.test.tsx.snap b/frontend/src/atoms/__snapshots__/Input.test.tsx.snap index 35c5c5fbc9b..af8d6f038e4 100644 --- a/frontend/src/atoms/__snapshots__/Input.test.tsx.snap +++ b/frontend/src/atoms/__snapshots__/Input.test.tsx.snap @@ -13,24 +13,7 @@ exports[`Input accepts height and width as prop overrides 1`] = ` "width": 456, } } - variant="outlined" -/> -`; - -exports[`Input gets its value from the instance state field 1`] = ` - `; @@ -48,6 +31,7 @@ exports[`Input renders with the right styles by default 1`] = ` "width": "100%", } } + value="some input value" variant="outlined" /> `; diff --git a/frontend/src/components/Trigger.tsx b/frontend/src/components/Trigger.tsx index 551eeb958e7..efb950d9dab 100644 --- a/frontend/src/components/Trigger.tsx +++ b/frontend/src/components/Trigger.tsx @@ -84,11 +84,12 @@ export default class Trigger extends React.Component } public render(): JSX.Element { - const { editCron, hasEndDate, hasStartDate, intervalCategory, - intervalValue, selectedDays, type } = this.state; + const { cron, editCron, endDate, endTime, hasEndDate, hasStartDate, intervalCategory, + intervalValue, maxConcurrentRuns, selectedDays, startDate, startTime, type } = this.state; return
- + {Array.from(triggers.entries()).map((trigger, i) => ( {trigger[1].displayName} @@ -97,17 +98,20 @@ export default class Trigger extends React.Component
- +
} label='Has start date' /> - -
@@ -116,11 +120,11 @@ export default class Trigger extends React.Component } label='Has end date' /> - + - +
@@ -128,13 +132,14 @@ export default class Trigger extends React.Component {type === TriggerType.INTERVALED && (
- +
)} - + {Object.keys(PeriodicInterval).map((interval: PeriodicInterval, i) => ( {PeriodicInterval[interval] + (type === TriggerType.INTERVALED ? 's' : '')} @@ -172,8 +177,8 @@ export default class Trigger extends React.Component } />
- +
Note: Start and end dates/times are handled outside of cron.
diff --git a/frontend/src/components/UploadPipelineDialog.tsx b/frontend/src/components/UploadPipelineDialog.tsx index d0749b28695..79625cd2fd1 100644 --- a/frontend/src/components/UploadPipelineDialog.tsx +++ b/frontend/src/components/UploadPipelineDialog.tsx @@ -77,7 +77,7 @@ class UploadPipelineDialog extends React.Component this._uploadDialogClosed(false)} open={this.props.open} classes={{ paper: css.root }}> @@ -94,7 +94,7 @@ class UploadPipelineDialog extends React.Component You can also drag and drop the file here. - @@ -107,11 +107,13 @@ class UploadPipelineDialog extends React.Component - + - {/* */} + {/* */} diff --git a/frontend/src/components/__snapshots__/Trigger.test.tsx.snap b/frontend/src/components/__snapshots__/Trigger.test.tsx.snap index 00f01c32ae3..da20f68eb50 100644 --- a/frontend/src/components/__snapshots__/Trigger.test.tsx.snap +++ b/frontend/src/components/__snapshots__/Trigger.test.tsx.snap @@ -3,332 +3,11 @@ exports[`Trigger enables a single day on click 1`] = `
, - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "cron": "0 0 0 ? * 0,2,4,5,6", - "editCron": false, - "endDate": "2018-12-21", - "endTime": "07:53", - "hasEndDate": false, - "hasStartDate": false, - "intervalCategory": "Week", - "intervalValue": 1, - "maxConcurrentRuns": "10", - "selectedDays": Array [ - true, - false, - true, - false, - true, - true, - true, - ], - "startDate": "2018-12-21", - "startTime": "07:53", - "type": 1, - }, - "_rendered":
- - - Periodic - - - Cron - - -
- -
- - } - label="Has start date" - /> - - - -
-
- - } - label="Has end date" - /> - - - -
- - Run every - - - - Minute - - - Hour - - - Day - - - Week - - - Month - - - -
-
-
- - On: - - - } - label="All" - /> - - - S - - - M - - - T - - - W - - - T - - - F - - - S - -
-
- - } - label={ - - Allow editing cron expression. ( format is specified - - here - - ) - - } - /> -
- -
- Note: Start and end dates/times are handled outside of cron. -
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="Trigger type" + onChange={[Function]} required={true} select={true} + value={1} >
, - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "cron": "0 0 0 ? * 0,2,4,5,6", - "editCron": false, - "endDate": "2018-12-21", - "endTime": "07:53", - "hasEndDate": false, - "hasStartDate": false, - "intervalCategory": "Week", - "intervalValue": 1, - "maxConcurrentRuns": "10", - "selectedDays": Array [ - true, - false, - true, - false, - true, - true, - true, - ], - "startDate": "2018-12-21", - "startTime": "07:53", - "type": 1, - }, - "_rendered":
- - - Periodic - - - Cron - - -
- -
- - } - label="Has start date" - /> - - - -
-
- - } - label="Has end date" - /> - - - -
- - Run every - - - - Minute - - - Hour - - - Day - - - Week - - - Month - - - -
-
-
- - On: - - - } - label="All" - /> - - - S - - - M - - - T - - - W - - - T - - - F - - - S - -
-
- - } - label={ - - Allow editing cron expression. ( format is specified - - here - - ) - - } - /> -
- -
- Note: Start and end dates/times are handled outside of cron. -
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="Maximum concurrent runs" + onChange={[Function]} required={true} + value="10" />
, - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "cron": "0 0 0 ? * 0,2,4,5,6", - "editCron": false, - "endDate": "2018-12-21", - "endTime": "07:53", - "hasEndDate": false, - "hasStartDate": false, - "intervalCategory": "Week", - "intervalValue": 1, - "maxConcurrentRuns": "10", - "selectedDays": Array [ - true, - false, - true, - false, - true, - true, - true, - ], - "startDate": "2018-12-21", - "startTime": "07:53", - "type": 1, - }, - "_rendered":
- - - Periodic - - - Cron - - -
- -
- - } - label="Has start date" - /> - - - -
-
- - } - label="Has end date" - /> - - - -
- - Run every - - - - Minute - - - Hour - - - Day - - - Week - - - Month - - - -
-
-
- - On: - - - } - label="All" - /> - - - S - - - M - - - T - - - W - - - T - - - F - - - S - -
-
- - } - label={ - - Allow editing cron expression. ( format is specified - - here - - ) - - } - /> -
- -
- Note: Start and end dates/times are handled outside of cron. -
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="Start date" + onChange={[Function]} style={ Object { "visibility": "hidden", } } type="date" + value="2018-12-21" width={160} /> , - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "cron": "0 0 0 ? * 0,2,4,5,6", - "editCron": false, - "endDate": "2018-12-21", - "endTime": "07:53", - "hasEndDate": false, - "hasStartDate": false, - "intervalCategory": "Week", - "intervalValue": 1, - "maxConcurrentRuns": "10", - "selectedDays": Array [ - true, - false, - true, - false, - true, - true, - true, - ], - "startDate": "2018-12-21", - "startTime": "07:53", - "type": 1, - }, - "_rendered":
- - - Periodic - - - Cron - - -
- -
- - } - label="Has start date" - /> - - - -
-
- - } - label="Has end date" - /> - - - -
- - Run every - - - - Minute - - - Hour - - - Day - - - Week - - - Month - - - -
-
-
- - On: - - - } - label="All" - /> - - - S - - - M - - - T - - - W - - - T - - - F - - - S - -
-
- - } - label={ - - Allow editing cron expression. ( format is specified - - here - - ) - - } - /> -
- -
- Note: Start and end dates/times are handled outside of cron. -
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="Start time" + onChange={[Function]} style={ Object { "visibility": "hidden", } } type="time" + value="07:53" width={120} />
@@ -1366,670 +82,28 @@ exports[`Trigger enables a single day on click 1`] = ` label="Has end date" /> , - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "cron": "0 0 0 ? * 0,2,4,5,6", - "editCron": false, - "endDate": "2018-12-21", - "endTime": "07:53", - "hasEndDate": false, - "hasStartDate": false, - "intervalCategory": "Week", - "intervalValue": 1, - "maxConcurrentRuns": "10", - "selectedDays": Array [ - true, - false, - true, - false, - true, - true, - true, - ], - "startDate": "2018-12-21", - "startTime": "07:53", - "type": 1, - }, - "_rendered":
- - - Periodic - - - Cron - - -
- -
- - } - label="Has start date" - /> - - - -
-
- - } - label="Has end date" - /> - - - -
- - Run every - - - - Minute - - - Hour - - - Day - - - Week - - - Month - - - -
-
-
- - On: - - - } - label="All" - /> - - - S - - - M - - - T - - - W - - - T - - - F - - - S - -
-
- - } - label={ - - Allow editing cron expression. ( format is specified - - here - - ) - - } - /> -
- -
- Note: Start and end dates/times are handled outside of cron. -
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="End date" + onChange={[Function]} style={ Object { "visibility": "hidden", } } type="date" + value="2018-12-21" width={160} /> , - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "cron": "0 0 0 ? * 0,2,4,5,6", - "editCron": false, - "endDate": "2018-12-21", - "endTime": "07:53", - "hasEndDate": false, - "hasStartDate": false, - "intervalCategory": "Week", - "intervalValue": 1, - "maxConcurrentRuns": "10", - "selectedDays": Array [ - true, - false, - true, - false, - true, - true, - true, - ], - "startDate": "2018-12-21", - "startTime": "07:53", - "type": 1, - }, - "_rendered":
- - - Periodic - - - Cron - - -
- -
- - } - label="Has start date" - /> - - - -
-
- - } - label="Has end date" - /> - - - -
- - Run every - - - - Minute - - - Hour - - - Day - - - Week - - - Month - - - -
-
-
- - On: - - - } - label="All" - /> - - - S - - - M - - - T - - - W - - - T - - - F - - - S - -
-
- - } - label={ - - Allow editing cron expression. ( format is specified - - here - - ) - - } - /> -
- -
- Note: Start and end dates/times are handled outside of cron. -
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="End time" + onChange={[Function]} style={ Object { "visibility": "hidden", } } type="time" + value="07:53" width={120} />
@@ -2039,332 +113,11 @@ exports[`Trigger enables a single day on click 1`] = ` Run every , - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "cron": "0 0 0 ? * 0,2,4,5,6", - "editCron": false, - "endDate": "2018-12-21", - "endTime": "07:53", - "hasEndDate": false, - "hasStartDate": false, - "intervalCategory": "Week", - "intervalValue": 1, - "maxConcurrentRuns": "10", - "selectedDays": Array [ - true, - false, - true, - false, - true, - true, - true, - ], - "startDate": "2018-12-21", - "startTime": "07:53", - "type": 1, - }, - "_rendered":
- - - Periodic - - - Cron - - -
- -
- - } - label="Has start date" - /> - - - -
-
- - } - label="Has end date" - /> - - - -
- - Run every - - - - Minute - - - Hour - - - Day - - - Week - - - Month - - - -
-
-
- - On: - - - } - label="All" - /> - - - S - - - M - - - T - - - W - - - T - - - F - - - S - -
-
- - } - label={ - - Allow editing cron expression. ( format is specified - - here - - ) - - } - /> -
- -
- Note: Start and end dates/times are handled outside of cron. -
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } + onChange={[Function]} required={true} select={true} + value="Week" width={95} > , - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "cron": "0 0 0 ? * 0,2,4,5,6", - "editCron": false, - "endDate": "2018-12-21", - "endTime": "07:53", - "hasEndDate": false, - "hasStartDate": false, - "intervalCategory": "Week", - "intervalValue": 1, - "maxConcurrentRuns": "10", - "selectedDays": Array [ - true, - false, - true, - false, - true, - true, - true, - ], - "startDate": "2018-12-21", - "startTime": "07:53", - "type": 1, - }, - "_rendered":
- - - Periodic - - - Cron - - -
- -
- - } - label="Has start date" - /> - - - -
-
- - } - label="Has end date" - /> - - - -
- - Run every - - - - Minute - - - Hour - - - Day - - - Week - - - Month - - - -
-
-
- - On: - - - } - label="All" - /> - - - S - - - M - - - T - - - W - - - T - - - F - - - S - -
-
- - } - label={ - - Allow editing cron expression. ( format is specified - - here - - ) - - } - /> -
- -
- Note: Start and end dates/times are handled outside of cron. -
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="cron expression" onChange={[Function]} + value="0 0 0 ? * 0,2,4,5,6" width={300} />
@@ -2843,332 +274,11 @@ exports[`Trigger enables a single day on click 1`] = ` exports[`Trigger renders all week days enabled 1`] = `
, - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "cron": "0 0 0 ? *", - "editCron": false, - "endDate": "2018-12-21", - "endTime": "07:53", - "hasEndDate": false, - "hasStartDate": false, - "intervalCategory": "Week", - "intervalValue": 1, - "maxConcurrentRuns": "10", - "selectedDays": Array [ - false, - false, - false, - false, - false, - false, - false, - ], - "startDate": "2018-12-21", - "startTime": "07:53", - "type": 1, - }, - "_rendered":
- - - Periodic - - - Cron - - -
- -
- - } - label="Has start date" - /> - - - -
-
- - } - label="Has end date" - /> - - - -
- - Run every - - - - Minute - - - Hour - - - Day - - - Week - - - Month - - - -
-
-
- - On: - - - } - label="All" - /> - - - S - - - M - - - T - - - W - - - T - - - F - - - S - -
-
- - } - label={ - - Allow editing cron expression. ( format is specified - - here - - ) - - } - /> -
- -
- Note: Start and end dates/times are handled outside of cron. -
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="Trigger type" + onChange={[Function]} required={true} select={true} + value={1} >
, - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "cron": "0 0 0 ? *", - "editCron": false, - "endDate": "2018-12-21", - "endTime": "07:53", - "hasEndDate": false, - "hasStartDate": false, - "intervalCategory": "Week", - "intervalValue": 1, - "maxConcurrentRuns": "10", - "selectedDays": Array [ - false, - false, - false, - false, - false, - false, - false, - ], - "startDate": "2018-12-21", - "startTime": "07:53", - "type": 1, - }, - "_rendered":
- - - Periodic - - - Cron - - -
- -
- - } - label="Has start date" - /> - - - -
-
- - } - label="Has end date" - /> - - - -
- - Run every - - - - Minute - - - Hour - - - Day - - - Week - - - Month - - - -
-
-
- - On: - - - } - label="All" - /> - - - S - - - M - - - T - - - W - - - T - - - F - - - S - -
-
- - } - label={ - - Allow editing cron expression. ( format is specified - - here - - ) - - } - /> -
- -
- Note: Start and end dates/times are handled outside of cron. -
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="Maximum concurrent runs" + onChange={[Function]} required={true} + value="10" />
, - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "cron": "0 0 0 ? *", - "editCron": false, - "endDate": "2018-12-21", - "endTime": "07:53", - "hasEndDate": false, - "hasStartDate": false, - "intervalCategory": "Week", - "intervalValue": 1, - "maxConcurrentRuns": "10", - "selectedDays": Array [ - false, - false, - false, - false, - false, - false, - false, - ], - "startDate": "2018-12-21", - "startTime": "07:53", - "type": 1, - }, - "_rendered":
- - - Periodic - - - Cron - - -
- -
- - } - label="Has start date" - /> - - - -
-
- - } - label="Has end date" - /> - - - -
- - Run every - - - - Minute - - - Hour - - - Day - - - Week - - - Month - - - -
-
-
- - On: - - - } - label="All" - /> - - - S - - - M - - - T - - - W - - - T - - - F - - - S - -
-
- - } - label={ - - Allow editing cron expression. ( format is specified - - here - - ) - - } - /> -
- -
- Note: Start and end dates/times are handled outside of cron. -
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="Start date" + onChange={[Function]} style={ Object { "visibility": "hidden", } } type="date" + value="2018-12-21" width={160} /> , - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "cron": "0 0 0 ? *", - "editCron": false, - "endDate": "2018-12-21", - "endTime": "07:53", - "hasEndDate": false, - "hasStartDate": false, - "intervalCategory": "Week", - "intervalValue": 1, - "maxConcurrentRuns": "10", - "selectedDays": Array [ - false, - false, - false, - false, - false, - false, - false, - ], - "startDate": "2018-12-21", - "startTime": "07:53", - "type": 1, - }, - "_rendered":
- - - Periodic - - - Cron - - -
- -
- - } - label="Has start date" - /> - - - -
-
- - } - label="Has end date" - /> - - - -
- - Run every - - - - Minute - - - Hour - - - Day - - - Week - - - Month - - - -
-
-
- - On: - - - } - label="All" - /> - - - S - - - M - - - T - - - W - - - T - - - F - - - S - -
-
- - } - label={ - - Allow editing cron expression. ( format is specified - - here - - ) - - } - /> -
- -
- Note: Start and end dates/times are handled outside of cron. -
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="Start time" + onChange={[Function]} style={ Object { "visibility": "hidden", } } type="time" + value="07:53" width={120} />
@@ -4206,670 +353,28 @@ exports[`Trigger renders all week days enabled 1`] = ` label="Has end date" /> , - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "cron": "0 0 0 ? *", - "editCron": false, - "endDate": "2018-12-21", - "endTime": "07:53", - "hasEndDate": false, - "hasStartDate": false, - "intervalCategory": "Week", - "intervalValue": 1, - "maxConcurrentRuns": "10", - "selectedDays": Array [ - false, - false, - false, - false, - false, - false, - false, - ], - "startDate": "2018-12-21", - "startTime": "07:53", - "type": 1, - }, - "_rendered":
- - - Periodic - - - Cron - - -
- -
- - } - label="Has start date" - /> - - - -
-
- - } - label="Has end date" - /> - - - -
- - Run every - - - - Minute - - - Hour - - - Day - - - Week - - - Month - - - -
-
-
- - On: - - - } - label="All" - /> - - - S - - - M - - - T - - - W - - - T - - - F - - - S - -
-
- - } - label={ - - Allow editing cron expression. ( format is specified - - here - - ) - - } - /> -
- -
- Note: Start and end dates/times are handled outside of cron. -
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="End date" + onChange={[Function]} style={ Object { "visibility": "hidden", } } type="date" + value="2018-12-21" width={160} /> , - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "cron": "0 0 0 ? *", - "editCron": false, - "endDate": "2018-12-21", - "endTime": "07:53", - "hasEndDate": false, - "hasStartDate": false, - "intervalCategory": "Week", - "intervalValue": 1, - "maxConcurrentRuns": "10", - "selectedDays": Array [ - false, - false, - false, - false, - false, - false, - false, - ], - "startDate": "2018-12-21", - "startTime": "07:53", - "type": 1, - }, - "_rendered":
- - - Periodic - - - Cron - - -
- -
- - } - label="Has start date" - /> - - - -
-
- - } - label="Has end date" - /> - - - -
- - Run every - - - - Minute - - - Hour - - - Day - - - Week - - - Month - - - -
-
-
- - On: - - - } - label="All" - /> - - - S - - - M - - - T - - - W - - - T - - - F - - - S - -
-
- - } - label={ - - Allow editing cron expression. ( format is specified - - here - - ) - - } - /> -
- -
- Note: Start and end dates/times are handled outside of cron. -
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="End time" + onChange={[Function]} style={ Object { "visibility": "hidden", } } type="time" + value="07:53" width={120} />
@@ -4879,332 +384,11 @@ exports[`Trigger renders all week days enabled 1`] = ` Run every , - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "cron": "0 0 0 ? *", - "editCron": false, - "endDate": "2018-12-21", - "endTime": "07:53", - "hasEndDate": false, - "hasStartDate": false, - "intervalCategory": "Week", - "intervalValue": 1, - "maxConcurrentRuns": "10", - "selectedDays": Array [ - false, - false, - false, - false, - false, - false, - false, - ], - "startDate": "2018-12-21", - "startTime": "07:53", - "type": 1, - }, - "_rendered":
- - - Periodic - - - Cron - - -
- -
- - } - label="Has start date" - /> - - - -
-
- - } - label="Has end date" - /> - - - -
- - Run every - - - - Minute - - - Hour - - - Day - - - Week - - - Month - - - -
-
-
- - On: - - - } - label="All" - /> - - - S - - - M - - - T - - - W - - - T - - - F - - - S - -
-
- - } - label={ - - Allow editing cron expression. ( format is specified - - here - - ) - - } - /> -
- -
- Note: Start and end dates/times are handled outside of cron. -
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } + onChange={[Function]} required={true} select={true} + value="Week" width={95} > , - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "cron": "0 0 0 ? *", - "editCron": false, - "endDate": "2018-12-21", - "endTime": "07:53", - "hasEndDate": false, - "hasStartDate": false, - "intervalCategory": "Week", - "intervalValue": 1, - "maxConcurrentRuns": "10", - "selectedDays": Array [ - false, - false, - false, - false, - false, - false, - false, - ], - "startDate": "2018-12-21", - "startTime": "07:53", - "type": 1, - }, - "_rendered":
- - - Periodic - - - Cron - - -
- -
- - } - label="Has start date" - /> - - - -
-
- - } - label="Has end date" - /> - - - -
- - Run every - - - - Minute - - - Hour - - - Day - - - Week - - - Month - - - -
-
-
- - On: - - - } - label="All" - /> - - - S - - - M - - - T - - - W - - - T - - - F - - - S - -
-
- - } - label={ - - Allow editing cron expression. ( format is specified - - here - - ) - - } - /> -
- -
- Note: Start and end dates/times are handled outside of cron. -
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="cron expression" onChange={[Function]} + value="0 0 0 ? *" width={300} />
@@ -5683,237 +545,11 @@ exports[`Trigger renders all week days enabled 1`] = ` exports[`Trigger renders periodic schedule controls for initial render 1`] = `
, - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "cron": "0 * * * * ?", - "editCron": false, - "endDate": "2018-12-21", - "endTime": "07:53", - "hasEndDate": false, - "hasStartDate": false, - "intervalCategory": "Minute", - "intervalValue": 1, - "maxConcurrentRuns": "10", - "selectedDays": Array [ - true, - true, - true, - true, - true, - true, - true, - ], - "startDate": "2018-12-21", - "startTime": "07:53", - "type": 0, - }, - "_rendered":
- - - Periodic - - - Cron - - -
- -
- - } - label="Has start date" - /> - - - -
-
- - } - label="Has end date" - /> - - - -
- - Run every -
- - -
- - - - Minutes - - - Hours - - - Days - - - Weeks - - - Months - - -
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="Trigger type" + onChange={[Function]} required={true} select={true} + value={0} >
, - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "cron": "0 * * * * ?", - "editCron": false, - "endDate": "2018-12-21", - "endTime": "07:53", - "hasEndDate": false, - "hasStartDate": false, - "intervalCategory": "Minute", - "intervalValue": 1, - "maxConcurrentRuns": "10", - "selectedDays": Array [ - true, - true, - true, - true, - true, - true, - true, - ], - "startDate": "2018-12-21", - "startTime": "07:53", - "type": 0, - }, - "_rendered":
- - - Periodic - - - Cron - - -
- -
- - } - label="Has start date" - /> - - - -
-
- - } - label="Has end date" - /> - - - -
- - Run every -
- - -
- - - - Minutes - - - Hours - - - Days - - - Weeks - - - Months - - -
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="Maximum concurrent runs" + onChange={[Function]} required={true} + value="10" />
, - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "cron": "0 * * * * ?", - "editCron": false, - "endDate": "2018-12-21", - "endTime": "07:53", - "hasEndDate": false, - "hasStartDate": false, - "intervalCategory": "Minute", - "intervalValue": 1, - "maxConcurrentRuns": "10", - "selectedDays": Array [ - true, - true, - true, - true, - true, - true, - true, - ], - "startDate": "2018-12-21", - "startTime": "07:53", - "type": 0, - }, - "_rendered":
- - - Periodic - - - Cron - - -
- -
- - } - label="Has start date" - /> - - - -
-
- - } - label="Has end date" - /> - - - -
- - Run every -
- - -
- - - - Minutes - - - Hours - - - Days - - - Weeks - - - Months - - -
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="Start date" + onChange={[Function]} style={ Object { "visibility": "hidden", } } type="date" + value="2018-12-21" width={160} /> , - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "cron": "0 * * * * ?", - "editCron": false, - "endDate": "2018-12-21", - "endTime": "07:53", - "hasEndDate": false, - "hasStartDate": false, - "intervalCategory": "Minute", - "intervalValue": 1, - "maxConcurrentRuns": "10", - "selectedDays": Array [ - true, - true, - true, - true, - true, - true, - true, - ], - "startDate": "2018-12-21", - "startTime": "07:53", - "type": 0, - }, - "_rendered":
- - - Periodic - - - Cron - - -
- -
- - } - label="Has start date" - /> - - - -
-
- - } - label="Has end date" - /> - - - -
- - Run every -
- - -
- - - - Minutes - - - Hours - - - Days - - - Weeks - - - Months - - -
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="Start time" + onChange={[Function]} style={ Object { "visibility": "hidden", } } type="time" + value="07:53" width={120} />
@@ -6666,480 +624,28 @@ exports[`Trigger renders periodic schedule controls for initial render 1`] = ` label="Has end date" /> , - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "cron": "0 * * * * ?", - "editCron": false, - "endDate": "2018-12-21", - "endTime": "07:53", - "hasEndDate": false, - "hasStartDate": false, - "intervalCategory": "Minute", - "intervalValue": 1, - "maxConcurrentRuns": "10", - "selectedDays": Array [ - true, - true, - true, - true, - true, - true, - true, - ], - "startDate": "2018-12-21", - "startTime": "07:53", - "type": 0, - }, - "_rendered":
- - - Periodic - - - Cron - - -
- -
- - } - label="Has start date" - /> - - - -
-
- - } - label="Has end date" - /> - - - -
- - Run every -
- - -
- - - - Minutes - - - Hours - - - Days - - - Weeks - - - Months - - -
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="End date" + onChange={[Function]} style={ Object { "visibility": "hidden", } } type="date" + value="2018-12-21" width={160} /> , - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "cron": "0 * * * * ?", - "editCron": false, - "endDate": "2018-12-21", - "endTime": "07:53", - "hasEndDate": false, - "hasStartDate": false, - "intervalCategory": "Minute", - "intervalValue": 1, - "maxConcurrentRuns": "10", - "selectedDays": Array [ - true, - true, - true, - true, - true, - true, - true, - ], - "startDate": "2018-12-21", - "startTime": "07:53", - "type": 0, - }, - "_rendered":
- - - Periodic - - - Cron - - -
- -
- - } - label="Has start date" - /> - - - -
-
- - } - label="Has end date" - /> - - - -
- - Run every -
- - -
- - - - Minutes - - - Hours - - - Days - - - Weeks - - - Months - - -
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="End time" + onChange={[Function]} style={ Object { "visibility": "hidden", } } type="time" + value="07:53" width={120} />
@@ -7153,473 +659,21 @@ exports[`Trigger renders periodic schedule controls for initial render 1`] = ` , - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "cron": "0 * * * * ?", - "editCron": false, - "endDate": "2018-12-21", - "endTime": "07:53", - "hasEndDate": false, - "hasStartDate": false, - "intervalCategory": "Minute", - "intervalValue": 1, - "maxConcurrentRuns": "10", - "selectedDays": Array [ - true, - true, - true, - true, - true, - true, - true, - ], - "startDate": "2018-12-21", - "startTime": "07:53", - "type": 0, - }, - "_rendered":
- - - Periodic - - - Cron - - -
- -
- - } - label="Has start date" - /> - - - -
-
- - } - label="Has end date" - /> - - - -
- - Run every -
- - -
- - - - Minutes - - - Hours - - - Days - - - Weeks - - - Months - - -
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } + onChange={[Function]} required={true} type="number" + value={1} width={65} />
, - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "cron": "0 * * * * ?", - "editCron": false, - "endDate": "2018-12-21", - "endTime": "07:53", - "hasEndDate": false, - "hasStartDate": false, - "intervalCategory": "Minute", - "intervalValue": 1, - "maxConcurrentRuns": "10", - "selectedDays": Array [ - true, - true, - true, - true, - true, - true, - true, - ], - "startDate": "2018-12-21", - "startTime": "07:53", - "type": 0, - }, - "_rendered":
- - - Periodic - - - Cron - - -
- -
- - } - label="Has start date" - /> - - - -
-
- - } - label="Has end date" - /> - - - -
- - Run every -
- - -
- - - - Minutes - - - Hours - - - Days - - - Weeks - - - Months - - -
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } + onChange={[Function]} required={true} select={true} + value="Minute" width={95} > , - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "cron": "0 * * * * ?", - "editCron": false, - "endDate": "2018-12-21", - "endTime": "07:53", - "hasEndDate": false, - "hasStartDate": false, - "intervalCategory": "Minute", - "intervalValue": 1, - "maxConcurrentRuns": "10", - "selectedDays": Array [ - true, - true, - true, - true, - true, - true, - true, - ], - "startDate": "2018-12-21", - "startTime": "07:53", - "type": 1, - }, - "_rendered":
- - - Periodic - - - Cron - - -
- -
- - } - label="Has start date" - /> - - - -
-
- - } - label="Has end date" - /> - - - -
- - Run every - - - - Minute - - - Hour - - - Day - - - Week - - - Month - - - -
-
-
- - } - label={ - - Allow editing cron expression. ( format is specified - - here - - ) - - } - /> -
- -
- Note: Start and end dates/times are handled outside of cron. -
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="Trigger type" + onChange={[Function]} required={true} select={true} + value={1} >
, - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "cron": "0 * * * * ?", - "editCron": false, - "endDate": "2018-12-21", - "endTime": "07:53", - "hasEndDate": false, - "hasStartDate": false, - "intervalCategory": "Minute", - "intervalValue": 1, - "maxConcurrentRuns": "10", - "selectedDays": Array [ - true, - true, - true, - true, - true, - true, - true, - ], - "startDate": "2018-12-21", - "startTime": "07:53", - "type": 1, - }, - "_rendered":
- - - Periodic - - - Cron - - -
- -
- - } - label="Has start date" - /> - - - -
-
- - } - label="Has end date" - /> - - - -
- - Run every - - - - Minute - - - Hour - - - Day - - - Week - - - Month - - - -
-
-
- - } - label={ - - Allow editing cron expression. ( format is specified - - here - - ) - - } - /> -
- -
- Note: Start and end dates/times are handled outside of cron. -
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="Maximum concurrent runs" + onChange={[Function]} required={true} + value="10" />
, - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "cron": "0 * * * * ?", - "editCron": false, - "endDate": "2018-12-21", - "endTime": "07:53", - "hasEndDate": false, - "hasStartDate": false, - "intervalCategory": "Minute", - "intervalValue": 1, - "maxConcurrentRuns": "10", - "selectedDays": Array [ - true, - true, - true, - true, - true, - true, - true, - ], - "startDate": "2018-12-21", - "startTime": "07:53", - "type": 1, - }, - "_rendered":
- - - Periodic - - - Cron - - -
- -
- - } - label="Has start date" - /> - - - -
-
- - } - label="Has end date" - /> - - - -
- - Run every - - - - Minute - - - Hour - - - Day - - - Week - - - Month - - - -
-
-
- - } - label={ - - Allow editing cron expression. ( format is specified - - here - - ) - - } - /> -
- -
- Note: Start and end dates/times are handled outside of cron. -
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="Start date" + onChange={[Function]} style={ Object { "visibility": "hidden", } } type="date" + value="2018-12-21" width={160} /> , - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "cron": "0 * * * * ?", - "editCron": false, - "endDate": "2018-12-21", - "endTime": "07:53", - "hasEndDate": false, - "hasStartDate": false, - "intervalCategory": "Minute", - "intervalValue": 1, - "maxConcurrentRuns": "10", - "selectedDays": Array [ - true, - true, - true, - true, - true, - true, - true, - ], - "startDate": "2018-12-21", - "startTime": "07:53", - "type": 1, - }, - "_rendered":
- - - Periodic - - - Cron - - -
- -
- - } - label="Has start date" - /> - - - -
-
- - } - label="Has end date" - /> - - - -
- - Run every - - - - Minute - - - Hour - - - Day - - - Week - - - Month - - - -
-
-
- - } - label={ - - Allow editing cron expression. ( format is specified - - here - - ) - - } - /> -
- -
- Note: Start and end dates/times are handled outside of cron. -
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="Start time" + onChange={[Function]} style={ Object { "visibility": "hidden", } } type="time" + value="07:53" width={120} />
@@ -8736,526 +794,28 @@ exports[`Trigger renders periodic schedule controls if the trigger type is CRON label="Has end date" /> , - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "cron": "0 * * * * ?", - "editCron": false, - "endDate": "2018-12-21", - "endTime": "07:53", - "hasEndDate": false, - "hasStartDate": false, - "intervalCategory": "Minute", - "intervalValue": 1, - "maxConcurrentRuns": "10", - "selectedDays": Array [ - true, - true, - true, - true, - true, - true, - true, - ], - "startDate": "2018-12-21", - "startTime": "07:53", - "type": 1, - }, - "_rendered":
- - - Periodic - - - Cron - - -
- -
- - } - label="Has start date" - /> - - - -
-
- - } - label="Has end date" - /> - - - -
- - Run every - - - - Minute - - - Hour - - - Day - - - Week - - - Month - - - -
-
-
- - } - label={ - - Allow editing cron expression. ( format is specified - - here - - ) - - } - /> -
- -
- Note: Start and end dates/times are handled outside of cron. -
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="End date" + onChange={[Function]} style={ Object { "visibility": "hidden", } } type="date" + value="2018-12-21" width={160} /> , - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "cron": "0 * * * * ?", - "editCron": false, - "endDate": "2018-12-21", - "endTime": "07:53", - "hasEndDate": false, - "hasStartDate": false, - "intervalCategory": "Minute", - "intervalValue": 1, - "maxConcurrentRuns": "10", - "selectedDays": Array [ - true, - true, - true, - true, - true, - true, - true, - ], - "startDate": "2018-12-21", - "startTime": "07:53", - "type": 1, - }, - "_rendered":
- - - Periodic - - - Cron - - -
- -
- - } - label="Has start date" - /> - - - -
-
- - } - label="Has end date" - /> - - - -
- - Run every - - - - Minute - - - Hour - - - Day - - - Week - - - Month - - - -
-
-
- - } - label={ - - Allow editing cron expression. ( format is specified - - here - - ) - - } - /> -
- -
- Note: Start and end dates/times are handled outside of cron. -
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="End time" + onChange={[Function]} style={ Object { "visibility": "hidden", } } type="time" + value="07:53" width={120} />
@@ -9265,260 +825,11 @@ exports[`Trigger renders periodic schedule controls if the trigger type is CRON Run every , - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "cron": "0 * * * * ?", - "editCron": false, - "endDate": "2018-12-21", - "endTime": "07:53", - "hasEndDate": false, - "hasStartDate": false, - "intervalCategory": "Minute", - "intervalValue": 1, - "maxConcurrentRuns": "10", - "selectedDays": Array [ - true, - true, - true, - true, - true, - true, - true, - ], - "startDate": "2018-12-21", - "startTime": "07:53", - "type": 1, - }, - "_rendered":
- - - Periodic - - - Cron - - -
- -
- - } - label="Has start date" - /> - - - -
-
- - } - label="Has end date" - /> - - - -
- - Run every - - - - Minute - - - Hour - - - Day - - - Week - - - Month - - - -
-
-
- - } - label={ - - Allow editing cron expression. ( format is specified - - here - - ) - - } - /> -
- -
- Note: Start and end dates/times are handled outside of cron. -
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } + onChange={[Function]} required={true} select={true} + value="Minute" width={95} > , - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "cron": "0 * * * * ?", - "editCron": false, - "endDate": "2018-12-21", - "endTime": "07:53", - "hasEndDate": false, - "hasStartDate": false, - "intervalCategory": "Minute", - "intervalValue": 1, - "maxConcurrentRuns": "10", - "selectedDays": Array [ - true, - true, - true, - true, - true, - true, - true, - ], - "startDate": "2018-12-21", - "startTime": "07:53", - "type": 1, - }, - "_rendered":
- - - Periodic - - - Cron - - -
- -
- - } - label="Has start date" - /> - - - -
-
- - } - label="Has end date" - /> - - - -
- - Run every - - - - Minute - - - Hour - - - Day - - - Week - - - Month - - - -
-
-
- - } - label={ - - Allow editing cron expression. ( format is specified - - here - - ) - - } - /> -
- -
- Note: Start and end dates/times are handled outside of cron. -
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="cron expression" onChange={[Function]} + value="0 * * * * ?" width={300} />
@@ -9846,332 +907,11 @@ exports[`Trigger renders periodic schedule controls if the trigger type is CRON exports[`Trigger renders week days if the trigger type is CRON and interval is weekly 1`] = `
, - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "cron": "0 0 0 ? * *", - "editCron": false, - "endDate": "2018-12-21", - "endTime": "07:53", - "hasEndDate": false, - "hasStartDate": false, - "intervalCategory": "Week", - "intervalValue": 1, - "maxConcurrentRuns": "10", - "selectedDays": Array [ - true, - true, - true, - true, - true, - true, - true, - ], - "startDate": "2018-12-21", - "startTime": "07:53", - "type": 1, - }, - "_rendered":
- - - Periodic - - - Cron - - -
- -
- - } - label="Has start date" - /> - - - -
-
- - } - label="Has end date" - /> - - - -
- - Run every - - - - Minute - - - Hour - - - Day - - - Week - - - Month - - - -
-
-
- - On: - - - } - label="All" - /> - - - S - - - M - - - T - - - W - - - T - - - F - - - S - -
-
- - } - label={ - - Allow editing cron expression. ( format is specified - - here - - ) - - } - /> -
- -
- Note: Start and end dates/times are handled outside of cron. -
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="Trigger type" + onChange={[Function]} required={true} select={true} + value={1} >
, - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "cron": "0 0 0 ? * *", - "editCron": false, - "endDate": "2018-12-21", - "endTime": "07:53", - "hasEndDate": false, - "hasStartDate": false, - "intervalCategory": "Week", - "intervalValue": 1, - "maxConcurrentRuns": "10", - "selectedDays": Array [ - true, - true, - true, - true, - true, - true, - true, - ], - "startDate": "2018-12-21", - "startTime": "07:53", - "type": 1, - }, - "_rendered":
- - - Periodic - - - Cron - - -
- -
- - } - label="Has start date" - /> - - - -
-
- - } - label="Has end date" - /> - - - -
- - Run every - - - - Minute - - - Hour - - - Day - - - Week - - - Month - - - -
-
-
- - On: - - - } - label="All" - /> - - - S - - - M - - - T - - - W - - - T - - - F - - - S - -
-
- - } - label={ - - Allow editing cron expression. ( format is specified - - here - - ) - - } - /> -
- -
- Note: Start and end dates/times are handled outside of cron. -
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="Maximum concurrent runs" + onChange={[Function]} required={true} + value="10" />
, - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "cron": "0 0 0 ? * *", - "editCron": false, - "endDate": "2018-12-21", - "endTime": "07:53", - "hasEndDate": false, - "hasStartDate": false, - "intervalCategory": "Week", - "intervalValue": 1, - "maxConcurrentRuns": "10", - "selectedDays": Array [ - true, - true, - true, - true, - true, - true, - true, - ], - "startDate": "2018-12-21", - "startTime": "07:53", - "type": 1, - }, - "_rendered":
- - - Periodic - - - Cron - - -
- -
- - } - label="Has start date" - /> - - - -
-
- - } - label="Has end date" - /> - - - -
- - Run every - - - - Minute - - - Hour - - - Day - - - Week - - - Month - - - -
-
-
- - On: - - - } - label="All" - /> - - - S - - - M - - - T - - - W - - - T - - - F - - - S - -
-
- - } - label={ - - Allow editing cron expression. ( format is specified - - here - - ) - - } - /> -
- -
- Note: Start and end dates/times are handled outside of cron. -
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="Start date" + onChange={[Function]} style={ Object { "visibility": "hidden", } } type="date" + value="2018-12-21" width={160} /> , - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "cron": "0 0 0 ? * *", - "editCron": false, - "endDate": "2018-12-21", - "endTime": "07:53", - "hasEndDate": false, - "hasStartDate": false, - "intervalCategory": "Week", - "intervalValue": 1, - "maxConcurrentRuns": "10", - "selectedDays": Array [ - true, - true, - true, - true, - true, - true, - true, - ], - "startDate": "2018-12-21", - "startTime": "07:53", - "type": 1, - }, - "_rendered":
- - - Periodic - - - Cron - - -
- -
- - } - label="Has start date" - /> - - - -
-
- - } - label="Has end date" - /> - - - -
- - Run every - - - - Minute - - - Hour - - - Day - - - Week - - - Month - - - -
-
-
- - On: - - - } - label="All" - /> - - - S - - - M - - - T - - - W - - - T - - - F - - - S - -
-
- - } - label={ - - Allow editing cron expression. ( format is specified - - here - - ) - - } - /> -
- -
- Note: Start and end dates/times are handled outside of cron. -
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="Start time" + onChange={[Function]} style={ Object { "visibility": "hidden", } } type="time" + value="07:53" width={120} />
@@ -11209,670 +986,28 @@ exports[`Trigger renders week days if the trigger type is CRON and interval is w label="Has end date" /> , - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "cron": "0 0 0 ? * *", - "editCron": false, - "endDate": "2018-12-21", - "endTime": "07:53", - "hasEndDate": false, - "hasStartDate": false, - "intervalCategory": "Week", - "intervalValue": 1, - "maxConcurrentRuns": "10", - "selectedDays": Array [ - true, - true, - true, - true, - true, - true, - true, - ], - "startDate": "2018-12-21", - "startTime": "07:53", - "type": 1, - }, - "_rendered":
- - - Periodic - - - Cron - - -
- -
- - } - label="Has start date" - /> - - - -
-
- - } - label="Has end date" - /> - - - -
- - Run every - - - - Minute - - - Hour - - - Day - - - Week - - - Month - - - -
-
-
- - On: - - - } - label="All" - /> - - - S - - - M - - - T - - - W - - - T - - - F - - - S - -
-
- - } - label={ - - Allow editing cron expression. ( format is specified - - here - - ) - - } - /> -
- -
- Note: Start and end dates/times are handled outside of cron. -
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="End date" + onChange={[Function]} style={ Object { "visibility": "hidden", } } type="date" + value="2018-12-21" width={160} /> , - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "cron": "0 0 0 ? * *", - "editCron": false, - "endDate": "2018-12-21", - "endTime": "07:53", - "hasEndDate": false, - "hasStartDate": false, - "intervalCategory": "Week", - "intervalValue": 1, - "maxConcurrentRuns": "10", - "selectedDays": Array [ - true, - true, - true, - true, - true, - true, - true, - ], - "startDate": "2018-12-21", - "startTime": "07:53", - "type": 1, - }, - "_rendered":
- - - Periodic - - - Cron - - -
- -
- - } - label="Has start date" - /> - - - -
-
- - } - label="Has end date" - /> - - - -
- - Run every - - - - Minute - - - Hour - - - Day - - - Week - - - Month - - - -
-
-
- - On: - - - } - label="All" - /> - - - S - - - M - - - T - - - W - - - T - - - F - - - S - -
-
- - } - label={ - - Allow editing cron expression. ( format is specified - - here - - ) - - } - /> -
- -
- Note: Start and end dates/times are handled outside of cron. -
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="End time" + onChange={[Function]} style={ Object { "visibility": "hidden", } } type="time" + value="07:53" width={120} />
@@ -11882,332 +1017,11 @@ exports[`Trigger renders week days if the trigger type is CRON and interval is w Run every , - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "cron": "0 0 0 ? * *", - "editCron": false, - "endDate": "2018-12-21", - "endTime": "07:53", - "hasEndDate": false, - "hasStartDate": false, - "intervalCategory": "Week", - "intervalValue": 1, - "maxConcurrentRuns": "10", - "selectedDays": Array [ - true, - true, - true, - true, - true, - true, - true, - ], - "startDate": "2018-12-21", - "startTime": "07:53", - "type": 1, - }, - "_rendered":
- - - Periodic - - - Cron - - -
- -
- - } - label="Has start date" - /> - - - -
-
- - } - label="Has end date" - /> - - - -
- - Run every - - - - Minute - - - Hour - - - Day - - - Week - - - Month - - - -
-
-
- - On: - - - } - label="All" - /> - - - S - - - M - - - T - - - W - - - T - - - F - - - S - -
-
- - } - label={ - - Allow editing cron expression. ( format is specified - - here - - ) - - } - /> -
- -
- Note: Start and end dates/times are handled outside of cron. -
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } + onChange={[Function]} required={true} select={true} + value="Week" width={95} > , - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "cron": "0 0 0 ? * *", - "editCron": false, - "endDate": "2018-12-21", - "endTime": "07:53", - "hasEndDate": false, - "hasStartDate": false, - "intervalCategory": "Week", - "intervalValue": 1, - "maxConcurrentRuns": "10", - "selectedDays": Array [ - true, - true, - true, - true, - true, - true, - true, - ], - "startDate": "2018-12-21", - "startTime": "07:53", - "type": 1, - }, - "_rendered":
- - - Periodic - - - Cron - - -
- -
- - } - label="Has start date" - /> - - - -
-
- - } - label="Has end date" - /> - - - -
- - Run every - - - - Minute - - - Hour - - - Day - - - Week - - - Month - - - -
-
-
- - On: - - - } - label="All" - /> - - - S - - - M - - - T - - - W - - - T - - - F - - - S - -
-
- - } - label={ - - Allow editing cron expression. ( format is specified - - here - - ) - - } - /> -
- -
- Note: Start and end dates/times are handled outside of cron. -
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="cron expression" onChange={[Function]} + value="0 0 0 ? * *" width={300} />
diff --git a/frontend/src/components/__snapshots__/UploadPipelineDialog.test.tsx.snap b/frontend/src/components/__snapshots__/UploadPipelineDialog.test.tsx.snap index 56f5fd4e963..c8d2353b2c7 100644 --- a/frontend/src/components/__snapshots__/UploadPipelineDialog.test.tsx.snap +++ b/frontend/src/components/__snapshots__/UploadPipelineDialog.test.tsx.snap @@ -73,309 +73,17 @@ exports[`UploadPipelineDialog renders an active dropzone 1`] = ` "readOnly": true, } } - field="fileName" - instance={ - UploadPipelineDialog { - "_dropzoneRef": Object { - "current": null, - }, - "context": Object {}, - "handleChange": [Function], - "props": Object { - "onClose": [MockFunction], - "open": false, - }, - "refs": Object {}, - "setState": [Function], - "state": Object { - "busy": false, - "dropzoneActive": true, - "file": null, - "fileName": "", - "uploadPipelineDescription": "", - "uploadPipelineName": "", - }, - "updater": Updater { - "_callbacks": Array [], - "_renderer": ReactShallowRenderer { - "_context": Object {}, - "_element": , - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "busy": false, - "dropzoneActive": true, - "file": null, - "fileName": "", - "uploadPipelineDescription": "", - "uploadPipelineName": "", - }, - "_rendered": - - Upload and name your pipeline - - -
- Drop files.. -
-
- Choose a pipeline package file from your computer, and give the pipeline a unique name. -
- You can also drag and drop the file here. -
- - - Choose file - - , - "readOnly": true, - } - } - field="fileName" - instance={[Circular]} - label="File" - required={true} - /> - -
- - - - Cancel - - -
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="File" + onChange={[Function]} required={true} + value="" /> , - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "busy": false, - "dropzoneActive": true, - "file": null, - "fileName": "", - "uploadPipelineDescription": "", - "uploadPipelineName": "", - }, - "_rendered": - - Upload and name your pipeline - - -
- Drop files.. -
-
- Choose a pipeline package file from your computer, and give the pipeline a unique name. -
- You can also drag and drop the file here. -
- - - Choose file - - , - "readOnly": true, - } - } - field="fileName" - instance={[Circular]} - label="File" - required={true} - /> - -
- - - - Cancel - - -
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="Pipeline name" + onChange={[Function]} required={true} + value="" /> @@ -464,285 +172,17 @@ exports[`UploadPipelineDialog renders closed 1`] = ` "readOnly": true, } } - field="fileName" - instance={ - UploadPipelineDialog { - "_dropzoneRef": Object { - "current": null, - }, - "context": Object {}, - "handleChange": [Function], - "props": Object { - "onClose": [MockFunction], - "open": false, - }, - "refs": Object {}, - "setState": [Function], - "state": Object { - "busy": false, - "dropzoneActive": false, - "file": null, - "fileName": "", - "uploadPipelineDescription": "", - "uploadPipelineName": "", - }, - "updater": Updater { - "_callbacks": Array [], - "_renderer": ReactShallowRenderer { - "_context": Object {}, - "_element": , - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": null, - "_rendered": - - Upload and name your pipeline - - -
- Choose a pipeline package file from your computer, and give the pipeline a unique name. -
- You can also drag and drop the file here. -
- - - Choose file - - , - "readOnly": true, - } - } - field="fileName" - instance={[Circular]} - label="File" - required={true} - /> - -
- - - - Cancel - - -
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="File" + onChange={[Function]} required={true} + value="" /> , - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": null, - "_rendered": - - Upload and name your pipeline - - -
- Choose a pipeline package file from your computer, and give the pipeline a unique name. -
- You can also drag and drop the file here. -
- - - Choose file - - , - "readOnly": true, - } - } - field="fileName" - instance={[Circular]} - label="File" - required={true} - /> - -
- - - - Cancel - - -
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="Pipeline name" + onChange={[Function]} required={true} + value="" /> @@ -831,285 +271,17 @@ exports[`UploadPipelineDialog renders open 1`] = ` "readOnly": true, } } - field="fileName" - instance={ - UploadPipelineDialog { - "_dropzoneRef": Object { - "current": null, - }, - "context": Object {}, - "handleChange": [Function], - "props": Object { - "onClose": [MockFunction], - "open": false, - }, - "refs": Object {}, - "setState": [Function], - "state": Object { - "busy": false, - "dropzoneActive": false, - "file": null, - "fileName": "", - "uploadPipelineDescription": "", - "uploadPipelineName": "", - }, - "updater": Updater { - "_callbacks": Array [], - "_renderer": ReactShallowRenderer { - "_context": Object {}, - "_element": , - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": null, - "_rendered": - - Upload and name your pipeline - - -
- Choose a pipeline package file from your computer, and give the pipeline a unique name. -
- You can also drag and drop the file here. -
- - - Choose file - - , - "readOnly": true, - } - } - field="fileName" - instance={[Circular]} - label="File" - required={true} - /> - -
- - - - Cancel - - -
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="File" + onChange={[Function]} required={true} + value="" /> , - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": null, - "_rendered": - - Upload and name your pipeline - - -
- Choose a pipeline package file from your computer, and give the pipeline a unique name. -
- You can also drag and drop the file here. -
- - - Choose file - - , - "readOnly": true, - } - } - field="fileName" - instance={[Circular]} - label="File" - required={true} - /> - -
- - - - Cancel - - -
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="Pipeline name" + onChange={[Function]} required={true} + value="" /> @@ -1198,303 +370,17 @@ exports[`UploadPipelineDialog renders with a selected file to upload 1`] = ` "readOnly": true, } } - field="fileName" - instance={ - UploadPipelineDialog { - "_dropzoneRef": Object { - "current": null, - }, - "context": Object {}, - "handleChange": [Function], - "props": Object { - "onClose": [MockFunction], - "open": false, - }, - "refs": Object {}, - "setState": [Function], - "state": Object { - "busy": false, - "dropzoneActive": false, - "file": null, - "fileName": "", - "fileToUpload": true, - "uploadPipelineDescription": "", - "uploadPipelineName": "", - }, - "updater": Updater { - "_callbacks": Array [], - "_renderer": ReactShallowRenderer { - "_context": Object {}, - "_element": , - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "busy": false, - "dropzoneActive": false, - "file": null, - "fileName": "", - "fileToUpload": true, - "uploadPipelineDescription": "", - "uploadPipelineName": "", - }, - "_rendered": - - Upload and name your pipeline - - -
- Choose a pipeline package file from your computer, and give the pipeline a unique name. -
- You can also drag and drop the file here. -
- - - Choose file - - , - "readOnly": true, - } - } - field="fileName" - instance={[Circular]} - label="File" - required={true} - /> - -
- - - - Cancel - - -
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="File" + onChange={[Function]} required={true} + value="" /> , - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "busy": false, - "dropzoneActive": false, - "file": null, - "fileName": "", - "fileToUpload": true, - "uploadPipelineDescription": "", - "uploadPipelineName": "", - }, - "_rendered": - - Upload and name your pipeline - - -
- Choose a pipeline package file from your computer, and give the pipeline a unique name. -
- You can also drag and drop the file here. -
- - - Choose file - - , - "readOnly": true, - } - } - field="fileName" - instance={[Circular]} - label="File" - required={true} - /> - -
- - - - Cancel - - -
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="Pipeline name" + onChange={[Function]} required={true} + value="" /> diff --git a/frontend/src/pages/NewExperiment.tsx b/frontend/src/pages/NewExperiment.tsx index 1f99ae1bba6..93a3e0c9623 100644 --- a/frontend/src/pages/NewExperiment.tsx +++ b/frontend/src/pages/NewExperiment.tsx @@ -73,7 +73,7 @@ class NewExperiment extends Page<{}, NewExperimentState> { } public render(): JSX.Element { - const { validationError } = this.state; + const { description, experimentName, isbeingCreated, validationError } = this.state; return (
@@ -87,12 +87,13 @@ class NewExperiment extends Page<{}, NewExperimentState> {
+ required={true} onChange={this.handleChange('experimentName')} value={experimentName} + autoFocus={true} /> + onChange={this.handleChange('description')} value={description} />
-
, - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "description": "", - "experimentName": "experiment name", - "isbeingCreated": false, - "validationError": "", - }, - "_rendered":
-
-
- Experiment details -
-
- Think of an Experiment as a space that contains the history of all pipelines and their associated runs -
- - -
- - - Cancel - -
- -
-
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="Experiment name" + onChange={[Function]} required={true} + value="experiment name" /> , - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "description": "", - "experimentName": "experiment name", - "isbeingCreated": false, - "validationError": "", - }, - "_rendered":
-
-
- Experiment details -
-
- Think of an Experiment as a space that contains the history of all pipelines and their associated runs -
- - -
- - - Cancel - -
- -
-
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="Description (optional)" multiline={true} + onChange={[Function]} + value="" />
, - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "description": "", - "experimentName": "", - "isbeingCreated": false, - "validationError": "Experiment name is required", - }, - "_rendered":
-
-
- Experiment details -
-
- Think of an Experiment as a space that contains the history of all pipelines and their associated runs -
- - -
- - - Cancel - -
- Experiment name is required -
-
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="Experiment name" + onChange={[Function]} required={true} + value="" /> , - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "description": "", - "experimentName": "", - "isbeingCreated": false, - "validationError": "Experiment name is required", - }, - "_rendered":
-
-
- Experiment details -
-
- Think of an Experiment as a space that contains the history of all pipelines and their associated runs -
- - -
- - - Cancel - -
- Experiment name is required -
-
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="Description (optional)" multiline={true} + onChange={[Function]} + value="" />
, - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "description": "", - "experimentName": "", - "isbeingCreated": false, - "validationError": "Experiment name is required", - }, - "_rendered":
-
-
- Experiment details -
-
- Think of an Experiment as a space that contains the history of all pipelines and their associated runs -
- - -
- - - Cancel - -
- Experiment name is required -
-
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="Experiment name" + onChange={[Function]} required={true} + value="" /> , - "_forcedUpdate": false, - "_instance": [Circular], - "_newState": Object { - "description": "", - "experimentName": "", - "isbeingCreated": false, - "validationError": "Experiment name is required", - }, - "_rendered":
-
-
- Experiment details -
-
- Think of an Experiment as a space that contains the history of all pipelines and their associated runs -
- - -
- - - Cancel - -
- Experiment name is required -
-
-
-
, - "_rendering": false, - "_updater": [Circular], - }, - }, - Symbol(enzyme.__setState__): [Function], - } - } label="Description (optional)" multiline={true} + onChange={[Function]} + value="" />