Skip to content

Commit

Permalink
[Console] Fix merge conflict issues
Browse files Browse the repository at this point in the history
  • Loading branch information
yuliacech committed May 22, 2024
1 parent c4e0741 commit fb2b7dc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ export const MonacoEditor = ({ initialTextValue }: EditorProps) => {

const editorDidMountCallback = useCallback(
(editor: monaco.editor.IStandaloneCodeEditor) => {
actionsProvider.current = new MonacoEditorActionsProvider(editor, setEditorActionsCss);
const provider = new MonacoEditorActionsProvider(editor, setEditorActionsCss);
setInputEditor(provider);
actionsProvider.current = provider;
setupResizeChecker(divRef.current!, editor);
registerKeyboardCommands({
editor,
Expand All @@ -81,9 +83,14 @@ export const MonacoEditor = ({ initialTextValue }: EditorProps) => {
await actionsProvider.current?.moveToPreviousRequestEdge(),
moveToNextRequestEdge: async () => await actionsProvider.current?.moveToNextRequestEdge(),
});
setInputEditor(provider);
},
[getDocumenationLink, registerKeyboardCommands, sendRequestsCallback, setupResizeChecker]
[
getDocumenationLink,
registerKeyboardCommands,
sendRequestsCallback,
setupResizeChecker,
setInputEditor,
]
);

const editorWillUnmountCallback = useCallback(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ describe('Editor actions provider', () => {
expect((endpoints as string[]).sort()).toEqual(['_cat', '_search']);
});
});

describe('move to next/previous request edge', () => {
beforeEach(() => {
/* The editor has the following text:
Expand Down Expand Up @@ -402,7 +402,7 @@ describe('Editor actions provider', () => {
});
});
});

describe('restoreRequestFromHistory', () => {
const testHistoryRequest = 'GET _alias';
beforeEach(() => {
Expand Down Expand Up @@ -559,4 +559,3 @@ describe('Editor actions provider', () => {
});
});
});
});

0 comments on commit fb2b7dc

Please sign in to comment.