Skip to content

Commit

Permalink
fixed e2e tests #503
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoGuarnaccia5 committed Apr 25, 2024
1 parent 6064935 commit dd5304f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cypress/e2e/with_mock_data/catalogueCategories.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,8 @@ describe('Catalogue Category', () => {
{
name: 'Updated Field 2',
type: 'number',
unit: 'millimeters',
mandatory: false,
unit: 'millimeters',
},
],
})
Expand Down
14 changes: 8 additions & 6 deletions src/items/itemDialog.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,12 @@ function ItemDialog(props: ItemDialogProps) {

setItemDetails({
...updatedItemDetails,
warranty_end_date: itemDetails.warranty_end_date
? new Date(itemDetails.warranty_end_date)
: null,
delivered_date: itemDetails.delivered_date
? new Date(itemDetails.delivered_date)
: null,
warranty_end_date: updatedItemDetails.warranty_end_date
? new Date(updatedItemDetails.warranty_end_date)
: itemDetails.warranty_end_date,
delivered_date: updatedItemDetails.delivered_date
? new Date(updatedItemDetails.delivered_date)
: itemDetails.delivered_date,
});
setFormErrorMessage(undefined);
},
Expand Down Expand Up @@ -719,6 +719,7 @@ function ItemDialog(props: ItemDialogProps) {

<Grid item xs={12}>
<DatePicker
readOnly={false}
label="Warranty end date"
value={itemDetails.warranty_end_date}
onChange={(date) =>
Expand All @@ -738,6 +739,7 @@ function ItemDialog(props: ItemDialogProps) {
</Grid>
<Grid item xs={12}>
<DatePicker
readOnly={false}
label="Delivered date"
value={itemDetails.delivered_date}
onChange={(date) =>
Expand Down

0 comments on commit dd5304f

Please sign in to comment.