Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Commit PR Review Suggestions.

Co-authored-by: rowan04 <[email protected]>
Co-authored-by: Joshua Kitenge <[email protected]>
  • Loading branch information
3 people authored Jan 13, 2025
1 parent 6fb08c4 commit 6bcdfd4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cypress/e2e/with_mock_data/items.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ describe('Items', () => {
});
});

it('not changing any fields shows error', () => {
it('shows error when no fields have been changed', () => {
cy.findByText('5YUQDDjKpz2z').click();
cy.findByText(
'High-resolution cameras for beam characterization. 1'
Expand All @@ -957,7 +957,7 @@ describe('Items', () => {
cy.findByRole('button', { name: 'Save' }).should('be.disabled');
});

it('Required fields that are cleared are not allowed and show error message', () => {
it('shows error message when required fields are cleared', () => {
cy.findByText('5YUQDDjKpz2z').click();
cy.findByText(
'High-resolution cameras for beam characterization. 1'
Expand Down
6 changes: 3 additions & 3 deletions src/common/editFileDialog.component.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ describe('Edit file dialog', () => {
expect(onClose).toHaveBeenCalled();
});

it('No values changed shows correct error message', async () => {
it('shows correct error message when no values are changed', async () => {
createView();

const saveButton = screen.getByRole('button', { name: 'Save' });
Expand All @@ -120,7 +120,7 @@ describe('Edit file dialog', () => {
).toBeInTheDocument();
});

it('Required fields show error if they are whitespace or current value just removed', async () => {
it('shows error message if required fields are whitespace or their current value was removed', async () => {
createView();
modifyFileValues({
file_name: '',
Expand All @@ -133,7 +133,7 @@ describe('Edit file dialog', () => {
expect(onClose).not.toHaveBeenCalled();
});

it('CatchAllError request works correctly and displays refresh page message', async () => {
it('displays refresh page message and a CatchAllError request works correctly', async () => {
createView();
modifyFileValues({
file_name: 'Error 500',
Expand Down
2 changes: 1 addition & 1 deletion src/common/editFileDialog.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const EditFileDialog = (props: FileDialogProps) => {
);

return (
<Dialog open={open} maxWidth="lg" fullWidth>
<Dialog open={open} maxWidth="sm" fullWidth>
<DialogTitle>{`Edit ${fileType}`}</DialogTitle>
<DialogContent>
<Grid container direction="column" spacing={1} component="form">
Expand Down

0 comments on commit 6bcdfd4

Please sign in to comment.