-
Notifications
You must be signed in to change notification settings - Fork 409
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #9627 Replace Quill editor with Draftjs editor in Dashboard's Tex…
…t widget (#9680)
- Loading branch information
Showing
3 changed files
with
95 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
web/client/components/widgets/builder/wizard/text/__tests__/TextOptions-test.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Copyright 2018, GeoSolutions Sas. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
import expect from 'expect'; | ||
import React from 'react'; | ||
import {DragDropContext as dragDropContext} from 'react-dnd'; | ||
import testBackend from 'react-dnd-test-backend'; | ||
import ReactDOM from 'react-dom'; | ||
|
||
import TextOptionsComp from '../TextOptions'; | ||
|
||
const TextOptions = dragDropContext(testBackend)(TextOptionsComp); | ||
describe('TextOptions component', () => { | ||
beforeEach((done) => { | ||
document.body.innerHTML = '<div id="container"></div>'; | ||
setTimeout(done); | ||
}); | ||
afterEach((done) => { | ||
ReactDOM.unmountComponentAtNode(document.getElementById("container")); | ||
document.body.innerHTML = ''; | ||
setTimeout(done); | ||
}); | ||
it('TextOptions rendering', () => { | ||
// mock data for Text Editor | ||
const data = { title: "Test Title", text: "Test Description / Text" }; | ||
ReactDOM.render(<TextOptions data={{ data }} />, document.getElementById("container")); | ||
const container = document.getElementById('container'); | ||
expect(container).toExist(); | ||
}); | ||
}); |