IO-2327 posting bills tests cases

This commit is contained in:
swtmply
2023-07-03 09:06:58 +08:00
parent 39f7a3c870
commit fc09871a47
12 changed files with 370 additions and 46 deletions

View File

@@ -194,8 +194,14 @@ export function BillDetailEditcontainer({
{t("general.actions.save")}
</Button>
</Popconfirm>
<BillReeportButtonComponent bill={data && data.bills_by_pk} />
<BillMarkExportedButton bill={data && data.bills_by_pk} />
<BillReeportButtonComponent
data-cy="bill-mark-reexport-button"
bill={data && data.bills_by_pk}
/>
<BillMarkExportedButton
data-cy="bill-mark-export-button"
bill={data && data.bills_by_pk}
/>
</Space>
}
/>

View File

@@ -77,11 +77,14 @@ export function BillDetailEditReturn({
return (
<>
<Modal
visible={visible}
open={visible}
onCancel={() => setVisible(false)}
destroyOnClose
title={t("bills.actions.return")}
onOk={() => form.submit()}
okButtonProps={{
"data-cy": "billline-return-items-ok-button",
}}
>
<Form
initialValues={data && data.bills_by_pk}
@@ -124,7 +127,7 @@ export function BillDetailEditReturn({
name={[field.name, "selected"]}
valuePropName="checked"
>
<Checkbox />
<Checkbox data-cy="billline-checkbox" />
</Form.Item>
</td>
<td>
@@ -173,6 +176,7 @@ export function BillDetailEditReturn({
</Form>
</Modal>
<Button
data-cy="return-items-button"
disabled={data.bills_by_pk.is_credit_memo || disabled}
onClick={() => {
setVisible(true);