Skip to content

Commit

Permalink
Fixes #34062 - update ace-editor to fix toggel typo
Browse files Browse the repository at this point in the history
  • Loading branch information
MariaAga authored and evgeni committed Jan 24, 2022
1 parent 9be159e commit 2152852
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 11 deletions.
12 changes: 6 additions & 6 deletions package.json
Expand Up @@ -21,19 +21,19 @@
"create-react-component": "yo react-domain"
},
"dependencies": {
"@theforeman/vendor": "^8.16.0",
"@theforeman/vendor": "^10.0.0",
"graphql-tag": "^2.11.0",
"intl": "~1.2.5",
"jed": "^1.1.1",
"react-intl": "^2.8.0"
},
"devDependencies": {
"@babel/core": "^7.7.0",
"@theforeman/builder": "^8.16.0",
"@theforeman/eslint-plugin-foreman": "^8.16.0",
"@theforeman/stories": "^8.16.0",
"@theforeman/test": "^8.16.0",
"@theforeman/vendor-dev": "^8.16.0",
"@theforeman/builder": "^10.0.0",
"@theforeman/eslint-plugin-foreman": "^10.0.0",
"@theforeman/stories": "^10.0.0",
"@theforeman/test": "^10.0.0",
"@theforeman/vendor-dev": "^10.0.0",
"@types/jest": "<27.0.0",
"argv-parse": "^1.0.1",
"babel-eslint": "^10.0.0",
Expand Down
2 changes: 1 addition & 1 deletion test/integration_test_helper.rb
Expand Up @@ -153,7 +153,7 @@ def fill_in_editor_field(css_locator, text)
# the input is not visible for chrome driver
find("#{css_locator} .ace_editor.ace_input").click
has_css?("#{css_locator} .ace_editor.ace_input")
find("#{css_locator} .ace_input .ace_text-input", visible: :all).set text
find("#{css_locator} .ace_input .ace_text-input", visible: :all).send_keys text
# wait for the debounce
has_editor_display?(css_locator, text)
end
Expand Down
@@ -1,9 +1,13 @@
import React from 'react';
import { mount } from '@theforeman/test';

import { testComponentSnapshotsWithFixtures } from '../../../common/testHelpers';
import Editor from '../Editor';
import { editorOptions } from '../Editor.fixtures';
import * as ace from 'ace-builds/src-noconflict/ace';

ace.config.set('basePath', '/assets/ui/');
ace.config.set('modePath', '');
ace.config.set('themePath', '');

const didMountStubs = () => ({
changeState: jest.fn(),
Expand Down
Expand Up @@ -4,7 +4,13 @@ import IntegrationTestHelper from '../../../common/IntegrationTestHelper';

import { editorOptions, serverRenderResponse } from '../Editor.fixtures';
import Editor, { reducers } from '../index';
import * as EditorActions from '../EditorActions';
import * as EditorActions from '../EditorActions'

import * as ace from 'ace-builds/src-noconflict/ace';

ace.config.set('basePath', '/assets/ui/');
ace.config.set('modePath', '');
ace.config.set('themePath', '');;

jest.mock('../../../redux/API');

Expand Down
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import AceEditor from 'react-ace';
import classNames from 'classnames';
import 'brace/ext/searchbox';
import 'ace-builds/src-min-noconflict/ext-searchbox';
import { noop } from '../../../common/helpers';

const EditorView = ({
Expand Down Expand Up @@ -30,7 +30,7 @@ const EditorView = ({
hidden: !isSelected,
})}
readOnly={readOnly}
editorProps={{ $blockScrolling: Infinity }}
editorProps={{ $blockScrolling: Infinity, loadWorkerFromBlob: false }}
showPrintMargin={false}
debounceChangePeriod={250}
/>
Expand Down
Expand Up @@ -8,10 +8,12 @@ exports[`EditorView EditorView renders EditorView 1`] = `
editorProps={
Object {
"$blockScrolling": Infinity,
"loadWorkerFromBlob": false,
}
}
enableBasicAutocompletion={false}
enableLiveAutocompletion={false}
enableSnippets={false}
focus={false}
fontSize={12}
height="500px"
Expand Down Expand Up @@ -56,10 +58,12 @@ exports[`EditorView EditorView renders EditorView w/vim&mask 1`] = `
editorProps={
Object {
"$blockScrolling": Infinity,
"loadWorkerFromBlob": false,
}
}
enableBasicAutocompletion={false}
enableLiveAutocompletion={false}
enableSnippets={false}
focus={false}
fontSize={12}
height="500px"
Expand Down

0 comments on commit 2152852

Please sign in to comment.