diff --git a/client/modules/IDE/components/Preferences/Preferences.unit.test.jsx b/client/modules/IDE/components/Preferences/Preferences.unit.test.jsx index 55f9827d23..31ae714593 100644 --- a/client/modules/IDE/components/Preferences/Preferences.unit.test.jsx +++ b/client/modules/IDE/components/Preferences/Preferences.unit.test.jsx @@ -442,45 +442,43 @@ describe('', () => { ); }); }); + describe('start wordwrap at false', () => { + it('wordwrap toggle, starting at false', () => { + // render the component with wordwrap prop set to false + subject({ wordwrap: false }); - describe('start linewrap at false', () => { - it('linewrap toggle, starting at false', () => { - // render the component with linewrap prop set to false - subject({ linewrap: false }); - - // get ahold of the radio buttons for toggling linewrap - const linewrapRadioFalse = screen.getByRole('radio', { - name: /linewrap off/i + // get ahold of the radio buttons for toggling wordwrap + const wordwrapRadioFalse = screen.getByRole('radio', { + name: /wordwrap off/i }); - const linewrapRadioTrue = screen.getByRole('radio', { - name: /linewrap on/i + const wordwrapRadioTrue = screen.getByRole('radio', { + name: /wordwrap on/i }); testToggle( - linewrapRadioFalse, - linewrapRadioTrue, + wordwrapRadioFalse, + wordwrapRadioTrue, props.setLinewrap, true ); }); }); + describe('start wordwrap at true', () => { + it('wordwrap toggle, starting at true', () => { + // render the component with wordwrap prop set to true + subject({ wordwrap: true }); - describe('start linewrap at true', () => { - it('linewrap toggle, starting at true', () => { - // render the component with linewrap prop set to false - subject({ linewrap: true }); - - // get ahold of the radio buttons for toggling linewrap - const linewrapRadioFalse = screen.getByRole('radio', { - name: /linewrap off/i + // get ahold of the radio buttons for toggling wordwrap + const wordwrapRadioFalse = screen.getByRole('radio', { + name: /wordwrap off/i }); - const linewrapRadioTrue = screen.getByRole('radio', { - name: /linewrap on/i + const wordwrapRadioTrue = screen.getByRole('radio', { + name: /wordwrap on/i }); testToggle( - linewrapRadioTrue, - linewrapRadioFalse, + wordwrapRadioTrue, + wordwrapRadioFalse, props.setLinewrap, false ); @@ -513,7 +511,7 @@ describe('', () => { }); const generalElement1 = screen.getByRole('radio', { - name: /linewrap on/i + name: /wordwrap on/i }); expect(generalElement1).toBeInTheDocument(); }); diff --git a/client/modules/IDE/components/Preferences/index.jsx b/client/modules/IDE/components/Preferences/index.jsx index 3a21cca8d0..2b8b8e19fd 100644 --- a/client/modules/IDE/components/Preferences/index.jsx +++ b/client/modules/IDE/components/Preferences/index.jsx @@ -38,7 +38,7 @@ export default function Preferences() { tabIndex, fontSize, autosave, - linewrap, + wordwrap, lineNumbers, lintWarning, textOutput, @@ -386,27 +386,27 @@ export default function Preferences() { dispatch(setLinewrap(true))} - aria-label={t('Preferences.LineWrapOnARIA')} - name="linewrap" - id="linewrap-on" + aria-label={t('Preferences.WordWrapOnARIA')} + name="wordwrap" + id="wordwrap-on" className="preference__radio-button" value="On" - checked={linewrap} + checked={wordwrap} /> -