You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am getting the ckeditor rendered as hidden during tests using react testing library. Here is the sample code of the component and test structure
Component setup:
tried this way
// CKEDITORS - renders as hidden during tests
expect( document.querySelectorAll('div[style*="display: none"]').length ).toBe(4); expect( document.querySelectorAll('div[style*="visibility: hidden"]').length ).toBe(4);
this works but unable to set the value and test the updated value
CKEditor version: 3.1.0
Installed CKEditor plugins: ckeditor4-react
The text was updated successfully, but these errors were encountered:
I am getting the ckeditor rendered as hidden during tests using react testing library. Here is the sample code of the component and test structure
Component setup:
<RichTextEditor
name='choice'
onChange={(event) => choiceChange(event)}
onReady={(editor) => {
setChoiceEditor(editor);
choiceEditorRef.current = editor;
}}
initData={choice}
readOnly={editData?.InUse}
/>
Test setup:
let isEdit = true;
const isTranslateActionType = false;
const renderMultipleChoiceScreen = async () =>
waitFor(() =>
expect(() => {
render(
);
}).not.toThrowError()
);
describe('MultipleChoice', () => {
afterEach(cleanup);
it('should render with all fields in Edit Mode, Select Line', async ()
=> {
await renderMultipleChoiceScreen();
});
tried this way
// CKEDITORS - renders as hidden during tests
expect( document.querySelectorAll('div[style*="display: none"]').length ).toBe(4); expect( document.querySelectorAll('div[style*="visibility: hidden"]').length ).toBe(4);
this works but unable to set the value and test the updated value
The text was updated successfully, but these errors were encountered: