mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-10-25 14:10:05 -05:00
Fixed following: - Dropdown selected menu color - CodeMirror render on properties tab - Placeholders on select control - Codemirror borders
This commit is contained in:
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);
|
||||
});
|
||||
Reference in new issue
Block a user