Fixed following: - Dropdown selected menu color - CodeMirror render on properties tab - Placeholders on select control - Codemirror borders

This commit is contained in:
Aditya Toshniwal authored and Akshay Joshi committed 2021-09-09 13:06:24 +05:30
1 parent c35c72c551
commit 27e446a0b0
9 files changed
+68 -69

No files matched your search

@@ -19,14 +19,13 @@ describe('CodeMirror', ()=>{
let cmInstance, options={
lineNumbers: true,
mode: 'text/x-pgsql',
}, cmObj = jasmine.createSpyObj('cmObj', {'setValue': ()=>{}, 'refresh': ()=>{}});
}, cmObj = jasmine.createSpyObj('cmObj', {'getValue':()=>'', 'setValue': ()=>{}, 'refresh': ()=>{}});
beforeEach(()=>{
jasmineEnzyme();
spyOn(OrigCodeMirror, 'fromTextArea').and.returnValue(cmObj);
cmInstance = mount(
<CodeMirror
value={'Init text'}
isAsync={true}
options={options}
className="testClass"
/>);
@@ -34,14 +33,12 @@ describe('CodeMirror', ()=>{
it('init', ()=>{
/* textarea ref passed to fromTextArea */
expect(OrigCodeMirror.fromTextArea).toHaveBeenCalledWith(cmInstance.getDOMNode(), options);
expect(OrigCodeMirror.fromTextArea).toHaveBeenCalledWith(cmInstance.find('textarea').getDOMNode(), options);
expect(cmObj.setValue).toHaveBeenCalledWith('Init text');
expect(cmObj.refresh).toHaveBeenCalled();
});
it('change value', ()=>{
cmInstance.setProps({value: 'the new text'});
expect(cmObj.setValue).toHaveBeenCalledWith('the new text');
expect(cmObj.refresh).toHaveBeenCalled();
});
});
@@ -9,15 +9,15 @@
/* eslint-disable no-console */
// beforeAll(function () {
// spyOn(console, 'warn').and.callThrough();
// spyOn(console, 'error').and.callThrough();
// });
beforeAll(function () {
spyOn(console, 'warn').and.callThrough();
spyOn(console, 'error').and.callThrough();
});
// afterEach(function (done) {
// setTimeout(function () {
// expect(console.warn).not.toHaveBeenCalled();
// expect(console.error).not.toHaveBeenCalled();
// done();
// }, 0);
// });
afterEach(function (done) {
setTimeout(function () {
expect(console.warn).not.toHaveBeenCalled();
expect(console.error).not.toHaveBeenCalled();
done();
}, 0);
});