From 3f23b6c01f4749c24743e7e3ee50a2ece527809b Mon Sep 17 00:00:00 2001 From: HichamELBSI Date: Tue, 25 Jan 2022 11:22:33 +0100 Subject: [PATCH] Fix tests Signed-off-by: HichamELBSI --- .../components/Wysiwyg/index.js | 2 +- .../components/Wysiwyg/tests/index.test.js | 31 +++++++------------ .../tests/UploadAssetDialog.test.js | 8 ++--- .../src/pages/App/tests/MediaLibrary.test.js | 4 +-- 4 files changed, 19 insertions(+), 26 deletions(-) diff --git a/packages/core/admin/admin/src/content-manager/components/Wysiwyg/index.js b/packages/core/admin/admin/src/content-manager/components/Wysiwyg/index.js index f53496fb3c..5e174af4d8 100644 --- a/packages/core/admin/admin/src/content-manager/components/Wysiwyg/index.js +++ b/packages/core/admin/admin/src/content-manager/components/Wysiwyg/index.js @@ -187,7 +187,7 @@ const Wysiwyg = ({ Wysiwyg.defaultProps = { description: null, - disabled: true, + disabled: false, error: '', labelAction: undefined, placeholder: null, diff --git a/packages/core/admin/admin/src/content-manager/components/Wysiwyg/tests/index.test.js b/packages/core/admin/admin/src/content-manager/components/Wysiwyg/tests/index.test.js index 937af2177e..eaee1ba33f 100644 --- a/packages/core/admin/admin/src/content-manager/components/Wysiwyg/tests/index.test.js +++ b/packages/core/admin/admin/src/content-manager/components/Wysiwyg/tests/index.test.js @@ -1,7 +1,8 @@ import * as React from 'react'; import { IntlProvider } from 'react-intl'; import { render, waitFor, fireEvent } from '@testing-library/react'; -import { lightTheme, ThemeProvider } from '@strapi/design-system'; +import { ThemeProvider } from '@strapi/design-system/ThemeProvider'; +import { lightTheme } from '@strapi/design-system/themes'; import Wysiwyg from '../index'; jest.mock('@strapi/helper-plugin', () => ({ @@ -39,6 +40,7 @@ describe('Wysiwyg render and actions buttons', () => { name="rich-text" intlLabel={{ id: 'hello world', defaultMessage: 'hello world' }} onChange={onChange} + disabled={false} /> @@ -203,7 +205,7 @@ describe('Wysiwyg render and actions buttons', () => { background: #ffffff; } - .c28 .sc-bjeSbO { + .c28 .sc-pVTFL { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -560,8 +562,6 @@ describe('Wysiwyg render and actions buttons', () => { background: #ffffff; overflow: hidden; min-height: 2rem; - color: #666687; - background: #eaeaef; outline: none; box-shadow: 0; -webkit-transition-property: border-color,box-shadow,fill; @@ -598,7 +598,6 @@ describe('Wysiwyg render and actions buttons', () => { display: flex; background: none; border: none; - cursor: not-allowed; } .c18 svg { @@ -610,7 +609,7 @@ describe('Wysiwyg render and actions buttons', () => { } .c32 { - cursor: not-allowed !important; + cursor: auto; } .c32 .CodeMirror-placeholder { @@ -1062,13 +1061,11 @@ describe('Wysiwyg render and actions buttons', () => { >
@@ -1244,7 +1240,6 @@ describe('Wysiwyg render and actions buttons', () => { >