diff --git a/cypress/e2e/with_mock_data/items.cy.ts b/cypress/e2e/with_mock_data/items.cy.ts index e720a69fb..b7c8a214c 100644 --- a/cypress/e2e/with_mock_data/items.cy.ts +++ b/cypress/e2e/with_mock_data/items.cy.ts @@ -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' @@ -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' diff --git a/src/common/editFileDialog.component.test.tsx b/src/common/editFileDialog.component.test.tsx index f909230c5..abe94d589 100644 --- a/src/common/editFileDialog.component.test.tsx +++ b/src/common/editFileDialog.component.test.tsx @@ -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' }); @@ -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: '', @@ -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', diff --git a/src/common/editFileDialog.component.tsx b/src/common/editFileDialog.component.tsx index 337721ceb..17f9a7fb4 100644 --- a/src/common/editFileDialog.component.tsx +++ b/src/common/editFileDialog.component.tsx @@ -141,7 +141,7 @@ const EditFileDialog = (props: FileDialogProps) => { ); return ( - + {`Edit ${fileType}`}