IO-2327 posting bills test cases

This commit is contained in:
swtmply
2023-08-21 15:07:04 +08:00
parent e89145e85f
commit e74ba0942e
3 changed files with 27 additions and 4 deletions

View File

@@ -188,7 +188,7 @@ describe.only(
.contains("Backordered");
});
it.only("order parts inhouse", () => {
it("order parts inhouse", () => {
cy.get('[data-cy="tab-repairdata"]').should("be.visible").click();
// Click on filter parts only
cy.get('[data-cy="filter-parts-button"]')
@@ -225,6 +225,25 @@ describe.only(
.contains("Received");
});
it("check inhouse bill to have extra actions", () => {
cy.get('[data-cy="tab-partssublet"]').should("be.visible").click();
cy.get('[data-cy="bills-table"]')
.find(".ant-table-tbody")
.find("> tr:not(.ant-table-measure-row)")
.as("bills-table")
.should("not.have.class", "ant-table-placeholder");
cy.get("@bills-table")
.contains("$0.00")
.parent()
.parent()
.first()
.find('[data-cy="print-wrapper"]')
.should("exist");
});
// select no in job estimate
it("posts bill directly", () => {
cy.get('[data-cy="tab-partssublet"]').should("be.visible").click();
@@ -237,7 +256,9 @@ describe.only(
// Select Vendor
cy.antdSelect("bill-vendor");
// Select Line
cy.antdSelect("bill-line", "-- Not On Estimate --");
cy.antdSelect("bill-line");
cy.get('[data-cy="bill-line-line-desc"]').type("Line Description");
// Fill the Form
cy.get('[data-cy="bill-form-invoice"]').type(uuid());

View File

@@ -134,7 +134,9 @@ export function BillEnterModalLinesComponent({
],
};
},
formInput: (record, index) => <Input disabled={disabled} />,
formInput: (record, index) => (
<Input data-cy="bill-line-line-desc" disabled={disabled} />
),
},
{
title: t("billlines.fields.quantity"),

View File

@@ -18,7 +18,7 @@ export default function PrintWrapperComponent({
};
return (
<Space>
<Space data-cy="print-wrapper">
{children || null}
{!emailOnly && <PrinterFilled onClick={() => handlePrint("p")} />}
<MailFilled onClick={() => handlePrint("e")} />