IO-2327 Intake checklist tests
This commit is contained in:
@@ -16,7 +16,7 @@ export default function JobIntakeFormCheckboxComponent({ formItem, readOnly }) {
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Checkbox disabled={readOnly} />
|
||||
<Checkbox data-cy="checklist-item-checkbox" disabled={readOnly} />
|
||||
</Form.Item>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -199,6 +199,7 @@ export function JobChecklistForm({
|
||||
extra={
|
||||
!readOnly && (
|
||||
<Button
|
||||
data-cy="checklist-submit-button"
|
||||
loading={loading}
|
||||
type="primary"
|
||||
onClick={() => form.submit()}
|
||||
@@ -209,6 +210,7 @@ export function JobChecklistForm({
|
||||
}
|
||||
>
|
||||
<Form
|
||||
data-cy="checklist-form"
|
||||
form={form}
|
||||
onFinish={handleFinish}
|
||||
initialValues={{
|
||||
@@ -256,7 +258,7 @@ export function JobChecklistForm({
|
||||
label={t("checklist.labels.addtoproduction")}
|
||||
disabled={readOnly}
|
||||
>
|
||||
<Switch disabled={readOnly} />
|
||||
<Switch data-cy="add-to-production-switch" disabled={readOnly} />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name="allow_text_message"
|
||||
@@ -292,7 +294,11 @@ export function JobChecklistForm({
|
||||
disabled={readOnly}
|
||||
trigger="onChange"
|
||||
>
|
||||
<Input.TextArea rows={3} disabled={readOnly} />
|
||||
<Input.TextArea
|
||||
data-cy="checklist-production-note"
|
||||
rows={3}
|
||||
disabled={readOnly}
|
||||
/>
|
||||
</Form.Item>
|
||||
</div>
|
||||
)}
|
||||
@@ -324,7 +330,11 @@ export function JobChecklistForm({
|
||||
label={t("checklist.labels.removefromproduction")}
|
||||
disabled={readOnly}
|
||||
>
|
||||
<Switch disabled={readOnly} defaultChecked={true} />
|
||||
<Switch
|
||||
data-cy="remove-from-production"
|
||||
disabled={readOnly}
|
||||
defaultChecked={true}
|
||||
/>
|
||||
</Form.Item>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -196,6 +196,7 @@ export function JobsDetailHeaderActions({
|
||||
</Popover>
|
||||
</Menu.Item>
|
||||
<Menu.Item
|
||||
data-cy="job-intake-button"
|
||||
disabled={
|
||||
!!job.intakechecklist ||
|
||||
!jobInPreProduction ||
|
||||
@@ -214,7 +215,7 @@ export function JobsDetailHeaderActions({
|
||||
</Link>
|
||||
)}
|
||||
</Menu.Item>
|
||||
<Menu.Item disabled={!jobInProduction || jobRO}>
|
||||
<Menu.Item data-cy="job-deliver" disabled={!jobInProduction || jobRO}>
|
||||
{!jobInProduction ? (
|
||||
t("jobs.actions.deliver")
|
||||
) : (
|
||||
@@ -223,7 +224,7 @@ export function JobsDetailHeaderActions({
|
||||
</Link>
|
||||
)}
|
||||
</Menu.Item>
|
||||
<Menu.Item disabled={!job.converted}>
|
||||
<Menu.Item data-cy="job-checklist" disabled={!job.converted}>
|
||||
<Link to={`/manage/jobs/${job.id}/checklist`}>
|
||||
{t("jobs.actions.viewchecklist")}
|
||||
</Link>
|
||||
@@ -517,7 +518,7 @@ export function JobsDetailHeaderActions({
|
||||
);
|
||||
return (
|
||||
<Dropdown overlay={statusmenu} trigger={["click"]} key="changestatus">
|
||||
<Button>
|
||||
<Button data-cy="job-actions-button">
|
||||
<span>{t("general.labels.actions")}</span>
|
||||
|
||||
<DownCircleFilled />
|
||||
|
||||
Reference in New Issue
Block a user