Skip to content

Commit

Permalink
modified more tests, made equality check stricter
Browse files Browse the repository at this point in the history
  • Loading branch information
carmen-chau committed Jan 14, 2024
1 parent b2b70cc commit 2ef7970
Showing 1 changed file with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ describe("<SimplePendingOrderFulfillmentTable />", () => {
const { queryByDisplayValue, getByDisplayValue } = within(
getByTestId(`admin-simple-pending-order-${order.id}`)
);
if (order.status == "Submitted") {
if (order.status === "Packing") {
/*TODO: Changed from status === "Submitted" to status === "Packing"*/
order.hardwareInTableRow.forEach(({ id }) => {
expect(getByDisplayValue(`hardware-${id}`)).toBeInTheDocument();
});
Expand All @@ -104,7 +105,9 @@ describe("<SimplePendingOrderFulfillmentTable />", () => {
});

mockPendingOrdersInTable
.filter(({ status }) => status === "Submitted")
.filter(
({ status }) => status === "Packing"
) /*TODO: Changed from status === "Submitted" to status === "Packing"*/
.map(({ id }) => {
const { getByText } = within(
getByTestId(`admin-simple-pending-order-${id}`)
Expand All @@ -119,7 +122,9 @@ describe("<SimplePendingOrderFulfillmentTable />", () => {
});

const order = mockPendingOrdersInTable.find(
({ status }) => status === "Submitted"
({ status }) =>
status ===
"Packing" /*TODO: Changed from status === "Submitted" to status === "Packing"*/
);

if (order) {
Expand Down Expand Up @@ -150,7 +155,9 @@ describe("<SimplePendingOrderFulfillmentTable />", () => {
});

const order = mockPendingOrdersInTable.find(
({ status }) => status === "Submitted"
({ status }) =>
status ===
"Packing" /*TODO: Changed from status === "Submitted" to status === "Packing"*/
);

if (order) {
Expand Down

0 comments on commit 2ef7970

Please sign in to comment.