foreman_ansible 6.1.1 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/helpers/foreman_ansible/ansible_reports_helper.rb +1 -4
- data/app/services/foreman_ansible/operating_system_parser.rb +1 -1
- data/app/services/foreman_ansible/variables_importer.rb +6 -1
- data/app/views/foreman_ansible/ansible_roles/_select_tab_content.html.erb +8 -16
- data/app/views/foreman_ansible/job_templates/ansible_roles_-_install_from_galaxy.erb +1 -1
- data/lib/foreman_ansible/version.rb +1 -1
- data/package.json +11 -42
- data/test/unit/services/ansible_variables_importer_test.rb +13 -0
- data/webpack/components/AnsibleRolesSwitcher/AnsibleRolesSwitcher.js +11 -9
- data/webpack/components/AnsibleRolesSwitcher/AnsibleRolesSwitcherActions.js +14 -14
- data/webpack/components/AnsibleRolesSwitcher/__tests__/AnsibleRolesSwitcher.test.js +4 -4
- data/webpack/components/AnsibleRolesSwitcher/__tests__/AnsibleRolesSwitcherReducer.test.js +1 -1
- data/webpack/components/AnsibleRolesSwitcher/__tests__/AnsibleRolesSwitcherSelectors.test.js +1 -1
- data/webpack/components/AnsibleRolesSwitcher/__tests__/__snapshots__/AnsibleRolesSwitcher.test.js.snap +1 -0
- data/webpack/components/AnsibleRolesSwitcher/components/AnsiblePermissionDenied.test.js +1 -1
- data/webpack/components/AnsibleRolesSwitcher/components/AnsibleRole.test.js +1 -1
- data/webpack/components/AnsibleRolesSwitcher/components/AssignedRolesList.test.js +1 -1
- data/webpack/components/AnsibleRolesSwitcher/components/AvailableRolesList.test.js +1 -1
- data/webpack/components/AnsibleRolesSwitcher/index.js +1 -1
- data/webpack/index.js +0 -13
- metadata +12 -13
- data/webpack/test_setup.js +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d95899e15050cbf3f25d75a8f3c9bc5a3059a9dd0ffa90f4690ce84cf49d3408
|
4
|
+
data.tar.gz: 466754ac90d1e80046fca70ca8db372e90d2b61a0d26a726f0807f7e81227728
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f79b560e9e01e8719c6e705ff5fef6a9f9e7b91bc9ec1b9b79c81750b572c4de6929d2ab07049caefdf4f555a5087c31eb76543d52b87622038107a1e02ea63
|
7
|
+
data.tar.gz: 357b61ffdb94b61a37ecf87afba07f7e0c2158d4af14d39b701fb31152803692a8feaac09294bb2bc8c0ae8fe8d9daa66eb8eb6f0869c4901315dca688f06dab
|
@@ -42,10 +42,7 @@ module ForemanAnsible
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def report_json_viewer(json)
|
45
|
-
|
46
|
-
viewer = content_tag :div, '', :id => uid
|
47
|
-
viewer << mount_react_component('ReportJsonViewer',
|
48
|
-
"##{uid}", json.to_json)
|
45
|
+
react_component('ReportJsonViewer', data: json)
|
49
46
|
end
|
50
47
|
|
51
48
|
private
|
@@ -80,7 +80,7 @@ module ForemanAnsible
|
|
80
80
|
facts[:ansible_os_name].tr(" \n\t", '') ||
|
81
81
|
facts[:ansible_distribution].tr(" \n\t", '')
|
82
82
|
else
|
83
|
-
distribution = facts[:
|
83
|
+
distribution = facts[:ansible_lsb].try(:[], 'id') || facts[:ansible_distribution]
|
84
84
|
|
85
85
|
if distribution == 'RedHat' &&
|
86
86
|
facts[:ansible_lsb].try(:[], 'id') == 'RedHatEnterpriseWorkstation'
|
@@ -51,7 +51,8 @@ module ForemanAnsible
|
|
51
51
|
:key => variable_name,
|
52
52
|
:ansible_role_id => role.id
|
53
53
|
)
|
54
|
-
variable.assign_attributes(:
|
54
|
+
variable.assign_attributes(:hidden_value => false,
|
55
|
+
:default_value => variable_default,
|
55
56
|
:key_type => infer_key_type(variable_default))
|
56
57
|
variable.imported = true if variable.new_record?
|
57
58
|
variable.valid? ? variable : nil
|
@@ -80,6 +81,8 @@ module ForemanAnsible
|
|
80
81
|
variable = AnsibleVariable.new(
|
81
82
|
JSON.parse(attrs)
|
82
83
|
)
|
84
|
+
# Make sure, newly created variables are not hidden
|
85
|
+
variable.hidden_value = false
|
83
86
|
variable.ansible_role = ::AnsibleRole.find_by(:name => role)
|
84
87
|
variable.save
|
85
88
|
memo << variable
|
@@ -89,6 +92,8 @@ module ForemanAnsible
|
|
89
92
|
def update_variables(variables)
|
90
93
|
iterate_over_variables(variables) do |_role, memo, attrs|
|
91
94
|
attributes = JSON.parse(attrs)
|
95
|
+
# Make sure to let the flag if a variable is hidden untouched
|
96
|
+
attributes.delete('hidden_value')
|
92
97
|
var = AnsibleVariable.find attributes['id']
|
93
98
|
var.update(attributes)
|
94
99
|
memo << var
|
@@ -4,20 +4,12 @@
|
|
4
4
|
<div class='tab-pane' id='ansible_roles'>
|
5
5
|
<% roles = f.object.is_a?(Hostgroup) ? roles_attrs(f.object.inherited_and_own_ansible_roles) : roles_attrs(f.object.all_ansible_roles) %>
|
6
6
|
<% class_name = f.object.is_a?(Hostgroup) ? 'Hostgroup' : 'Host' %>
|
7
|
-
<%=
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
:canView => User.current.can?(:view_ansible_roles)
|
16
|
-
}.to_json
|
17
|
-
) %>
|
18
|
-
<% unless request.xhr? %>
|
19
|
-
<script type="text/javascript">
|
20
|
-
tfm.initAnsibleRoleSwitcher();
|
21
|
-
</script>
|
22
|
-
<% end %>
|
7
|
+
<%= react_component('AnsibleRolesSwitcher', {
|
8
|
+
:initialAssignedRoles => roles,
|
9
|
+
:inheritedRoleIds => f.object.inherited_ansible_roles.map(&:id),
|
10
|
+
:availableRolesUrl => ui_ansible_roles_path,
|
11
|
+
:resourceId => f.object.id,
|
12
|
+
:resourceName => class_name,
|
13
|
+
:canView => User.current.can?(:view_ansible_roles)
|
14
|
+
}) %>
|
23
15
|
</div>
|
@@ -25,7 +25,7 @@ model: JobTemplate
|
|
25
25
|
---
|
26
26
|
- hosts: all
|
27
27
|
tasks:
|
28
|
-
- command: ansible-galaxy install {{ item }}
|
28
|
+
- command: ansible-galaxy install {{ item }} -p <%= input('location').present? ? input('location') : '/etc/ansible/roles' %>
|
29
29
|
register: out
|
30
30
|
with_items:
|
31
31
|
- <%= input('ansible_roles_list') %>
|
data/package.json
CHANGED
@@ -7,33 +7,24 @@
|
|
7
7
|
"test": "test"
|
8
8
|
},
|
9
9
|
"peerDependencies": {
|
10
|
-
"@theforeman/vendor": ">=
|
10
|
+
"@theforeman/vendor": ">= 6.0.0"
|
11
11
|
},
|
12
12
|
"dependencies": {
|
13
13
|
"react-json-tree": "^0.11.0"
|
14
14
|
},
|
15
15
|
"devDependencies": {
|
16
16
|
"@babel/core": "^7.7.0",
|
17
|
-
"@theforeman/builder": "^
|
18
|
-
"@theforeman/
|
19
|
-
"
|
20
|
-
"
|
21
|
-
"
|
22
|
-
"
|
23
|
-
"
|
24
|
-
"eslint": "^6.0.0",
|
25
|
-
"eslint-plugin-patternfly-react": "^0.2.1",
|
26
|
-
"identity-obj-proxy": "^3.0.0",
|
27
|
-
"jest": "^24.9.0",
|
28
|
-
"prettier": "^1.19.0",
|
29
|
-
"react-redux": "^5.0.7",
|
30
|
-
"react-redux-test-utils": "^0.1.1",
|
31
|
-
"redux": "^3.7.2",
|
32
|
-
"redux-thunk": "^2.3.0"
|
17
|
+
"@theforeman/builder": "^6.0.0",
|
18
|
+
"@theforeman/eslint-plugin-foreman": "6.0.0",
|
19
|
+
"@theforeman/test": "^6.0.0",
|
20
|
+
"@theforeman/vendor-dev": "^6.0.0",
|
21
|
+
"babel-eslint": "^10.0.3",
|
22
|
+
"eslint": "^6.7.2",
|
23
|
+
"prettier": "^1.13.5"
|
33
24
|
},
|
34
25
|
"scripts": {
|
35
|
-
"test": "
|
36
|
-
"lint": "
|
26
|
+
"test": "tfm-test --plugin",
|
27
|
+
"lint": "tfm-lint --plugin -d webpack"
|
37
28
|
},
|
38
29
|
"repository": {
|
39
30
|
"type": "git",
|
@@ -44,27 +35,5 @@
|
|
44
35
|
"bugs": {
|
45
36
|
"url": "https://projects.theforeman.org/projects/ansible"
|
46
37
|
},
|
47
|
-
"homepage": "https://theforeman.org/plugins/foreman_ansible/"
|
48
|
-
"jest": {
|
49
|
-
"verbose": true,
|
50
|
-
"moduleDirectories": [
|
51
|
-
"node_modules/@theforeman/vendor-core/node_modules",
|
52
|
-
"node_modules",
|
53
|
-
"webpack"
|
54
|
-
],
|
55
|
-
"transform": {
|
56
|
-
"^.+\\.js$": "babel-jest"
|
57
|
-
},
|
58
|
-
"setupFiles": [
|
59
|
-
"raf/polyfill",
|
60
|
-
"./webpack/test_setup.js"
|
61
|
-
],
|
62
|
-
"testPathIgnorePatterns": [
|
63
|
-
"/node_modules/",
|
64
|
-
"<rootDir>/foreman/"
|
65
|
-
],
|
66
|
-
"moduleNameMapper": {
|
67
|
-
"^.+\\.(css|scss)$": "identity-obj-proxy"
|
68
|
-
}
|
69
|
-
}
|
38
|
+
"homepage": "https://theforeman.org/plugins/foreman_ansible/"
|
70
39
|
}
|
@@ -59,6 +59,19 @@ class AnsibleVariablesImporterTest < ActiveSupport::TestCase
|
|
59
59
|
assert_empty changes['update']
|
60
60
|
end
|
61
61
|
|
62
|
+
test 'sets hidden value to false by default' do
|
63
|
+
role = FactoryBot.create(:ansible_role)
|
64
|
+
variable = FactoryBot.create(:ansible_variable)
|
65
|
+
api_response = {
|
66
|
+
role.name => { variable.key => 'new value' }
|
67
|
+
}
|
68
|
+
changes = importer.import_variables(api_response, [role.name])
|
69
|
+
assert_empty changes['update']
|
70
|
+
assert_not_empty changes['new']
|
71
|
+
assert_equal variable.key, changes['new'].first.key
|
72
|
+
assert_not changes['new'].first.hidden_value?
|
73
|
+
end
|
74
|
+
|
62
75
|
test 'reimports variable with same key for different role' do
|
63
76
|
role = FactoryBot.create(:ansible_role)
|
64
77
|
variable = FactoryBot.create(:ansible_variable)
|
@@ -17,7 +17,7 @@ class AnsibleRolesSwitcher extends React.Component {
|
|
17
17
|
inheritedRoleIds,
|
18
18
|
resourceId,
|
19
19
|
resourceName,
|
20
|
-
} = this.props
|
20
|
+
} = this.props;
|
21
21
|
|
22
22
|
this.props.getAnsibleRoles(
|
23
23
|
availableRolesUrl,
|
@@ -52,7 +52,7 @@ class AnsibleRolesSwitcher extends React.Component {
|
|
52
52
|
inheritedRoleIds,
|
53
53
|
resourceId,
|
54
54
|
resourceName,
|
55
|
-
} = this.props
|
55
|
+
} = this.props;
|
56
56
|
|
57
57
|
const onListingChange = paginationArgs =>
|
58
58
|
getAnsibleRoles(
|
@@ -104,13 +104,11 @@ class AnsibleRolesSwitcher extends React.Component {
|
|
104
104
|
}
|
105
105
|
|
106
106
|
AnsibleRolesSwitcher.propTypes = {
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
resourceName: PropTypes.string,
|
113
|
-
}).isRequired,
|
107
|
+
initialAssignedRoles: PropTypes.arrayOf(PropTypes.object),
|
108
|
+
availableRolesUrl: PropTypes.string.isRequired,
|
109
|
+
inheritedRoleIds: PropTypes.arrayOf(PropTypes.number),
|
110
|
+
resourceId: PropTypes.number,
|
111
|
+
resourceName: PropTypes.string,
|
114
112
|
getAnsibleRoles: PropTypes.func.isRequired,
|
115
113
|
loading: PropTypes.bool.isRequired,
|
116
114
|
pagination: PropTypes.shape({
|
@@ -137,6 +135,10 @@ AnsibleRolesSwitcher.propTypes = {
|
|
137
135
|
|
138
136
|
AnsibleRolesSwitcher.defaultProps = {
|
139
137
|
error: {},
|
138
|
+
resourceId: null,
|
139
|
+
resourceName: '',
|
140
|
+
initialAssignedRoles: [],
|
141
|
+
inheritedRoleIds: [],
|
140
142
|
};
|
141
143
|
|
142
144
|
export default AnsibleRolesSwitcher;
|
@@ -21,7 +21,7 @@ export const getAnsibleRoles = (
|
|
21
21
|
resourceName,
|
22
22
|
pagination,
|
23
23
|
search
|
24
|
-
) => dispatch => {
|
24
|
+
) => async dispatch => {
|
25
25
|
dispatch({ type: ANSIBLE_ROLES_REQUEST });
|
26
26
|
|
27
27
|
const params = {
|
@@ -30,19 +30,19 @@ export const getAnsibleRoles = (
|
|
30
30
|
...propsToSnakeCase({ resourceId, resourceName }),
|
31
31
|
};
|
32
32
|
|
33
|
-
|
34
|
-
.get(url, {}, params)
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
)
|
45
|
-
|
33
|
+
try {
|
34
|
+
const res = await api.get(url, {}, params);
|
35
|
+
return dispatch({
|
36
|
+
type: ANSIBLE_ROLES_SUCCESS,
|
37
|
+
payload: {
|
38
|
+
initialAssignedRoles,
|
39
|
+
inheritedRoleIds,
|
40
|
+
...propsToCamelCase(res.data),
|
41
|
+
},
|
42
|
+
});
|
43
|
+
} catch (error) {
|
44
|
+
return dispatch(errorHandler(ANSIBLE_ROLES_FAILURE, error));
|
45
|
+
}
|
46
46
|
};
|
47
47
|
|
48
48
|
const errorHandler = (msg, err) => {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { testComponentSnapshotsWithFixtures } from '
|
1
|
+
import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
|
2
2
|
|
3
3
|
import AnsibleRolesSwitcher from '../AnsibleRolesSwitcher';
|
4
4
|
|
@@ -19,10 +19,10 @@ const fixtures = {
|
|
19
19
|
assignedRolesCount: 2,
|
20
20
|
assignedRoles: [],
|
21
21
|
unassignedRoles: [],
|
22
|
-
|
23
|
-
initialAssignedRoles: [],
|
24
|
-
},
|
22
|
+
initialAssignedRoles: [],
|
25
23
|
error: { statusText: '', errorMsg: '' },
|
24
|
+
allAssignedRoles: [],
|
25
|
+
availableRolesUrl: 'http://test/roles',
|
26
26
|
},
|
27
27
|
};
|
28
28
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { testReducerSnapshotWithFixtures } from '
|
1
|
+
import { testReducerSnapshotWithFixtures } from '@theforeman/test';
|
2
2
|
|
3
3
|
import reducer, { initialState } from '../AnsibleRolesSwitcherReducer';
|
4
4
|
import { ansibleRolesLong } from '../__fixtures__/ansibleRolesData.fixtures';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { testComponentSnapshotsWithFixtures } from '
|
1
|
+
import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
|
2
2
|
import AnsiblePermissionDenied from './AnsiblePermissionDenied';
|
3
3
|
|
4
4
|
jest.mock('foremanReact/components/common/EmptyState');
|
data/webpack/index.js
CHANGED
@@ -1,12 +1,9 @@
|
|
1
|
-
import $ from 'jquery';
|
2
1
|
import componentRegistry from 'foremanReact/components/componentRegistry';
|
3
2
|
import injectReducer from 'foremanReact/redux/reducers/registerReducer';
|
4
3
|
import ReportJsonViewer from './components/ReportJsonViewer';
|
5
4
|
import AnsibleRolesSwitcher from './components/AnsibleRolesSwitcher';
|
6
5
|
import reducer from './reducer';
|
7
6
|
|
8
|
-
const { tfm } = window;
|
9
|
-
|
10
7
|
componentRegistry.register({
|
11
8
|
name: 'ReportJsonViewer',
|
12
9
|
type: ReportJsonViewer,
|
@@ -17,13 +14,3 @@ componentRegistry.register({
|
|
17
14
|
});
|
18
15
|
|
19
16
|
injectReducer('foremanAnsible', reducer);
|
20
|
-
|
21
|
-
tfm.initAnsibleRoleSwitcher = () => {
|
22
|
-
$(document).on('ContentLoad', evt => {
|
23
|
-
tfm.reactMounter.mount(
|
24
|
-
'AnsibleRolesSwitcher',
|
25
|
-
'#ansible_roles_switcher',
|
26
|
-
$('#ansible_roles_switcher').data('roles')
|
27
|
-
);
|
28
|
-
});
|
29
|
-
};
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_ansible
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Lobato Garcia
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: foreman_ansible_core
|
@@ -328,12 +328,11 @@ files:
|
|
328
328
|
- webpack/components/ReportJsonViewer.js
|
329
329
|
- webpack/index.js
|
330
330
|
- webpack/reducer.js
|
331
|
-
- webpack/test_setup.js
|
332
331
|
homepage: https://github.com/theforeman/foreman_ansible
|
333
332
|
licenses:
|
334
333
|
- GPL-3.0
|
335
334
|
metadata: {}
|
336
|
-
post_install_message:
|
335
|
+
post_install_message:
|
337
336
|
rdoc_options: []
|
338
337
|
require_paths:
|
339
338
|
- lib
|
@@ -349,25 +348,25 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
349
348
|
version: '0'
|
350
349
|
requirements: []
|
351
350
|
rubygems_version: 3.1.2
|
352
|
-
signing_key:
|
351
|
+
signing_key:
|
353
352
|
specification_version: 4
|
354
353
|
summary: Ansible integration with Foreman (theforeman.org)
|
355
354
|
test_files:
|
356
355
|
- test/factories/ansible_proxy.rb
|
357
|
-
- test/factories/ansible_roles.rb
|
358
356
|
- test/factories/ansible_variables.rb
|
357
|
+
- test/factories/ansible_roles.rb
|
359
358
|
- test/fixtures/insights_playbook.yaml
|
360
359
|
- test/fixtures/report.json
|
361
360
|
- test/fixtures/sample_facts.json
|
362
361
|
- test/functional/ansible_roles_controller_test.rb
|
363
|
-
- test/functional/ansible_variables_controller_test.rb
|
364
362
|
- test/functional/api/v2/ansible_inventories_controller_test.rb
|
365
363
|
- test/functional/api/v2/ansible_roles_controller_test.rb
|
366
364
|
- test/functional/api/v2/ansible_variables_controller_test.rb
|
367
365
|
- test/functional/api/v2/hostgroups_controller_test.rb
|
368
366
|
- test/functional/api/v2/hosts_controller_test.rb
|
369
|
-
- test/functional/hosts_controller_test.rb
|
370
367
|
- test/functional/ui_ansible_roles_controller_test.rb
|
368
|
+
- test/functional/ansible_variables_controller_test.rb
|
369
|
+
- test/functional/hosts_controller_test.rb
|
371
370
|
- test/test_plugin_helper.rb
|
372
371
|
- test/unit/actions/run_ansible_job_test.rb
|
373
372
|
- test/unit/actions/run_proxy_ansible_command_test.rb
|
@@ -377,14 +376,11 @@ test_files:
|
|
377
376
|
- test/unit/concerns/host_managed_extensions_test.rb
|
378
377
|
- test/unit/concerns/hostgroup_extensions_test.rb
|
379
378
|
- test/unit/helpers/ansible_reports_helper_test.rb
|
380
|
-
- test/unit/host_ansible_role_test.rb
|
381
|
-
- test/unit/hostgroup_ansible_role_test.rb
|
382
379
|
- test/unit/lib/foreman_ansible_core/command_creator_test.rb
|
383
380
|
- test/unit/lib/foreman_ansible_core/ansible_runner_test.rb
|
384
381
|
- test/unit/lib/foreman_ansible_core/playbook_runner_test.rb
|
385
382
|
- test/unit/lib/proxy_api/ansible_test.rb
|
386
383
|
- test/unit/services/ansible_report_importer_test.rb
|
387
|
-
- test/unit/services/ansible_variables_importer_test.rb
|
388
384
|
- test/unit/services/api_roles_importer_test.rb
|
389
385
|
- test/unit/services/fact_importer_test.rb
|
390
386
|
- test/unit/services/fact_parser_test.rb
|
@@ -392,6 +388,9 @@ test_files:
|
|
392
388
|
- test/unit/services/insights_plan_runner_test.rb
|
393
389
|
- test/unit/services/roles_importer_test.rb
|
394
390
|
- test/unit/services/structured_fact_importer_test.rb
|
395
|
-
- test/unit/services/
|
391
|
+
- test/unit/services/ansible_variables_importer_test.rb
|
396
392
|
- test/unit/services/inventory_creator_test.rb
|
393
|
+
- test/unit/services/ui_roles_importer_test.rb
|
397
394
|
- test/unit/ansible_provider_test.rb
|
395
|
+
- test/unit/host_ansible_role_test.rb
|
396
|
+
- test/unit/hostgroup_ansible_role_test.rb
|
data/webpack/test_setup.js
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
import 'core-js/shim';
|
2
|
-
import 'regenerator-runtime/runtime';
|
3
|
-
|
4
|
-
import { configure } from 'enzyme';
|
5
|
-
import Adapter from 'enzyme-adapter-react-16';
|
6
|
-
|
7
|
-
configure({ adapter: new Adapter() });
|
8
|
-
|
9
|
-
// Mocking translation function
|
10
|
-
global.__ = str => str;
|
11
|
-
global.n__ = str => str;
|
12
|
-
global.Jed = { sprintf: str => str };
|