From 8a8e60b899dbaf2b80d20f915f1c7aafa168cd2f Mon Sep 17 00:00:00 2001 From: Samuel Liu Date: Fri, 5 Jul 2024 15:35:35 -0400 Subject: [PATCH] Convert role form from haml to React and add cypress testing --- app/controllers/ops_controller.rb | 4 + app/controllers/ops_controller/ops_rbac.rb | 109 +++--- .../ops_helper/role_rbac_details_helper.rb | 5 + .../components/rbac-role-form/index.jsx | 358 ++++++++++++++++++ .../rbac-role-form/rbac-role-form.schema.js | 55 +++ .../components/tree-view/checkbox_tree.jsx | 62 +++ .../forms/mappers/componentMapper.jsx | 5 +- .../packs/component-definitions-common.js | 2 + .../__snapshots__/action-form.spec.js.snap | 16 + ...d-remove-security-groups-form.spec.js.snap | 16 + .../ansible-credentials-form.spec.js.snap | 32 ++ .../ansible-edit-catalog-form.spec.js.snap | 9 + .../c-and-u-collections-form.spec.js.snap | 16 + .../cloud-database-form.spec.js.snap | 16 + ...d-object-store-container-form.spec.js.snap | 48 +++ .../cloud-volume-actions-form.spec.js.snap | 96 +++++ ...tach-detach-cloud-volume-form.spec.js.snap | 96 +++++ .../__snapshots__/datastore-form.spec.js.snap | 32 ++ .../diagnostics-collect-log-form.spec.js.snap | 48 +++ ...ed-terraform-credentials-form.spec.js.snap | 32 ++ .../__snapshots__/evacuate-form.spec.js.snap | 48 +++ .../generic-objects-form.spec.js.snap | 72 ++++ .../host-aggregate-form.spec.js.snap | 16 + .../__snapshots__/host-edit-form.spec.js.snap | 48 +++ .../host-initiator-group.spec.js.snap | 16 + .../live-migrate-form.spec.js.snap | 48 +++ .../physical-storage-form.spec.js.snap | 32 ++ ...e-customization-template-form.spec.js.snap | 48 +++ .../pxe-image-type-form.spec.js.snap | 32 ++ .../pxe-iso-datastore-form.spec.js.snap | 16 + .../pxe-iso-image-form.spec.js.snap | 16 + .../__snapshots__/rbac-role-form.spec.js.snap | 301 +++++++++++++++ .../rbac-role-form/rbac-role-form.spec.js | 99 +++++ .../reconfigure-vm-form.spec.js.snap | 240 ++++++++++++ .../__snapshots__/schedule-form.spec.js.snap | 48 +++ .../service-request-default-form.spec.js.snap | 16 + .../settings-category-form.spec.js.snap | 16 + .../settings-time-profile-form.spec.js.snap | 16 + .../vm-floating-ips-form.spec.js.snap | 64 ++++ .../__snapshots__/vm-resize-form.spec.js.snap | 16 + ...kflow-credential-mapping-form.spec.js.snap | 24 ++ .../workflow-credentials-form.spec.js.snap | 32 ++ .../__snapshots__/zone-form.spec.js.snap | 16 + app/stylesheet/application-webpack.scss | 1 + app/stylesheet/rbac-role-form.scss | 26 ++ app/views/ops/_rbac_role_details.html.haml | 60 +-- config/routes.rb | 2 + .../Application-Settings/access-control.cy.js | 175 +++++++++ package.json | 1 + yarn.lock | 19 +- 50 files changed, 2526 insertions(+), 95 deletions(-) create mode 100644 app/javascript/components/rbac-role-form/index.jsx create mode 100644 app/javascript/components/rbac-role-form/rbac-role-form.schema.js create mode 100644 app/javascript/components/tree-view/checkbox_tree.jsx create mode 100644 app/javascript/spec/rbac-role-form/__snapshots__/rbac-role-form.spec.js.snap create mode 100644 app/javascript/spec/rbac-role-form/rbac-role-form.spec.js create mode 100644 app/stylesheet/rbac-role-form.scss create mode 100644 cypress/e2e/ui/Settings/Application-Settings/access-control.cy.js diff --git a/app/controllers/ops_controller.rb b/app/controllers/ops_controller.rb index 7c07a6ea681..4f096a47abd 100644 --- a/app/controllers/ops_controller.rb +++ b/app/controllers/ops_controller.rb @@ -806,6 +806,10 @@ def handle_bottom_cell(nodetype, presenter, locals) if ["settings_workers", "diagnostics_cu_repair"].include?(@sb[:active_tab]) presenter.hide(:form_buttons_div) end + + if @hide_bottom_bar + presenter.hide(:form_buttons_div) + end end def replace_explorer_trees(replace_trees, presenter) diff --git a/app/controllers/ops_controller/ops_rbac.rb b/app/controllers/ops_controller/ops_rbac.rb index b8f4f632288..b338b559b65 100644 --- a/app/controllers/ops_controller/ops_rbac.rb +++ b/app/controllers/ops_controller/ops_rbac.rb @@ -94,16 +94,29 @@ def rbac_group_edit def rbac_role_add assert_privileges("rbac_role_add") + @hide_bottom_bar = true rbac_edit_reset('new', 'role', MiqUserRole) end + def rbac_role_add_react + assert_privileges("rbac_role_add") + @hide_bottom_bar = true + if params[:id] != 'new' + rbac_edit_reset_react('edit', 'role', MiqUserRole) + else + rbac_edit_reset_react('new', 'role', MiqUserRole) + end + end + def rbac_role_copy assert_privileges("rbac_role_copy") + @hide_bottom_bar = true rbac_edit_reset('copy', 'role', MiqUserRole) end def rbac_role_edit assert_privileges("rbac_role_edit") + @hide_bottom_bar = true case params[:button] when 'cancel' then rbac_edit_cancel('role') when 'save', 'add' then rbac_edit_save_or_add('role', 'miq_user_role') @@ -111,6 +124,22 @@ def rbac_role_edit end end + def rbac_role_edit_get + assert_privileges("rbac_role_edit") + unless params[:id] + obj = find_checked_items + @_params[:id] = obj[0] + end + @hide_bottom_bar = true + role = MiqUserRole.find_by(id: params[:id]) + render :json => { + :name => role.name, + :vm_restriction => role[:settings] && role[:settings][:restrictions][:vms], + :service_template_restriction => role[:settings] && role[:settings][:restrictions][:service_templates], + :miqProductFeatures => role.miq_product_features, + } + end + def rbac_tenant_add assert_privileges("rbac_tenant_add") @_params[:typ] = "new" @@ -650,12 +679,44 @@ def rbac_edit_reset(operation, what, klass) replace_right_cell(:nodetype => x_node) end + def rbac_edit_reset_react(operation, what, klass) + key = what.to_sym + if operation != "new" + record = MiqUserRole.find_by(id: params[:id]) + record.miq_product_features = [MiqProductFeature.find_by(:identifier => MiqProductFeature.feature_root)] + end + + case operation + when "new" + # create new record + @record = klass.new + if key == :role + @record.miq_product_features = [MiqProductFeature.find_by(:identifier => MiqProductFeature.feature_root)] + end + when "copy" + # copy existing record + @record = record.clone + @record.miq_product_features = record.miq_product_features + @record.read_only = false + else + # use existing record + @record = record + end + @sb[:typ] = operation + + rbac_role_set_form_vars + rbac_role_get_form_vars + + rbac_edit_save_or_add('role', 'miq_user_role') + end + def rbac_edit_save_or_add(what, rbac_suffix = what) key = what.to_sym id = params[:id] || "new" add_pressed = params[:button] == "add" - return unless load_edit("rbac_#{what}_edit__#{id}", "replace_cell__explorer") + + # return unless load_edit("rbac_#{what}_edit__#{id}", "replace_cell__explorer") case key when :user @@ -1269,7 +1330,6 @@ def rbac_role_set_form_vars @edit[:new][:vm_restriction] = vmr || :none str = @record.settings.fetch_path(:restrictions, :service_templates) if @record.settings @edit[:new][:service_template_restriction] = str || :none - @edit[:new][:features] = rbac_expand_features(@record.miq_product_features.map(&:identifier)).sort @edit[:current] = copy_hash(@edit[:new]) @@ -1303,54 +1363,11 @@ def rbac_compact_features(selected, node = nil) end end - # Yield all features for given tree node a section or feature - # - # a. special case _tab_all_vm_rules - # b. section node /^_tab_/ - # return all features below this section and - # recursively below any nested sections - # and nested features recursively - # c. feature node - # return nested features recursively - # - def recurse_sections_and_features(node) - if /_tab_all_vm_rules$/.match?(node) - MiqProductFeature.feature_children('all_vm_rules').each do |feature| - kids = MiqProductFeature.feature_all_children(feature) - yield feature, [feature] + kids - end - elsif /^_tab_/.match?(node) - section_id = node.split('_tab_').last.to_sym - Menu::Manager.section(section_id).features_recursive.each do |f| - kids = MiqProductFeature.feature_all_children(f) - yield f, [f] + kids - end - else - kids = MiqProductFeature.feature_all_children(node) - yield node, [node] + kids - end - end - def rbac_role_get_form_vars @edit[:new][:name] = params[:name] if params[:name] @edit[:new][:vm_restriction] = params[:vm_restriction].to_sym if params[:vm_restriction] @edit[:new][:service_template_restriction] = params[:service_template_restriction].to_sym if params[:service_template_restriction] - - # Add/removed features based on the node that was checked - if params[:check] - node = params[:id].split("__").last # Get the feature of the checked node - if params[:check] == "0" # Unchecked - recurse_sections_and_features(node) do |feature, all| - @edit[:new][:features] -= all # remove the feature + children - rbac_role_remove_parent(feature) # remove all parents above the unchecked tab feature - end - else # Checked - recurse_sections_and_features(node) do |feature, all| - @edit[:new][:features] += all # remove the feature + children - rbac_role_add_parent(feature) # remove all parents above the unchecked tab feature - end - end - end + @edit[:new][:features] = params[:features] if params[:features] @edit[:new][:features].uniq! @edit[:new][:features].sort! end diff --git a/app/helpers/ops_helper/role_rbac_details_helper.rb b/app/helpers/ops_helper/role_rbac_details_helper.rb index 6a86fcc9d28..7cba57e41fc 100644 --- a/app/helpers/ops_helper/role_rbac_details_helper.rb +++ b/app/helpers/ops_helper/role_rbac_details_helper.rb @@ -22,6 +22,11 @@ def rbac_role_info_view(role, rbac_menu_tree) }) end + def rbac_role_product_features(role, rbac_menu_tree) + cells = row_data(_("Product Features (Read Only)"), {:input => 'component', :component => 'TREE_VIEW_REDUX', :props => rbac_menu_tree.locals_for_render, :name => rbac_menu_tree.name}) + cells[:cells][:value][:props] + end + def select_tree_node(tree_id) { :remote => true, diff --git a/app/javascript/components/rbac-role-form/index.jsx b/app/javascript/components/rbac-role-form/index.jsx new file mode 100644 index 00000000000..bfaed52dc90 --- /dev/null +++ b/app/javascript/components/rbac-role-form/index.jsx @@ -0,0 +1,358 @@ +import React, { useState, useEffect } from 'react'; +import { + Folder20, Search20, RuleFilled20, Edit20 +} from '@carbon/icons-react'; +import MiqFormRenderer, { useFormApi } from '@@ddf'; +import { FormSpy } from '@data-driven-forms/react-form-renderer'; +import PropTypes from 'prop-types'; +import { Loading, Button } from 'carbon-components-react'; +import createSchema from './rbac-role-form.schema'; +import miqRedirectBack from '../../helpers/miq-redirect-back'; + +let idCounter = 0; + +let modified = false; +let features = new Set(); +const RbacRoleForm = (props) => { + const { + selectOptions, url, getURL, customProps, role, existingProductFeatures, + } = props; + + const generateId = () => idCounter++; + + // necessary for older roles that do only have top level nodes as features + const checkChildren = (productFeature, child) => { + if (!child.children) { + features.add(child.value); + } else { + for (let nextChild of child.children) { + checkChildren(productFeature, nextChild); + } + } + }; + + // find checked boxes for all role features + const findCheck = (productFeature, node) => { + const result = node.value.split('__')[1].split('#')[0]; + + if (result === productFeature) { + features.add(node.value); + if (node.children) { + for (let child of node.children) { + checkChildren(productFeature, child); + } + } + } + if (node.children) { + for (let child of node.children) { + findCheck(productFeature, child); + } + } + }; + + const transformTree = (node) => { + const currentId = generateId(); + + const nodeObject = { + value: `${node.key}#${currentId}`, + label: node.text, + }; + + let icon; + switch (node.icon) { + case 'fa fa-search': + icon = ; + break; + + case 'fa fa-shield': + icon = ; + break; + + case 'pficon pficon-edit': + icon = ; + break; + + case 'pficon pficon-folder-close': + if (node.nodes === undefined) { + icon = ; + } + break; + default: + break; + } + if (icon) { + nodeObject.icon = { icon }; + } + + if (node.nodes) { + nodeObject.children = node.nodes.map(transformTree); + } + return nodeObject; + }; + + const [formData, setFormData] = useState({ + isLoading: false, + params: {}, + initialValues: {}, + nodes: [], + checked: [], + }); + + const customValidation = (values) => { + const errors = {}; + if (values.tree_dropdown === undefined) { + values.tree_dropdown = formData.initialValues.miqProductFeatures || []; + } + if (values) { + if (values.name === formData.initialValues.name + && values.vm_restriction === formData.initialValues.vm_restriction + && values.service_template_restriction === formData.initialValues.service_template_restriction + && JSON.stringify(values.tree_dropdown) === JSON.stringify(formData.initialValues.miqProductFeatures)) { + modified = false; + } else { + modified = true; + } + + if (values.name === '' || (values && values.tree_dropdown && values.tree_dropdown.length === 0)) { + errors.valid = 'not_valid'; + } + } + return errors; + }; + + const isEdit = !!(role && role.id); + + useEffect(() => { + if (formData.isLoading) { + http.post(url, formData.params) + .then(() => { + const confirmation = isEdit ? __('Role Edited') : __('Role Created'); + miqRedirectBack(sprintf(confirmation), 'success', '/ops/explorer'); + }) + .catch((error) => console.log('error: ', error)); + } else if (isEdit) { + http.get(`${getURL}/${role.id}`).then((roleValues) => { + if (roleValues) { + const bsTree = JSON.parse(customProps.bs_tree); + const nodes = bsTree.map(transformTree); + roleValues.miqProductFeatures.forEach((productFeature) => { + findCheck(productFeature.identifier, nodes[0]); + }); + setFormData({ + ...formData, isLoading: false, initialValues: roleValues, nodes, checked: features, + }); + } + }); + } else { + const initialValues = { + name: role.name !== null ? `Copy of ${role.name}` : '', + vm_restriction: role && role.settings && role.settings.restrictions && role.settings.restrictions.vms, + service_template_restriction: role && role.settings && role.settings.restrictions && role.settings.restrictions.service_templates, + }; + const bsTree = JSON.parse(customProps.bs_tree); + const nodes = bsTree.map(transformTree); + if (role.name) { + idCounter = 0; + const bsTree = JSON.parse(customProps.bs_tree); + const nodes = bsTree.map(transformTree); + existingProductFeatures.forEach((productFeature) => { + findCheck(productFeature.identifier, nodes[0]); + }); + } + initialValues.tree_dropdown = features; + console.log("initial Values: ", initialValues); + if (initialValues) { + setFormData({ + ...formData, isLoading: false, initialValues, nodes, checked: features, + }); + } + } + }, [formData.isLoading, role]); + + const onSubmit = (values) => { + miqSparkleOn(); + if (!values.tree_dropdown) { + values.tree_dropdown = formData.checked; + } + const checkedBoxes = Array.from(values.tree_dropdown); + const treeValues = checkedBoxes.map((feature) => feature.split('#')[0]); + const splitValues = treeValues.map((string) => string.split('__')[1]); + const productFeatures = splitValues; + values.tree_dropdown = splitValues; + + if (values.vm_restriction === '-1') { + values.vm_restriction = ''; + } + + if (values.service_template_restriction === '-1') { + values.service_template_restriction = ''; + } + + // do split to get rid of id on submit + const params = { + name: values.name, + vm_restriction: values.vm_restriction, + service_template_restriction: values.service_template_restriction, + features: productFeatures, + }; + + setFormData({ + ...formData, + isLoading: true, + params, + }); + }; + + const onCancel = () => { + const confirmation = role.id ? __(`Edit of Role was cancelled by the user`) + : __(`Add of new Role was cancelled by the user`); + const message = sprintf( + confirmation + ); + miqRedirectBack(message, 'warning', '/ops/explorer'); + }; + + const onReset = () => { + features = new Set(); + idCounter = 0; + http.get(`${getURL}/${role.id}`).then((roleValues) => { + if (roleValues) { + if (roleValues.miqProductFeatures) { + const bsTree = JSON.parse(customProps.bs_tree); + const nodes = bsTree.map(transformTree); + roleValues.miqProductFeatures.forEach((productFeature) => { + findCheck(productFeature.identifier, nodes[0]); + }); + } + setFormData({ + ...formData, isLoading: false, initialValues: roleValues, checked: features, + }); + } + }); + }; + + return ( +
+ {formData.isLoading ? ( +
+ +
+ ) : ( +
+ customValidation(values)} + FormTemplate={(props) => } + /> +
+ )} +
+ ); +}; + +const FormTemplate = ({ + formFields, roleId, +}) => { + const { + handleSubmit, onReset, onCancel, getState, + } = useFormApi(); + const { valid } = getState(); + const submitLabel = !!roleId ? __('Save') : __('Add'); + return ( +
+ {formFields} + + {() => ( +
+ { !roleId + ? ( + + ) : ( + + )} + {!!roleId + ? ( + + ) : null} + + +
+ )} +
+
+ ); +}; + +RbacRoleForm.propTypes = { + selectOptions: PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.string.isRequired)).isRequired, + url: PropTypes.string, + getURL: PropTypes.string, + customProps: PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.array]).isRequired, + role: PropTypes.shape({ + id: PropTypes.number, + name: PropTypes.string, + settings: PropTypes.shape({ + restrictions: PropTypes.shape({ + service_templates: PropTypes.string.isRequired, + vms: PropTypes.string.isRequired, + }), + }), + }), + existingProductFeatures: PropTypes.oneOfType([PropTypes.object, PropTypes.array]), +}; + +RbacRoleForm.defaultProps = { + url: '', + getURL: '', + role: undefined, + existingProductFeatures: undefined, +}; + +FormTemplate.propTypes = { + formFields: PropTypes.arrayOf( + PropTypes.shape({ selectOptions: PropTypes.arrayOf(PropTypes.string) }), + PropTypes.shape({ url: PropTypes.string }), + PropTypes.shape({ getURL: PropTypes.string }), + PropTypes.shape({ customProps: PropTypes.object }), + PropTypes.shape({ role: PropTypes.object }), + ), + roleId: PropTypes.number, +}; + +FormTemplate.defaultProps = { + formFields: undefined, + roleId: undefined, +}; + +export default RbacRoleForm; diff --git a/app/javascript/components/rbac-role-form/rbac-role-form.schema.js b/app/javascript/components/rbac-role-form/rbac-role-form.schema.js new file mode 100644 index 00000000000..d05f336f6c6 --- /dev/null +++ b/app/javascript/components/rbac-role-form/rbac-role-form.schema.js @@ -0,0 +1,55 @@ +import { componentTypes, validatorTypes } from '@@ddf'; + +const createSchema = (selectOptions, customProps, formData) => ({ + fields: [ + { + component: componentTypes.PLAIN_TEXT, + id: 'role-information', + name: 'role-information', + label: __('Role Information'), + className: 'role-information', + }, + { + component: componentTypes.TEXT_FIELD, + id: 'name', + name: 'name', + initialValue: formData.initialValues.name || '', + label: __('Name'), + className: 'name-label', + maxLength: 128, + validate: [{ type: validatorTypes.REQUIRED }], + isRequired: true, + }, + { + component: componentTypes.SELECT, + id: 'vm_restriction', + name: 'vm_restriction', + className: 'access-restriction-orchestration', + initialValue: formData.initialValues.vms || '', + label: __('Access Restriction for Orchestration Stacks, Key Pairs, Services, VMs, and Templates'), + maxLength: 128, + options: selectOptions.map((option) => ({ label: option[1], value: option[0] })), + }, + { + component: componentTypes.SELECT, + id: 'service_template_restriction', + name: 'service_template_restriction', + initialValue: formData.initialValues.service_templates || '', + className: 'access-restriction-catalog', + label: __('Access Restriction for Catalog Items'), + maxLength: 128, + options: selectOptions.map((option) => ({ label: option[1], value: option[0] })), + }, + { + component: 'checkbox-tree', + name: 'tree_dropdown', + id: 'tree_dropdown', + label: __('Product Features (Editing)'), + className: 'checkbox-tree', + nodes: formData.nodes, + checked: formData.checked, + }, + ], +}); + +export default createSchema; diff --git a/app/javascript/components/tree-view/checkbox_tree.jsx b/app/javascript/components/tree-view/checkbox_tree.jsx new file mode 100644 index 00000000000..f301138915e --- /dev/null +++ b/app/javascript/components/tree-view/checkbox_tree.jsx @@ -0,0 +1,62 @@ +import React, { useState, useEffect } from 'react'; +import CheckboxTree from 'react-checkbox-tree'; +import PropTypes from 'prop-types'; +import { useFieldApi } from '@@ddf'; +import 'react-checkbox-tree/lib/react-checkbox-tree.css'; +import { + CheckboxChecked20, Checkbox20, CheckboxCheckedFilled20, ChevronRight20, ChevronDown20, Folder20, FolderOpen20, +} from '@carbon/icons-react'; + +const carbonIcons = { + check: , + uncheck: , + halfCheck: , + expandClose: , + expandOpen: , + parentClose: , + parentOpen: , +}; + +const CheckboxTreeComponent = (props) => { + const { label, nodes, checked } = props; + const { input } = useFieldApi(props); + + const [treeState, setTreeState] = useState({ + checked: checked || [], + expanded: (nodes && nodes[0] && [nodes[0].value]) || [], + tree: nodes, + }); + + useEffect(() => { + input.onChange(treeState.checked); + }, [treeState.checked]); + + return ( +
+

{label}

+ { + setTreeState({ ...treeState, checked }); + }} + onExpand={(expanded) => setTreeState({ ...treeState, expanded })} + /> +
+ ); +}; + +CheckboxTreeComponent.propTypes = { + label: PropTypes.string.isRequired, + nodes: PropTypes.oneOfType([PropTypes.object, PropTypes.array]), + checked: PropTypes.oneOfType([PropTypes.object, PropTypes.array]), +}; + +CheckboxTreeComponent.defaultProps = { + nodes: {}, + checked: [], +}; + +export default CheckboxTreeComponent; diff --git a/app/javascript/forms/mappers/componentMapper.jsx b/app/javascript/forms/mappers/componentMapper.jsx index c2fa1cd0f94..707a8bf7cc9 100644 --- a/app/javascript/forms/mappers/componentMapper.jsx +++ b/app/javascript/forms/mappers/componentMapper.jsx @@ -7,7 +7,8 @@ import FileUploadComponent from '../../components/file-upload'; import PasswordField from '../../components/async-credentials/password-field'; import Select from '../../components/select'; import CodeEditor from '../../components/code-editor'; -import { TreeViewField, TreeViewSelector } from '../../components/tree-view'; +import { TreeViewField, TreeViewSelector, TreeViewRedux } from '../../components/tree-view'; +import CheckboxTreeComponent from '../../components/tree-view/checkbox_tree'; import MultiSelectWithSelectAll from '../../components/multiselect-with-selectall'; import FontIconPicker from '../../components/fonticon-picker'; import FontIconPickerDdf from '../../components/fonticon-picker/font-icon-picker-ddf'; @@ -25,6 +26,8 @@ const mapper = { 'multi-select': MultiSelectWithSelectAll, 'font-icon-picker': FontIconPicker, 'font-icon-picker-ddf': FontIconPickerDdf, // used for react form pages + 'tree-view-redux': TreeViewRedux, + 'checkbox-tree': CheckboxTreeComponent, }; export default mapper; diff --git a/app/javascript/packs/component-definitions-common.js b/app/javascript/packs/component-definitions-common.js index f56709a0b77..a420a01ab2b 100644 --- a/app/javascript/packs/component-definitions-common.js +++ b/app/javascript/packs/component-definitions-common.js @@ -107,6 +107,7 @@ import PxeImageForm from '../components/pxe-image-type-form'; import PxeIsoDatastoreForm from '../components/pxe-iso-datastore-form'; import PxeIsoImageForm from '../components/pxe-iso-image-form'; import PxeServersForm from '../components/pxe-servers-form/pxe-server-form'; +import RbacRoleForm from '../components/rbac-role-form'; import RecentHostGraph from '../components/provider-dashboard-charts/recent-host-chart'; import RecentVmGraph from '../components/provider-dashboard-charts/recent-vm-chart'; import ReconfigureTable from '../components/reconfigure-vm-form/reconfigure-table'; @@ -288,6 +289,7 @@ ManageIQ.component.addReact('PxeIsoDatastoreForm', PxeIsoDatastoreForm); ManageIQ.component.addReact('PxeIsoImageForm', PxeIsoImageForm); ManageIQ.component.addReact('PxeServersForm', PxeServersForm); ManageIQ.component.addReact('Quadicon', Quadicon); +ManageIQ.component.addReact('RbacRoleForm', RbacRoleForm); ManageIQ.component.addReact('RecentHostGraph', RecentHostGraph); ManageIQ.component.addReact('RecentVmGraph', RecentVmGraph); ManageIQ.component.addReact('ReconfigureTable', ReconfigureTable); diff --git a/app/javascript/spec/action-form/__snapshots__/action-form.spec.js.snap b/app/javascript/spec/action-form/__snapshots__/action-form.spec.js.snap index 90cbda1e1fb..2a4e40e1aa5 100644 --- a/app/javascript/spec/action-form/__snapshots__/action-form.spec.js.snap +++ b/app/javascript/spec/action-form/__snapshots__/action-form.spec.js.snap @@ -816,6 +816,7 @@ exports[`Action Form Component should render adding a new action 1`] = ` componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -838,6 +839,13 @@ exports[`Action Form Component should render adding a new action 1`] = ` "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -1527,6 +1535,7 @@ exports[`Action Form Component should render adding a new action 1`] = ` componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -1550,6 +1559,13 @@ exports[`Action Form Component should render adding a new action 1`] = ` "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } diff --git a/app/javascript/spec/add-remove-security-groups-form/__snapshots__/add-remove-security-groups-form.spec.js.snap b/app/javascript/spec/add-remove-security-groups-form/__snapshots__/add-remove-security-groups-form.spec.js.snap index 601dcb307b5..aa5e026377b 100644 --- a/app/javascript/spec/add-remove-security-groups-form/__snapshots__/add-remove-security-groups-form.spec.js.snap +++ b/app/javascript/spec/add-remove-security-groups-form/__snapshots__/add-remove-security-groups-form.spec.js.snap @@ -130,6 +130,7 @@ exports[`Add/remove security groups form component should remove security group componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -152,6 +153,13 @@ exports[`Add/remove security groups form component should remove security group "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -193,6 +201,7 @@ exports[`Add/remove security groups form component should remove security group componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -216,6 +225,13 @@ exports[`Add/remove security groups form component should remove security group "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } diff --git a/app/javascript/spec/ansible-credentials-form/__snapshots__/ansible-credentials-form.spec.js.snap b/app/javascript/spec/ansible-credentials-form/__snapshots__/ansible-credentials-form.spec.js.snap index 19d4211a2d1..1f16452e274 100644 --- a/app/javascript/spec/ansible-credentials-form/__snapshots__/ansible-credentials-form.spec.js.snap +++ b/app/javascript/spec/ansible-credentials-form/__snapshots__/ansible-credentials-form.spec.js.snap @@ -90,6 +90,7 @@ exports[`Ansible Credential Form Component should render adding a new credential componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -112,6 +113,13 @@ exports[`Ansible Credential Form Component should render adding a new credential "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -183,6 +191,7 @@ exports[`Ansible Credential Form Component should render adding a new credential componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -206,6 +215,13 @@ exports[`Ansible Credential Form Component should render adding a new credential "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -1573,6 +1589,7 @@ exports[`Ansible Credential Form Component should render editing a credential 1` componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -1595,6 +1612,13 @@ exports[`Ansible Credential Form Component should render editing a credential 1` "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -1673,6 +1697,7 @@ exports[`Ansible Credential Form Component should render editing a credential 1` componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -1696,6 +1721,13 @@ exports[`Ansible Credential Form Component should render editing a credential 1` "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } diff --git a/app/javascript/spec/ansible-edit-catalog-form/__snapshots__/ansible-edit-catalog-form.spec.js.snap b/app/javascript/spec/ansible-edit-catalog-form/__snapshots__/ansible-edit-catalog-form.spec.js.snap index f4b3fd2abcd..f9d2e3cef15 100644 --- a/app/javascript/spec/ansible-edit-catalog-form/__snapshots__/ansible-edit-catalog-form.spec.js.snap +++ b/app/javascript/spec/ansible-edit-catalog-form/__snapshots__/ansible-edit-catalog-form.spec.js.snap @@ -1320,6 +1320,7 @@ exports[`Ansible playbook edit catalog Form Component should not render some fie componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "conditional-checkbox": [Function], "copy-from-provisioning": [Function], @@ -3530,6 +3531,7 @@ exports[`Ansible playbook edit catalog Form Component should not render some fie componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "conditional-checkbox": [Function], "copy-from-provisioning": [Function], @@ -5747,6 +5749,7 @@ exports[`Ansible playbook edit catalog Form Component should not render some fie componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "conditional-checkbox": [Function], "copy-from-provisioning": [Function], @@ -59572,6 +59575,7 @@ exports[`Ansible playbook edit catalog Form Component should render correct form componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "conditional-checkbox": [Function], "copy-from-provisioning": [Function], @@ -61791,6 +61795,7 @@ exports[`Ansible playbook edit catalog Form Component should render correct form componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "conditional-checkbox": [Function], "copy-from-provisioning": [Function], @@ -64017,6 +64022,7 @@ exports[`Ansible playbook edit catalog Form Component should render correct form componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "conditional-checkbox": [Function], "copy-from-provisioning": [Function], @@ -120767,6 +120773,7 @@ exports[`Ansible playbook edit catalog Form Component should render retirement p componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "conditional-checkbox": [Function], "copy-from-provisioning": [Function], @@ -122977,6 +122984,7 @@ exports[`Ansible playbook edit catalog Form Component should render retirement p componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "conditional-checkbox": [Function], "copy-from-provisioning": [Function], @@ -125194,6 +125202,7 @@ exports[`Ansible playbook edit catalog Form Component should render retirement p componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "conditional-checkbox": [Function], "copy-from-provisioning": [Function], diff --git a/app/javascript/spec/c-and-u-collections-form/__snapshots__/c-and-u-collections-form.spec.js.snap b/app/javascript/spec/c-and-u-collections-form/__snapshots__/c-and-u-collections-form.spec.js.snap index 60dd95d7d99..858772f6d40 100644 --- a/app/javascript/spec/c-and-u-collections-form/__snapshots__/c-and-u-collections-form.spec.js.snap +++ b/app/javascript/spec/c-and-u-collections-form/__snapshots__/c-and-u-collections-form.spec.js.snap @@ -96,6 +96,7 @@ exports[`DiagnosticsCURepairForm Component Should add a record from DiagnosticsC componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -118,6 +119,13 @@ exports[`DiagnosticsCURepairForm Component Should add a record from DiagnosticsC "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -205,6 +213,7 @@ exports[`DiagnosticsCURepairForm Component Should add a record from DiagnosticsC componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -228,6 +237,13 @@ exports[`DiagnosticsCURepairForm Component Should add a record from DiagnosticsC "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } diff --git a/app/javascript/spec/cloud-database-form/__snapshots__/cloud-database-form.spec.js.snap b/app/javascript/spec/cloud-database-form/__snapshots__/cloud-database-form.spec.js.snap index 2cbf9b0cf7d..1599143a408 100644 --- a/app/javascript/spec/cloud-database-form/__snapshots__/cloud-database-form.spec.js.snap +++ b/app/javascript/spec/cloud-database-form/__snapshots__/cloud-database-form.spec.js.snap @@ -128,6 +128,7 @@ exports[`Cloud Database form component should render "Edit" form 1`] = ` componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -150,6 +151,13 @@ exports[`Cloud Database form component should render "Edit" form 1`] = ` "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -210,6 +218,7 @@ exports[`Cloud Database form component should render "Edit" form 1`] = ` componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -233,6 +242,13 @@ exports[`Cloud Database form component should render "Edit" form 1`] = ` "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } diff --git a/app/javascript/spec/cloud-object-store-container-form/__snapshots__/cloud-object-store-container-form.spec.js.snap b/app/javascript/spec/cloud-object-store-container-form/__snapshots__/cloud-object-store-container-form.spec.js.snap index 1c91a0a2e39..e47b35e10fa 100644 --- a/app/javascript/spec/cloud-object-store-container-form/__snapshots__/cloud-object-store-container-form.spec.js.snap +++ b/app/javascript/spec/cloud-object-store-container-form/__snapshots__/cloud-object-store-container-form.spec.js.snap @@ -60,6 +60,7 @@ exports[`Cloud Object Store Container form component should add Amazon cloud obj componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -82,6 +83,13 @@ exports[`Cloud Object Store Container form component should add Amazon cloud obj "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -124,6 +132,7 @@ exports[`Cloud Object Store Container form component should add Amazon cloud obj componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -147,6 +156,13 @@ exports[`Cloud Object Store Container form component should add Amazon cloud obj "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -976,6 +992,7 @@ exports[`Cloud Object Store Container form component should add Openstack cloud componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -998,6 +1015,13 @@ exports[`Cloud Object Store Container form component should add Openstack cloud "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -1040,6 +1064,7 @@ exports[`Cloud Object Store Container form component should add Openstack cloud componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -1063,6 +1088,13 @@ exports[`Cloud Object Store Container form component should add Openstack cloud "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -1868,6 +1900,7 @@ exports[`Cloud Object Store Container form component should render add cloud obj componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -1890,6 +1923,13 @@ exports[`Cloud Object Store Container form component should render add cloud obj "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -1932,6 +1972,7 @@ exports[`Cloud Object Store Container form component should render add cloud obj componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -1955,6 +1996,13 @@ exports[`Cloud Object Store Container form component should render add cloud obj "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } diff --git a/app/javascript/spec/cloud-volume-actions-form/__snapshots__/cloud-volume-actions-form.spec.js.snap b/app/javascript/spec/cloud-volume-actions-form/__snapshots__/cloud-volume-actions-form.spec.js.snap index b3487ae0b58..aa7292ec0b1 100644 --- a/app/javascript/spec/cloud-volume-actions-form/__snapshots__/cloud-volume-actions-form.spec.js.snap +++ b/app/javascript/spec/cloud-volume-actions-form/__snapshots__/cloud-volume-actions-form.spec.js.snap @@ -92,6 +92,7 @@ exports[`Cloud Volume Backup Create form component should render the cloud volum componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -114,6 +115,13 @@ exports[`Cloud Volume Backup Create form component should render the cloud volum "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -184,6 +192,7 @@ exports[`Cloud Volume Backup Create form component should render the cloud volum componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -207,6 +216,13 @@ exports[`Cloud Volume Backup Create form component should render the cloud volum "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -1630,6 +1646,7 @@ exports[`Cloud Volume Backup Create form component when adding a new backup of c componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -1652,6 +1669,13 @@ exports[`Cloud Volume Backup Create form component when adding a new backup of c "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -1722,6 +1746,7 @@ exports[`Cloud Volume Backup Create form component when adding a new backup of c componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -1745,6 +1770,13 @@ exports[`Cloud Volume Backup Create form component when adding a new backup of c "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -3148,6 +3180,7 @@ exports[`Cloud Volume Restore from backup form component should render the cloud componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -3170,6 +3203,13 @@ exports[`Cloud Volume Restore from backup form component should render the cloud "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -3220,6 +3260,7 @@ exports[`Cloud Volume Restore from backup form component should render the cloud componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -3243,6 +3284,13 @@ exports[`Cloud Volume Restore from backup form component should render the cloud "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -4239,6 +4287,7 @@ exports[`Cloud Volume Restore from backup form component when restoring cloud vo componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -4261,6 +4310,13 @@ exports[`Cloud Volume Restore from backup form component when restoring cloud vo "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -4311,6 +4367,7 @@ exports[`Cloud Volume Restore from backup form component when restoring cloud vo componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -4334,6 +4391,13 @@ exports[`Cloud Volume Restore from backup form component when restoring cloud vo "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -5322,6 +5386,7 @@ exports[`Cloud Volume Snapshot Create form component should render the cloud vol componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -5344,6 +5409,13 @@ exports[`Cloud Volume Snapshot Create form component should render the cloud vol "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -5386,6 +5458,7 @@ exports[`Cloud Volume Snapshot Create form component should render the cloud vol componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -5409,6 +5482,13 @@ exports[`Cloud Volume Snapshot Create form component should render the cloud vol "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -6171,6 +6251,7 @@ exports[`Cloud Volume Snapshot Create form component when adding a new snapshot componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -6193,6 +6274,13 @@ exports[`Cloud Volume Snapshot Create form component when adding a new snapshot "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -6235,6 +6323,7 @@ exports[`Cloud Volume Snapshot Create form component when adding a new snapshot componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -6258,6 +6347,13 @@ exports[`Cloud Volume Snapshot Create form component when adding a new snapshot "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } diff --git a/app/javascript/spec/cloud-volume-form/__snapshots__/attach-detach-cloud-volume-form.spec.js.snap b/app/javascript/spec/cloud-volume-form/__snapshots__/attach-detach-cloud-volume-form.spec.js.snap index eb86f377754..424c8e83813 100644 --- a/app/javascript/spec/cloud-volume-form/__snapshots__/attach-detach-cloud-volume-form.spec.js.snap +++ b/app/javascript/spec/cloud-volume-form/__snapshots__/attach-detach-cloud-volume-form.spec.js.snap @@ -123,6 +123,7 @@ exports[`Attach / Detach form component should render Attach Cloud Volume to the componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -145,6 +146,13 @@ exports[`Attach / Detach form component should render Attach Cloud Volume to the "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -216,6 +224,7 @@ exports[`Attach / Detach form component should render Attach Cloud Volume to the componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -239,6 +248,13 @@ exports[`Attach / Detach form component should render Attach Cloud Volume to the "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -1384,6 +1400,7 @@ exports[`Attach / Detach form component should render Attach Selected Cloud Volu componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -1406,6 +1423,13 @@ exports[`Attach / Detach form component should render Attach Selected Cloud Volu "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -1477,6 +1501,7 @@ exports[`Attach / Detach form component should render Attach Selected Cloud Volu componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -1500,6 +1525,13 @@ exports[`Attach / Detach form component should render Attach Selected Cloud Volu "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -2632,6 +2664,7 @@ exports[`Attach / Detach form component should render Detach Cloud Volume from t componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -2654,6 +2687,13 @@ exports[`Attach / Detach form component should render Detach Cloud Volume from t "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -2712,6 +2752,7 @@ exports[`Attach / Detach form component should render Detach Cloud Volume from t componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -2735,6 +2776,13 @@ exports[`Attach / Detach form component should render Detach Cloud Volume from t "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -3673,6 +3721,7 @@ exports[`Attach / Detach form component should render Detach Selected Cloud Volu componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -3695,6 +3744,13 @@ exports[`Attach / Detach form component should render Detach Selected Cloud Volu "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -3753,6 +3809,7 @@ exports[`Attach / Detach form component should render Detach Selected Cloud Volu componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -3776,6 +3833,13 @@ exports[`Attach / Detach form component should render Detach Selected Cloud Volu "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -4729,6 +4793,7 @@ exports[`Attach / Detach form component should submit Attach API call 1`] = ` componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -4751,6 +4816,13 @@ exports[`Attach / Detach form component should submit Attach API call 1`] = ` "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -4822,6 +4894,7 @@ exports[`Attach / Detach form component should submit Attach API call 1`] = ` componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -4845,6 +4918,13 @@ exports[`Attach / Detach form component should submit Attach API call 1`] = ` "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -5977,6 +6057,7 @@ exports[`Attach / Detach form component should submit Detach API call 1`] = ` componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -5999,6 +6080,13 @@ exports[`Attach / Detach form component should submit Detach API call 1`] = ` "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -6057,6 +6145,7 @@ exports[`Attach / Detach form component should submit Detach API call 1`] = ` componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -6080,6 +6169,13 @@ exports[`Attach / Detach form component should submit Detach API call 1`] = ` "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } diff --git a/app/javascript/spec/data-store-fore/__snapshots__/datastore-form.spec.js.snap b/app/javascript/spec/data-store-fore/__snapshots__/datastore-form.spec.js.snap index a392aa4bdc0..8308a6a8389 100644 --- a/app/javascript/spec/data-store-fore/__snapshots__/datastore-form.spec.js.snap +++ b/app/javascript/spec/data-store-fore/__snapshots__/datastore-form.spec.js.snap @@ -165,6 +165,7 @@ exports[`Datastore form component Datastore domain form component should render componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -187,6 +188,13 @@ exports[`Datastore form component Datastore domain form component should render "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -261,6 +269,7 @@ exports[`Datastore form component Datastore domain form component should render componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -284,6 +293,13 @@ exports[`Datastore form component Datastore domain form component should render "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -1751,6 +1767,7 @@ exports[`Datastore form component Datastore namespace form component should rend componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -1773,6 +1790,13 @@ exports[`Datastore form component Datastore namespace form component should rend "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -1850,6 +1874,7 @@ exports[`Datastore form component Datastore namespace form component should rend componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -1873,6 +1898,13 @@ exports[`Datastore form component Datastore namespace form component should rend "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } diff --git a/app/javascript/spec/diagnostics-collect-log-form/__snapshots__/diagnostics-collect-log-form.spec.js.snap b/app/javascript/spec/diagnostics-collect-log-form/__snapshots__/diagnostics-collect-log-form.spec.js.snap index 747bc061893..337e22d43cb 100644 --- a/app/javascript/spec/diagnostics-collect-log-form/__snapshots__/diagnostics-collect-log-form.spec.js.snap +++ b/app/javascript/spec/diagnostics-collect-log-form/__snapshots__/diagnostics-collect-log-form.spec.js.snap @@ -103,6 +103,7 @@ exports[`Diagnostics Collect Log form component should render edit DiagnosticsCo componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -125,6 +126,13 @@ exports[`Diagnostics Collect Log form component should render edit DiagnosticsCo "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -195,6 +203,7 @@ exports[`Diagnostics Collect Log form component should render edit DiagnosticsCo componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -218,6 +227,13 @@ exports[`Diagnostics Collect Log form component should render edit DiagnosticsCo "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -1646,6 +1662,7 @@ exports[`Diagnostics Collect Log form component should render edit DiagnosticsCo componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -1668,6 +1685,13 @@ exports[`Diagnostics Collect Log form component should render edit DiagnosticsCo "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -1738,6 +1762,7 @@ exports[`Diagnostics Collect Log form component should render edit DiagnosticsCo componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -1761,6 +1786,13 @@ exports[`Diagnostics Collect Log form component should render edit DiagnosticsCo "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -3194,6 +3226,7 @@ exports[`Diagnostics Collect Log form component should render new DiagnosticsCol componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -3216,6 +3249,13 @@ exports[`Diagnostics Collect Log form component should render new DiagnosticsCol "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -3291,6 +3331,7 @@ exports[`Diagnostics Collect Log form component should render new DiagnosticsCol componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -3314,6 +3355,13 @@ exports[`Diagnostics Collect Log form component should render new DiagnosticsCol "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } diff --git a/app/javascript/spec/embedded-terraform-credentials-form/__snapshots__/embedded-terraform-credentials-form.spec.js.snap b/app/javascript/spec/embedded-terraform-credentials-form/__snapshots__/embedded-terraform-credentials-form.spec.js.snap index 8f329917aef..7fb264f6483 100644 --- a/app/javascript/spec/embedded-terraform-credentials-form/__snapshots__/embedded-terraform-credentials-form.spec.js.snap +++ b/app/javascript/spec/embedded-terraform-credentials-form/__snapshots__/embedded-terraform-credentials-form.spec.js.snap @@ -91,6 +91,7 @@ exports[`Embedded Terraform Credential Form Component should render adding a new componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -113,6 +114,13 @@ exports[`Embedded Terraform Credential Form Component should render adding a new "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -185,6 +193,7 @@ exports[`Embedded Terraform Credential Form Component should render adding a new componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -208,6 +217,13 @@ exports[`Embedded Terraform Credential Form Component should render adding a new "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -1596,6 +1612,7 @@ exports[`Embedded Terraform Credential Form Component should render editing a cr componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -1618,6 +1635,13 @@ exports[`Embedded Terraform Credential Form Component should render editing a cr "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -1697,6 +1721,7 @@ exports[`Embedded Terraform Credential Form Component should render editing a cr componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -1720,6 +1745,13 @@ exports[`Embedded Terraform Credential Form Component should render editing a cr "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } diff --git a/app/javascript/spec/evacuate-form/__snapshots__/evacuate-form.spec.js.snap b/app/javascript/spec/evacuate-form/__snapshots__/evacuate-form.spec.js.snap index 0dd65d40030..3c902b6bd08 100644 --- a/app/javascript/spec/evacuate-form/__snapshots__/evacuate-form.spec.js.snap +++ b/app/javascript/spec/evacuate-form/__snapshots__/evacuate-form.spec.js.snap @@ -117,6 +117,7 @@ exports[`evacuate form component should render evacuate form when hosts empty 1` componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -139,6 +140,13 @@ exports[`evacuate form component should render evacuate form when hosts empty 1` "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -228,6 +236,7 @@ exports[`evacuate form component should render evacuate form when hosts empty 1` componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -251,6 +260,13 @@ exports[`evacuate form component should render evacuate form when hosts empty 1` "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -2048,6 +2064,7 @@ exports[`evacuate form component should render evacuate form with host options 1 componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -2070,6 +2087,13 @@ exports[`evacuate form component should render evacuate form with host options 1 "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -2180,6 +2204,7 @@ exports[`evacuate form component should render evacuate form with host options 1 componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -2203,6 +2228,13 @@ exports[`evacuate form component should render evacuate form with host options 1 "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -4359,6 +4391,7 @@ exports[`evacuate form component should render evacuate form with multiple insta componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -4381,6 +4414,13 @@ exports[`evacuate form component should render evacuate form with multiple insta "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -4470,6 +4510,7 @@ exports[`evacuate form component should render evacuate form with multiple insta componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -4493,6 +4534,13 @@ exports[`evacuate form component should render evacuate form with multiple insta "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } diff --git a/app/javascript/spec/generic-objects-form/__snapshots__/generic-objects-form.spec.js.snap b/app/javascript/spec/generic-objects-form/__snapshots__/generic-objects-form.spec.js.snap index 66f33b298f7..850ae223b73 100644 --- a/app/javascript/spec/generic-objects-form/__snapshots__/generic-objects-form.spec.js.snap +++ b/app/javascript/spec/generic-objects-form/__snapshots__/generic-objects-form.spec.js.snap @@ -29,6 +29,7 @@ exports[`Generic Object Form Component should render adding a new generic object componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -52,6 +53,13 @@ exports[`Generic Object Form Component should render adding a new generic object "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -287,6 +295,7 @@ exports[`Generic Object Form Component should render adding a new generic object componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -310,6 +319,13 @@ exports[`Generic Object Form Component should render adding a new generic object "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -548,6 +564,7 @@ exports[`Generic Object Form Component should render adding a new generic object componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -572,6 +589,13 @@ exports[`Generic Object Form Component should render adding a new generic object "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -4626,6 +4650,7 @@ exports[`Generic Object Form Component should render editing a generic object wi componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -4649,6 +4674,13 @@ exports[`Generic Object Form Component should render editing a generic object wi "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -4942,6 +4974,7 @@ exports[`Generic Object Form Component should render editing a generic object wi componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -4965,6 +4998,13 @@ exports[`Generic Object Form Component should render editing a generic object wi "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -5261,6 +5301,7 @@ exports[`Generic Object Form Component should render editing a generic object wi componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -5285,6 +5326,13 @@ exports[`Generic Object Form Component should render editing a generic object wi "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -12247,6 +12295,7 @@ exports[`Generic Object Form Component should render editing a generic object wi componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -12270,6 +12319,13 @@ exports[`Generic Object Form Component should render editing a generic object wi "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -12560,6 +12616,7 @@ exports[`Generic Object Form Component should render editing a generic object wi componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -12583,6 +12640,13 @@ exports[`Generic Object Form Component should render editing a generic object wi "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -12876,6 +12940,7 @@ exports[`Generic Object Form Component should render editing a generic object wi componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -12900,6 +12965,13 @@ exports[`Generic Object Form Component should render editing a generic object wi "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } diff --git a/app/javascript/spec/host-aggregate-form/__snapshots__/host-aggregate-form.spec.js.snap b/app/javascript/spec/host-aggregate-form/__snapshots__/host-aggregate-form.spec.js.snap index 4d6557f87fa..49e1d310f5e 100644 --- a/app/javascript/spec/host-aggregate-form/__snapshots__/host-aggregate-form.spec.js.snap +++ b/app/javascript/spec/host-aggregate-form/__snapshots__/host-aggregate-form.spec.js.snap @@ -86,6 +86,7 @@ exports[`Host aggregate form component should render add host form variant (remv componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -108,6 +109,13 @@ exports[`Host aggregate form component should render add host form variant (remv "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -144,6 +152,7 @@ exports[`Host aggregate form component should render add host form variant (remv componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -167,6 +176,13 @@ exports[`Host aggregate form component should render add host form variant (remv "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } diff --git a/app/javascript/spec/host-edit-form/__snapshots__/host-edit-form.spec.js.snap b/app/javascript/spec/host-edit-form/__snapshots__/host-edit-form.spec.js.snap index 2fa98ecddcc..46b7095da44 100644 --- a/app/javascript/spec/host-edit-form/__snapshots__/host-edit-form.spec.js.snap +++ b/app/javascript/spec/host-edit-form/__snapshots__/host-edit-form.spec.js.snap @@ -30,6 +30,7 @@ exports[`Show Edit Host Form Component should render form for *one* host 1`] = ` componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -53,6 +54,13 @@ exports[`Show Edit Host Form Component should render form for *one* host 1`] = ` "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "validate-host-credentials": [Function], "wizard": [Function], @@ -250,6 +258,7 @@ exports[`Show Edit Host Form Component should render form for *one* host 1`] = ` componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -273,6 +282,13 @@ exports[`Show Edit Host Form Component should render form for *one* host 1`] = ` "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "validate-host-credentials": [Function], "wizard": [Function], @@ -477,6 +493,7 @@ exports[`Show Edit Host Form Component should render form for *one* host 1`] = ` componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -501,6 +518,13 @@ exports[`Show Edit Host Form Component should render form for *one* host 1`] = ` "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "validate-host-credentials": [Function], "wizard": [Function], @@ -5515,6 +5539,7 @@ exports[`Show Edit Host Form Component should render form for multiple hosts 1`] componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -5538,6 +5563,13 @@ exports[`Show Edit Host Form Component should render form for multiple hosts 1`] "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "validate-host-credentials": [Function], "wizard": [Function], @@ -5574,6 +5606,7 @@ exports[`Show Edit Host Form Component should render form for multiple hosts 1`] componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -5597,6 +5630,13 @@ exports[`Show Edit Host Form Component should render form for multiple hosts 1`] "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "validate-host-credentials": [Function], "wizard": [Function], @@ -5640,6 +5680,7 @@ exports[`Show Edit Host Form Component should render form for multiple hosts 1`] componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -5664,6 +5705,13 @@ exports[`Show Edit Host Form Component should render form for multiple hosts 1`] "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "validate-host-credentials": [Function], "wizard": [Function], diff --git a/app/javascript/spec/host-initiator-group-form/__snapshots__/host-initiator-group.spec.js.snap b/app/javascript/spec/host-initiator-group-form/__snapshots__/host-initiator-group.spec.js.snap index e1e208cb81e..d90e24af1c6 100644 --- a/app/javascript/spec/host-initiator-group-form/__snapshots__/host-initiator-group.spec.js.snap +++ b/app/javascript/spec/host-initiator-group-form/__snapshots__/host-initiator-group.spec.js.snap @@ -99,6 +99,7 @@ exports[`Host Initiator Group Form Loads data and renders 1`] = ` componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -121,6 +122,13 @@ exports[`Host Initiator Group Form Loads data and renders 1`] = ` "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -200,6 +208,7 @@ exports[`Host Initiator Group Form Loads data and renders 1`] = ` componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -223,6 +232,13 @@ exports[`Host Initiator Group Form Loads data and renders 1`] = ` "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } diff --git a/app/javascript/spec/live-migrate-form/__snapshots__/live-migrate-form.spec.js.snap b/app/javascript/spec/live-migrate-form/__snapshots__/live-migrate-form.spec.js.snap index 0423aae64a9..49ca561d0c4 100644 --- a/app/javascript/spec/live-migrate-form/__snapshots__/live-migrate-form.spec.js.snap +++ b/app/javascript/spec/live-migrate-form/__snapshots__/live-migrate-form.spec.js.snap @@ -109,6 +109,7 @@ exports[`Live Migrate form component should render live migrate form when hosts componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -131,6 +132,13 @@ exports[`Live Migrate form component should render live migrate form when hosts "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -218,6 +226,7 @@ exports[`Live Migrate form component should render live migrate form when hosts componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -241,6 +250,13 @@ exports[`Live Migrate form component should render live migrate form when hosts "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -1984,6 +2000,7 @@ exports[`Live Migrate form component should render live migrate form with host o componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -2006,6 +2023,13 @@ exports[`Live Migrate form component should render live migrate form with host o "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -2114,6 +2138,7 @@ exports[`Live Migrate form component should render live migrate form with host o componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -2137,6 +2162,13 @@ exports[`Live Migrate form component should render live migrate form with host o "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -4239,6 +4271,7 @@ exports[`Live Migrate form component should render live migrate form with multip componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -4261,6 +4294,13 @@ exports[`Live Migrate form component should render live migrate form with multip "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -4348,6 +4388,7 @@ exports[`Live Migrate form component should render live migrate form with multip componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -4371,6 +4412,13 @@ exports[`Live Migrate form component should render live migrate form with multip "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } diff --git a/app/javascript/spec/physical-storage-form/__snapshots__/physical-storage-form.spec.js.snap b/app/javascript/spec/physical-storage-form/__snapshots__/physical-storage-form.spec.js.snap index 757082d3893..19168e5496c 100644 --- a/app/javascript/spec/physical-storage-form/__snapshots__/physical-storage-form.spec.js.snap +++ b/app/javascript/spec/physical-storage-form/__snapshots__/physical-storage-form.spec.js.snap @@ -20,6 +20,7 @@ exports[`Physical storage form component should render adding form variant 1`] = componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -42,6 +43,13 @@ exports[`Physical storage form component should render adding form variant 1`] = "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "validation-button": [Function], "wizard": [Function], @@ -293,6 +301,7 @@ exports[`Physical storage form component should render editing form variant 1`] componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -315,6 +324,13 @@ exports[`Physical storage form component should render editing form variant 1`] "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "validation-button": [Function], "wizard": [Function], @@ -541,6 +557,7 @@ exports[`Physical storage form component should render editing form variant 1`] componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -563,6 +580,13 @@ exports[`Physical storage form component should render editing form variant 1`] "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "validation-button": [Function], "wizard": [Function], @@ -792,6 +816,7 @@ exports[`Physical storage form component should render editing form variant 1`] componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -815,6 +840,13 @@ exports[`Physical storage form component should render editing form variant 1`] "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "validation-button": [Function], "wizard": [Function], diff --git a/app/javascript/spec/pxe-customization-template-form/__snapshots__/pxe-customization-template-form.spec.js.snap b/app/javascript/spec/pxe-customization-template-form/__snapshots__/pxe-customization-template-form.spec.js.snap index 12563657d0e..b60701a8f52 100644 --- a/app/javascript/spec/pxe-customization-template-form/__snapshots__/pxe-customization-template-form.spec.js.snap +++ b/app/javascript/spec/pxe-customization-template-form/__snapshots__/pxe-customization-template-form.spec.js.snap @@ -129,6 +129,7 @@ exports[`Pxe Customization Template Form Component should render adding a new px componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -151,6 +152,13 @@ exports[`Pxe Customization Template Form Component should render adding a new px "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -255,6 +263,7 @@ exports[`Pxe Customization Template Form Component should render adding a new px componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -278,6 +287,13 @@ exports[`Pxe Customization Template Form Component should render adding a new px "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -2755,6 +2771,7 @@ exports[`Pxe Customization Template Form Component should render copying a pxe c componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -2777,6 +2794,13 @@ exports[`Pxe Customization Template Form Component should render copying a pxe c "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -2890,6 +2914,7 @@ exports[`Pxe Customization Template Form Component should render copying a pxe c componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -2913,6 +2938,13 @@ exports[`Pxe Customization Template Form Component should render copying a pxe c "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -5417,6 +5449,7 @@ exports[`Pxe Customization Template Form Component should render editing a pxe c componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -5439,6 +5472,13 @@ exports[`Pxe Customization Template Form Component should render editing a pxe c "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -5552,6 +5592,7 @@ exports[`Pxe Customization Template Form Component should render editing a pxe c componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -5575,6 +5616,13 @@ exports[`Pxe Customization Template Form Component should render editing a pxe c "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } diff --git a/app/javascript/spec/pxe-image-type-form/__snapshots__/pxe-image-type-form.spec.js.snap b/app/javascript/spec/pxe-image-type-form/__snapshots__/pxe-image-type-form.spec.js.snap index 5c1407c21e5..f9e5de70c48 100644 --- a/app/javascript/spec/pxe-image-type-form/__snapshots__/pxe-image-type-form.spec.js.snap +++ b/app/javascript/spec/pxe-image-type-form/__snapshots__/pxe-image-type-form.spec.js.snap @@ -84,6 +84,7 @@ exports[`Pxe Image Type Form Component should render adding a new pxe image type componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -106,6 +107,13 @@ exports[`Pxe Image Type Form Component should render adding a new pxe image type "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -171,6 +179,7 @@ exports[`Pxe Image Type Form Component should render adding a new pxe image type componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -194,6 +203,13 @@ exports[`Pxe Image Type Form Component should render adding a new pxe image type "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -1582,6 +1598,7 @@ exports[`Pxe Image Type Form Component should render editing a pxe image type 1` componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -1604,6 +1621,13 @@ exports[`Pxe Image Type Form Component should render editing a pxe image type 1` "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -1675,6 +1699,7 @@ exports[`Pxe Image Type Form Component should render editing a pxe image type 1` componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -1698,6 +1723,13 @@ exports[`Pxe Image Type Form Component should render editing a pxe image type 1` "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } diff --git a/app/javascript/spec/pxe-iso-datastore-form/__snapshots__/pxe-iso-datastore-form.spec.js.snap b/app/javascript/spec/pxe-iso-datastore-form/__snapshots__/pxe-iso-datastore-form.spec.js.snap index 671eec67db8..17a4fdde2c5 100644 --- a/app/javascript/spec/pxe-iso-datastore-form/__snapshots__/pxe-iso-datastore-form.spec.js.snap +++ b/app/javascript/spec/pxe-iso-datastore-form/__snapshots__/pxe-iso-datastore-form.spec.js.snap @@ -89,6 +89,7 @@ exports[`Pxe Iso Datastore Form Component should render adding a new iso datasto componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -111,6 +112,13 @@ exports[`Pxe Iso Datastore Form Component should render adding a new iso datasto "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -169,6 +177,7 @@ exports[`Pxe Iso Datastore Form Component should render adding a new iso datasto componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -192,6 +201,13 @@ exports[`Pxe Iso Datastore Form Component should render adding a new iso datasto "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } diff --git a/app/javascript/spec/pxe-iso-image-form/__snapshots__/pxe-iso-image-form.spec.js.snap b/app/javascript/spec/pxe-iso-image-form/__snapshots__/pxe-iso-image-form.spec.js.snap index 0242d88782a..75830116856 100644 --- a/app/javascript/spec/pxe-iso-image-form/__snapshots__/pxe-iso-image-form.spec.js.snap +++ b/app/javascript/spec/pxe-iso-image-form/__snapshots__/pxe-iso-image-form.spec.js.snap @@ -70,6 +70,7 @@ exports[`Pxe Edit Iso Image Form Component should render editing a iso image 1`] componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -92,6 +93,13 @@ exports[`Pxe Edit Iso Image Form Component should render editing a iso image 1`] "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -141,6 +149,7 @@ exports[`Pxe Edit Iso Image Form Component should render editing a iso image 1`] componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -164,6 +173,13 @@ exports[`Pxe Edit Iso Image Form Component should render editing a iso image 1`] "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } diff --git a/app/javascript/spec/rbac-role-form/__snapshots__/rbac-role-form.spec.js.snap b/app/javascript/spec/rbac-role-form/__snapshots__/rbac-role-form.spec.js.snap new file mode 100644 index 00000000000..09d3f951d1f --- /dev/null +++ b/app/javascript/spec/rbac-role-form/__snapshots__/rbac-role-form.spec.js.snap @@ -0,0 +1,301 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Rbac Role Form Component render add rbac role form 1`] = ` +
+
+ ", + "value": "-1", + }, + Object { + "label": "Only User Owned", + "value": "user", + }, + Object { + "label": "Only User Owned or Group Owned", + "value": "user_or_group", + }, + ], + }, + Object { + "className": "access-restriction-catalog", + "component": "select", + "id": "service_template_restriction", + "initialValue": "", + "label": "Access Restriction for Catalog Items", + "maxLength": 128, + "name": "service_template_restriction", + "options": Array [ + Object { + "label": "<#{_('None')}>", + "value": "-1", + }, + Object { + "label": "Only User Owned", + "value": "user", + }, + Object { + "label": "Only User Owned or Group Owned", + "value": "user_or_group", + }, + ], + }, + Object { + "checked": Array [], + "className": "checkbox-tree", + "component": "checkbox-tree", + "id": "tree_dropdown", + "label": "Product Features (Editing)", + "name": "tree_dropdown", + "nodes": Array [], + }, + ], + } + } + validate={[Function]} + /> +
+
+`; + +exports[`Rbac Role Form Component render copy rbac role form 1`] = ` +
+
+ ", + "value": "-1", + }, + Object { + "label": "Only User Owned", + "value": "user", + }, + Object { + "label": "Only User Owned or Group Owned", + "value": "user_or_group", + }, + ], + }, + Object { + "className": "access-restriction-catalog", + "component": "select", + "id": "service_template_restriction", + "initialValue": "", + "label": "Access Restriction for Catalog Items", + "maxLength": 128, + "name": "service_template_restriction", + "options": Array [ + Object { + "label": "<#{_('None')}>", + "value": "-1", + }, + Object { + "label": "Only User Owned", + "value": "user", + }, + Object { + "label": "Only User Owned or Group Owned", + "value": "user_or_group", + }, + ], + }, + Object { + "checked": Array [], + "className": "checkbox-tree", + "component": "checkbox-tree", + "id": "tree_dropdown", + "label": "Product Features (Editing)", + "name": "tree_dropdown", + "nodes": Array [], + }, + ], + } + } + validate={[Function]} + /> +
+
+`; + +exports[`Rbac Role Form Component render edit rbac role form 1`] = ` +
+
+ ", + "value": "-1", + }, + Object { + "label": "Only User Owned", + "value": "user", + }, + Object { + "label": "Only User Owned or Group Owned", + "value": "user_or_group", + }, + ], + }, + Object { + "className": "access-restriction-catalog", + "component": "select", + "id": "service_template_restriction", + "initialValue": "", + "label": "Access Restriction for Catalog Items", + "maxLength": 128, + "name": "service_template_restriction", + "options": Array [ + Object { + "label": "<#{_('None')}>", + "value": "-1", + }, + Object { + "label": "Only User Owned", + "value": "user", + }, + Object { + "label": "Only User Owned or Group Owned", + "value": "user_or_group", + }, + ], + }, + Object { + "checked": Array [], + "className": "checkbox-tree", + "component": "checkbox-tree", + "id": "tree_dropdown", + "label": "Product Features (Editing)", + "name": "tree_dropdown", + "nodes": Array [], + }, + ], + } + } + validate={[Function]} + /> +
+
+`; diff --git a/app/javascript/spec/rbac-role-form/rbac-role-form.spec.js b/app/javascript/spec/rbac-role-form/rbac-role-form.spec.js new file mode 100644 index 00000000000..aee47d2ac09 --- /dev/null +++ b/app/javascript/spec/rbac-role-form/rbac-role-form.spec.js @@ -0,0 +1,99 @@ +import React from 'react'; +import { shallow } from 'enzyme'; +import fetchMock from 'fetch-mock'; +import toJson from 'enzyme-to-json'; +import RbacRoleForm from '../../components/rbac-role-form'; + +describe('Rbac Role Form Component', () => { + const rbacRoleMockData = [ + { + href: `/ops/rbac_role_add/90/`, + id: '90', + name: 'test', + vm_restriction: 'user_or_group', + service_template_restriction: 'user_or_group', + featureswithId: ['109__add_global_filter#1433'], + }, + ]; + + const RbacRoleEditData = { + id: '90', + name: 'test', + vm_restriction: 'user', + service_template_restriction: 'user', + featureswithId: ['109__add_global_filter#1433'], + }; + + const RbacRoleCopyData = { + id: '90', + name: 'copy of test', + vm_restriction: 'user', + service_template_restriction: 'user', + featureswithId: ['109__add_global_filter#1433'], + }; + + const selectOptions = [ + [ + '-1', "<#{_('None')}>", + ], + [ + 'user', 'Only User Owned', + ], + [ + 'user_or_group', 'Only User Owned or Group Owned', + ], + ]; + + afterEach(() => { + fetchMock.reset(); + fetchMock.restore(); + }); + + it('render add rbac role form', async() => { + const wrapper = shallow(); + + fetchMock.get(`/ops/rbac_role_add/`, rbacRoleMockData); + + await new Promise((resolve) => { + setImmediate(() => { + wrapper.update(); + expect(toJson(wrapper)).toMatchSnapshot(); + resolve(); + }); + }); + }); + + it('render edit rbac role form', async() => { + const wrapper = shallow(); + + fetchMock.get(`/ops/rbac_role_edit_get/${RbacRoleEditData.id}`, RbacRoleEditData); + await new Promise((resolve) => { + setImmediate(() => { + wrapper.update(); + expect(toJson(wrapper)).toMatchSnapshot(); + resolve(); + }); + }); + }); + + it('render copy rbac role form', async() => { + const wrapper = shallow(); + fetchMock.get(`/ops/rbac_role_copy/`, RbacRoleCopyData); + + await new Promise((resolve) => { + setImmediate(() => { + wrapper.update(); + expect(toJson(wrapper)).toMatchSnapshot(); + resolve(); + }); + }); + }); +}); \ No newline at end of file diff --git a/app/javascript/spec/reconfigure-vm-form/__snapshots__/reconfigure-vm-form.spec.js.snap b/app/javascript/spec/reconfigure-vm-form/__snapshots__/reconfigure-vm-form.spec.js.snap index 4481ced8832..3658c50878f 100644 --- a/app/javascript/spec/reconfigure-vm-form/__snapshots__/reconfigure-vm-form.spec.js.snap +++ b/app/javascript/spec/reconfigure-vm-form/__snapshots__/reconfigure-vm-form.spec.js.snap @@ -92,6 +92,7 @@ exports[`Reconfigure VM form component should render form with only fields it ha componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -115,6 +116,13 @@ exports[`Reconfigure VM form component should render form with only fields it ha "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -398,6 +406,7 @@ exports[`Reconfigure VM form component should render form with only fields it ha componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -421,6 +430,13 @@ exports[`Reconfigure VM form component should render form with only fields it ha "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -709,6 +725,7 @@ exports[`Reconfigure VM form component should render form with only fields it ha componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -733,6 +750,13 @@ exports[`Reconfigure VM form component should render form with only fields it ha "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -4576,6 +4600,7 @@ exports[`Reconfigure VM form component should render reconfigure form and click componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -4599,6 +4624,13 @@ exports[`Reconfigure VM form component should render reconfigure form and click "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -4986,6 +5018,7 @@ exports[`Reconfigure VM form component should render reconfigure form and click componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -5009,6 +5042,13 @@ exports[`Reconfigure VM form component should render reconfigure form and click "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -5401,6 +5441,7 @@ exports[`Reconfigure VM form component should render reconfigure form and click componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -5425,6 +5466,13 @@ exports[`Reconfigure VM form component should render reconfigure form and click "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -15922,6 +15970,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show c componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -15945,6 +15994,13 @@ exports[`Reconfigure VM form component should render reconfigure form and show c "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -16034,6 +16090,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show c componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -16057,6 +16114,13 @@ exports[`Reconfigure VM form component should render reconfigure form and show c "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -16151,6 +16215,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show c componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -16175,6 +16240,13 @@ exports[`Reconfigure VM form component should render reconfigure form and show c "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -17391,6 +17463,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show d componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -17414,6 +17487,13 @@ exports[`Reconfigure VM form component should render reconfigure form and show d "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -17608,6 +17688,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show d componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -17631,6 +17712,13 @@ exports[`Reconfigure VM form component should render reconfigure form and show d "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -17830,6 +17918,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show d componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -17854,6 +17943,13 @@ exports[`Reconfigure VM form component should render reconfigure form and show d "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -21186,6 +21282,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show d componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -21209,6 +21306,13 @@ exports[`Reconfigure VM form component should render reconfigure form and show d "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -21403,6 +21507,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show d componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -21426,6 +21531,13 @@ exports[`Reconfigure VM form component should render reconfigure form and show d "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -21625,6 +21737,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show d componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -21649,6 +21762,13 @@ exports[`Reconfigure VM form component should render reconfigure form and show d "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -24960,6 +25080,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show h componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -24983,6 +25104,13 @@ exports[`Reconfigure VM form component should render reconfigure form and show h "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -25183,6 +25311,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show h componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -25206,6 +25335,13 @@ exports[`Reconfigure VM form component should render reconfigure form and show h "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -25411,6 +25547,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show h componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -25435,6 +25572,13 @@ exports[`Reconfigure VM form component should render reconfigure form and show h "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -30011,6 +30155,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show n componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -30034,6 +30179,13 @@ exports[`Reconfigure VM form component should render reconfigure form and show n "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -30153,6 +30305,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show n componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -30176,6 +30329,13 @@ exports[`Reconfigure VM form component should render reconfigure form and show n "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -30300,6 +30460,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show n componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -30324,6 +30485,13 @@ exports[`Reconfigure VM form component should render reconfigure form and show n "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -32114,6 +32282,7 @@ exports[`Reconfigure VM form component should render reconfigure form with datat componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -32137,6 +32306,13 @@ exports[`Reconfigure VM form component should render reconfigure form with datat "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -32525,6 +32701,7 @@ exports[`Reconfigure VM form component should render reconfigure form with datat componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -32548,6 +32725,13 @@ exports[`Reconfigure VM form component should render reconfigure form with datat "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -32941,6 +33125,7 @@ exports[`Reconfigure VM form component should render reconfigure form with datat componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -32965,6 +33150,13 @@ exports[`Reconfigure VM form component should render reconfigure form with datat "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -43635,6 +43827,7 @@ exports[`Reconfigure VM form component should render reconfigure form without da componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -43658,6 +43851,13 @@ exports[`Reconfigure VM form component should render reconfigure form without da "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -43858,6 +44058,7 @@ exports[`Reconfigure VM form component should render reconfigure form without da componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -43881,6 +44082,13 @@ exports[`Reconfigure VM form component should render reconfigure form without da "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -44086,6 +44294,7 @@ exports[`Reconfigure VM form component should render reconfigure form without da componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -44110,6 +44319,13 @@ exports[`Reconfigure VM form component should render reconfigure form without da "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -48686,6 +48902,7 @@ exports[`Reconfigure VM form component should render reconfigure sub form and cl componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -48709,6 +48926,13 @@ exports[`Reconfigure VM form component should render reconfigure sub form and cl "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -49095,6 +49319,7 @@ exports[`Reconfigure VM form component should render reconfigure sub form and cl componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -49118,6 +49343,13 @@ exports[`Reconfigure VM form component should render reconfigure sub form and cl "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -49509,6 +49741,7 @@ exports[`Reconfigure VM form component should render reconfigure sub form and cl componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -49533,6 +49766,13 @@ exports[`Reconfigure VM form component should render reconfigure sub form and cl "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } diff --git a/app/javascript/spec/schedule-form/__snapshots__/schedule-form.spec.js.snap b/app/javascript/spec/schedule-form/__snapshots__/schedule-form.spec.js.snap index 5f66a742d81..ee36696500e 100644 --- a/app/javascript/spec/schedule-form/__snapshots__/schedule-form.spec.js.snap +++ b/app/javascript/spec/schedule-form/__snapshots__/schedule-form.spec.js.snap @@ -721,6 +721,7 @@ exports[`Schedule form component should render edit form when filter_type is not componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -743,6 +744,13 @@ exports[`Schedule form component should render edit form when filter_type is not "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -1361,6 +1369,7 @@ exports[`Schedule form component should render edit form when filter_type is not componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -1384,6 +1393,13 @@ exports[`Schedule form component should render edit form when filter_type is not "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -15534,6 +15550,7 @@ exports[`Schedule form component should render edit form when filter_type is nul componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -15556,6 +15573,13 @@ exports[`Schedule form component should render edit form when filter_type is nul "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -16316,6 +16340,7 @@ exports[`Schedule form component should render edit form when filter_type is nul componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -16339,6 +16364,13 @@ exports[`Schedule form component should render edit form when filter_type is nul "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -33722,6 +33754,7 @@ exports[`Schedule form component should render schedule add form 1`] = ` componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -33744,6 +33777,13 @@ exports[`Schedule form component should render schedule add form 1`] = ` "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -34285,6 +34325,7 @@ exports[`Schedule form component should render schedule add form 1`] = ` componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -34308,6 +34349,13 @@ exports[`Schedule form component should render schedule add form 1`] = ` "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } diff --git a/app/javascript/spec/service-request-default-form/__snapshots__/service-request-default-form.spec.js.snap b/app/javascript/spec/service-request-default-form/__snapshots__/service-request-default-form.spec.js.snap index 118f031591c..f8fff0b9248 100644 --- a/app/javascript/spec/service-request-default-form/__snapshots__/service-request-default-form.spec.js.snap +++ b/app/javascript/spec/service-request-default-form/__snapshots__/service-request-default-form.spec.js.snap @@ -320,6 +320,7 @@ exports[`Show Service Request Page should render 1`] = ` componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -342,6 +343,13 @@ exports[`Show Service Request Page should render 1`] = ` "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -521,6 +529,7 @@ exports[`Show Service Request Page should render 1`] = ` componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -544,6 +553,13 @@ exports[`Show Service Request Page should render 1`] = ` "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } diff --git a/app/javascript/spec/settings-category-form/__snapshots__/settings-category-form.spec.js.snap b/app/javascript/spec/settings-category-form/__snapshots__/settings-category-form.spec.js.snap index bc4902129a9..387adf04831 100644 --- a/app/javascript/spec/settings-category-form/__snapshots__/settings-category-form.spec.js.snap +++ b/app/javascript/spec/settings-category-form/__snapshots__/settings-category-form.spec.js.snap @@ -131,6 +131,7 @@ exports[`SettingsCategoryForm Component should render a new SettingsCategoryForm componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -153,6 +154,13 @@ exports[`SettingsCategoryForm Component should render a new SettingsCategoryForm "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -263,6 +271,7 @@ exports[`SettingsCategoryForm Component should render a new SettingsCategoryForm componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -286,6 +295,13 @@ exports[`SettingsCategoryForm Component should render a new SettingsCategoryForm "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } diff --git a/app/javascript/spec/settings-time-profile-form/__snapshots__/settings-time-profile-form.spec.js.snap b/app/javascript/spec/settings-time-profile-form/__snapshots__/settings-time-profile-form.spec.js.snap index c232ad39783..f59e78b7887 100644 --- a/app/javascript/spec/settings-time-profile-form/__snapshots__/settings-time-profile-form.spec.js.snap +++ b/app/javascript/spec/settings-time-profile-form/__snapshots__/settings-time-profile-form.spec.js.snap @@ -491,6 +491,7 @@ exports[`VM common form component should render adding form variant add new time componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -513,6 +514,13 @@ exports[`VM common form component should render adding form variant add new time "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -989,6 +997,7 @@ exports[`VM common form component should render adding form variant add new time componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -1012,6 +1021,13 @@ exports[`VM common form component should render adding form variant add new time "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } diff --git a/app/javascript/spec/vm-floating-ips-form/__snapshots__/vm-floating-ips-form.spec.js.snap b/app/javascript/spec/vm-floating-ips-form/__snapshots__/vm-floating-ips-form.spec.js.snap index 9123718af98..bbd57cb3852 100644 --- a/app/javascript/spec/vm-floating-ips-form/__snapshots__/vm-floating-ips-form.spec.js.snap +++ b/app/javascript/spec/vm-floating-ips-form/__snapshots__/vm-floating-ips-form.spec.js.snap @@ -53,6 +53,7 @@ exports[`Associate / Disassociate form component should render associate form va componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -75,6 +76,13 @@ exports[`Associate / Disassociate form component should render associate form va "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -116,6 +124,7 @@ exports[`Associate / Disassociate form component should render associate form va componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -139,6 +148,13 @@ exports[`Associate / Disassociate form component should render associate form va "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -1079,6 +1095,7 @@ exports[`Associate / Disassociate form component should render disassociate form componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -1101,6 +1118,13 @@ exports[`Associate / Disassociate form component should render disassociate form "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -1142,6 +1166,7 @@ exports[`Associate / Disassociate form component should render disassociate form componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -1165,6 +1190,13 @@ exports[`Associate / Disassociate form component should render disassociate form "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -2132,6 +2164,7 @@ exports[`Associate / Disassociate form component should submit Associate API cal componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -2154,6 +2187,13 @@ exports[`Associate / Disassociate form component should submit Associate API cal "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -2195,6 +2235,7 @@ exports[`Associate / Disassociate form component should submit Associate API cal componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -2218,6 +2259,13 @@ exports[`Associate / Disassociate form component should submit Associate API cal "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -3038,6 +3086,7 @@ exports[`Associate / Disassociate form component should submit Disassociate API componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -3060,6 +3109,13 @@ exports[`Associate / Disassociate form component should submit Disassociate API "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -3101,6 +3157,7 @@ exports[`Associate / Disassociate form component should submit Disassociate API componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -3124,6 +3181,13 @@ exports[`Associate / Disassociate form component should submit Disassociate API "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } diff --git a/app/javascript/spec/vm-resize-form/__snapshots__/vm-resize-form.spec.js.snap b/app/javascript/spec/vm-resize-form/__snapshots__/vm-resize-form.spec.js.snap index a339a5241fd..287dd2a36bf 100644 --- a/app/javascript/spec/vm-resize-form/__snapshots__/vm-resize-form.spec.js.snap +++ b/app/javascript/spec/vm-resize-form/__snapshots__/vm-resize-form.spec.js.snap @@ -63,6 +63,7 @@ exports[`vm resize form component should render a resize form 1`] = ` componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -85,6 +86,13 @@ exports[`vm resize form component should render a resize form 1`] = ` "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -127,6 +135,7 @@ exports[`vm resize form component should render a resize form 1`] = ` componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -150,6 +159,13 @@ exports[`vm resize form component should render a resize form 1`] = ` "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } diff --git a/app/javascript/spec/workflow-credential-mapping-form/__snapshots__/workflow-credential-mapping-form.spec.js.snap b/app/javascript/spec/workflow-credential-mapping-form/__snapshots__/workflow-credential-mapping-form.spec.js.snap index b42ce7709a4..c7b8186b326 100644 --- a/app/javascript/spec/workflow-credential-mapping-form/__snapshots__/workflow-credential-mapping-form.spec.js.snap +++ b/app/javascript/spec/workflow-credential-mapping-form/__snapshots__/workflow-credential-mapping-form.spec.js.snap @@ -55,6 +55,7 @@ exports[`Workflow Credential Form Component should render mapping credentials to componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "credential-mapper": [Function], "date-picker": [Function], @@ -78,6 +79,13 @@ exports[`Workflow Credential Form Component should render mapping credentials to "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -241,6 +249,7 @@ exports[`Workflow Credential Form Component should render mapping credentials to componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "credential-mapper": [Function], "date-picker": [Function], @@ -264,6 +273,13 @@ exports[`Workflow Credential Form Component should render mapping credentials to "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -430,6 +446,7 @@ exports[`Workflow Credential Form Component should render mapping credentials to componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "credential-mapper": [Function], "date-picker": [Function], @@ -454,6 +471,13 @@ exports[`Workflow Credential Form Component should render mapping credentials to "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } diff --git a/app/javascript/spec/workflow-credentials-form/__snapshots__/workflow-credentials-form.spec.js.snap b/app/javascript/spec/workflow-credentials-form/__snapshots__/workflow-credentials-form.spec.js.snap index 3df6e3fe898..7e610fbe6c8 100644 --- a/app/javascript/spec/workflow-credentials-form/__snapshots__/workflow-credentials-form.spec.js.snap +++ b/app/javascript/spec/workflow-credentials-form/__snapshots__/workflow-credentials-form.spec.js.snap @@ -91,6 +91,7 @@ exports[`Workflow Credential Form Component should render adding a new credentia componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -113,6 +114,13 @@ exports[`Workflow Credential Form Component should render adding a new credentia "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -185,6 +193,7 @@ exports[`Workflow Credential Form Component should render adding a new credentia componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -208,6 +217,13 @@ exports[`Workflow Credential Form Component should render adding a new credentia "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -1596,6 +1612,7 @@ exports[`Workflow Credential Form Component should render editing a credential 1 componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -1618,6 +1635,13 @@ exports[`Workflow Credential Form Component should render editing a credential 1 "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -1697,6 +1721,7 @@ exports[`Workflow Credential Form Component should render editing a credential 1 componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -1720,6 +1745,13 @@ exports[`Workflow Credential Form Component should render editing a credential 1 "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } diff --git a/app/javascript/spec/zone-form/__snapshots__/zone-form.spec.js.snap b/app/javascript/spec/zone-form/__snapshots__/zone-form.spec.js.snap index 84df0d15886..73eef168d42 100644 --- a/app/javascript/spec/zone-form/__snapshots__/zone-form.spec.js.snap +++ b/app/javascript/spec/zone-form/__snapshots__/zone-form.spec.js.snap @@ -305,6 +305,7 @@ exports[`zone Form Component should render editing a zone form 1`] = ` componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -327,6 +328,13 @@ exports[`zone Form Component should render editing a zone form 1`] = ` "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } @@ -475,6 +483,7 @@ exports[`zone Form Component should render editing a zone form 1`] = ` componentMapper={ Object { "checkbox": [Function], + "checkbox-tree": [Function], "code-editor": [Function], "date-picker": [Function], "dual-list-select": [Function], @@ -498,6 +507,13 @@ exports[`zone Form Component should render editing a zone form 1`] = ` "time-picker": [Function], "tree-selector": [Function], "tree-view": [Function], + "tree-view-redux": Object { + "$$typeof": Symbol(react.memo), + "WrappedComponent": [Function], + "compare": null, + "displayName": "Connect(TreeView)", + "type": [Function], + }, "validate-credentials": [Function], "wizard": [Function], } diff --git a/app/stylesheet/application-webpack.scss b/app/stylesheet/application-webpack.scss index aa61b6787dc..2b591136861 100644 --- a/app/stylesheet/application-webpack.scss +++ b/app/stylesheet/application-webpack.scss @@ -22,6 +22,7 @@ @import './no-records-found.scss'; @import './notifications.scss'; @import './quadicon.scss'; +@import './rbac-role-form.scss'; @import './search-bar.scss'; @import './settings.scss'; @import './responsive_layout.scss'; diff --git a/app/stylesheet/rbac-role-form.scss b/app/stylesheet/rbac-role-form.scss new file mode 100644 index 00000000000..d4aec231c01 --- /dev/null +++ b/app/stylesheet/rbac-role-form.scss @@ -0,0 +1,26 @@ +.access-restriction-orchestration, .access-restriction-catalog, .checkbox-tree { + margin-top: 3%; +} + +.access-restriction-catalog, .checkbox-tree { + margin-bottom: 3%; +} + +.role-information { + font-size: x-large; + font-weight: lighter; + margin-top: 2%; + margin-bottom: 2%; +} + +.custom-button-wrapper { + margin-top: 2%; + padding-bottom: 5%; + + .bx--btn--primary, .bx--btn--secondary { + margin-right: 3%; + width: 20%; + } +} + + diff --git a/app/views/ops/_rbac_role_details.html.haml b/app/views/ops/_rbac_role_details.html.haml index af83411543d..5cbeff3e429 100644 --- a/app/views/ops/_rbac_role_details.html.haml +++ b/app/views/ops/_rbac_role_details.html.haml @@ -1,50 +1,18 @@ = render :partial => "layouts/flash_msg" +- role_restrictions = MiqUserRole::RESTRICTIONS.map do |label, model| + - [_(label), model] +- role_restrictions = role_restrictions.sort +- select_options = [["-1", "<#{_('None')}>"]] + role_restrictions - if @edit - - url = url_for_only_path(:action => 'rbac_role_field_changed', :id => (@edit[:role_id] || "new")) - #role_info - .row - .col-md-12.col-lg-6 - %h3 - = _("Role Information") - .form-horizontal - .form-group - %label.col-md-4.control-label - = _("Name") - .col-md-8 - = text_field_tag("name", - @edit[:new][:name], - :maxlength => 50, - :class => "form-control", - "data-miq_observe" => {:interval => '.5', :url => url}.to_json) - = javascript_tag(javascript_focus('name')) - .form-group - %label.col-md-4.control-label - = _('Access Restriction for Orchestration Stacks, Key Pairs, Services, VMs, and Templates') - .col-md-8 - - restrictions = MiqUserRole::RESTRICTIONS.map { |k, v| [_(v), k] }.sort_by { |name, _value| name.downcase } - = select_tag('vm_restriction', - options_for_select([[_("None"), "none"]] + restrictions, - @edit[:new][:vm_restriction].to_sym), - :class => "selectpicker") - :javascript - miqInitSelectPicker(); - miqSelectPickerEvent('vm_restriction', "#{url}") - .form-group - %label.col-md-4.control-label - = _('Access Restriction for Catalog Items') - .col-md-8 - - restrictions = MiqUserRole::RESTRICTIONS.map { |k, v| [_(v), k] }.sort_by { |name, _value| name.downcase } - = select_tag('service_template_restriction', - options_for_select([[_("None"), "none"]] + restrictions, - @edit[:new][:service_template_restriction].to_sym), - :class => "selectpicker") - :javascript - miqInitSelectPicker(); - miqSelectPickerEvent('service_template_restriction', "#{url}") - .col-md-12.col-lg-6 - %hr - = _("Product Features (Editing)") - %h3 - = render(:partial => "shared/tree", :locals => {:tree => @rbac_menu_tree, :name => @rbac_menu_tree.name}) + - get_url = url_for_only_path(:action => 'rbac_role_edit_get') + - url = url_for_only_path(:action => 'rbac_role_add_react', :id => (@edit[:role_id] || "new")) + - custom_props = rbac_role_product_features(@role, @rbac_menu_tree) + = react('RbacRoleForm', + :selectOptions => select_options, + :url => url, + :getURL => get_url, + :customProps => custom_props, + :role => @role, + :existingProductFeatures => @role.miq_product_features) - else = role_rbac_details(@role, @rbac_menu_tree) diff --git a/config/routes.rb b/config/routes.rb index 2056e137c7d..2308a409759 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -2411,6 +2411,7 @@ fetch_production_log log_collection_form_fields pglogical_subscriptions_form_fields + rbac_role_edit_get schedule_form_fields ], :post => %w[ @@ -2461,6 +2462,7 @@ rbac_group_seq_edit rbac_group_user_lookup rbac_groups_list + rbac_role_add_react rbac_role_edit rbac_role_field_changed rbac_roles_list diff --git a/cypress/e2e/ui/Settings/Application-Settings/access-control.cy.js b/cypress/e2e/ui/Settings/Application-Settings/access-control.cy.js new file mode 100644 index 00000000000..f1fa4ec2620 --- /dev/null +++ b/cypress/e2e/ui/Settings/Application-Settings/access-control.cy.js @@ -0,0 +1,175 @@ +/* eslint-disable no-undef */ + +describe('Settings > Application Settings > Access Control > Roles', () => { + beforeEach(() => { + cy.login(); + cy.intercept('POST', '/ops/accordion_select?id=rbac_accord').as('accordion'); + cy.menu('Settings', 'Application Settings'); + cy.contains('Access Control').click(); + }); + + describe('Rbac Role Form', () => { + beforeEach(() => { + cy.get('[title="Roles"]').click(); + }); + + it('Clicks the cancel button', () => { + cy.get('[title="Configuration"]').click({force: true}); + cy.get('[title="Add a new Role"]').click({force: true}); + cy.get('[class="bx--btn bx--btn--secondary"]').contains('Cancel').click({force: true}); + cy.get('[id="explorer_title_text"]').contains('Access Control Roles'); + }); + + it('Clicks on a sample role', () => { + cy.get('[title="EvmRole-administrator"]').click({force: true}); + cy.get('.miq_summary').contains('EvmRole-administrator'); + cy.get('.miq_summary').contains('2'); + cy.get('.miq_summary').contains('None'); + }); + + it('Resets a role being edited', () => { + // creates a dialog + cy.get('[title="Configuration"]').click({force: true}); + cy.get('[title="Add a new Role"]').click({force: true}); + cy.get('[name="name"]').type('Test Role', { force: true }); + cy.get('[name="vm_restriction"]').select('Only User Owned', { force: true }); + cy.get('[name="service_template_restriction"]').select('Only User Owned', { force: true }); + cy.get('span.rct-title').contains('Common Features in UI').parents('span.rct-text') + .find('input[type="checkbox"]') + .check({force: true}); + cy.get('[class="btnRight bx--btn bx--btn--primary"]').click({force: true}); + cy.get('[id="explorer_title_text"]').contains('Access Control Roles'); + + // check correct data is displaying + cy.contains('Test Role').click({force: true}); + cy.get('.miq_summary').contains('Test Role'); + cy.get('.miq_summary').contains('Only User Owned'); + cy.get('li[data-id="0.12"]') + .find('i.checkbox-button') + .should('have.class', 'fa-check-square-o'); + + // edits a dialog + cy.get('[title="Configuration"]').click({ force: true }); + cy.get('[title="Edit this Role"]').click({ force: true }); + cy.get('[name="name"]').clear({force: true}); + cy.get('[name="name"]').clear({force: true}); // need to clear twice + cy.get('[name="name"]').type('Edited Test Role', { force: true}); + cy.get('[name="vm_restriction"]').select('Only User or Group Owned', { force: true }); + cy.get('[name="service_template_restriction"]').select('Only User or Group Owned', { force: true }); + cy.get('[class="btnRight bx--btn bx--btn--secondary"]').contains('Reset').click({ force: true }); + + // check it was reset + cy.get('[name="name"]').should('have.value', 'Test Role'); + cy.get('[name="vm_restriction"]').contains('Only User Owned'); + cy.get('[name="service_template_restriction"]').contains('Only User Owned'); + cy.get('[class="bx--btn bx--btn--secondary"]').contains('Cancel').click({force: true}); + + // clean up + cy.get('[title="Configuration"]').click({force: true}); + cy.get('[title="Delete this Role"]').click({force: true}); + + cy.get('[class="list-group"]').should('not.contain', 'Test Role'); + }); + + it('Creates, edits, deletes a role', () => { + // creates a dialog + cy.get('[title="Configuration"]').click({force: true}); + cy.get('[title="Add a new Role"]').click({force: true}); + cy.get('[name="name"]').type('Test Role', { force: true }); + cy.get('[name="vm_restriction"]').select('Only User Owned', { force: true }); + cy.get('[name="service_template_restriction"]').select('Only User Owned', { force: true }); + cy.get('span.rct-title').contains('Common Features in UI').parents('span.rct-text') + .find('input[type="checkbox"]') + .check({force: true}); + cy.get('[class="btnRight bx--btn bx--btn--primary"]').click({force: true}); + cy.get('[id="explorer_title_text"]').contains('Access Control Roles'); + + // check correct data is displaying + cy.contains('Test Role').click({force: true}); + cy.get('.miq_summary').contains('Test Role'); + cy.get('.miq_summary').contains('Only User Owned'); + cy.get('li[data-id="0.12"]') + .find('i.checkbox-button') + .should('have.class', 'fa-check-square-o'); + + // edits a dialog + cy.get('[title="Configuration"]').click({ force: true }); + cy.get('[title="Edit this Role"]').click({ force: true }); + cy.get('[name="name"]').clear({force: true}); + cy.get('[name="name"]').clear({force: true}); // need to clear twice + cy.get('[name="name"]').type('Edited Test Role', { force: true}); + cy.get('[name="vm_restriction"]').select('Only User or Group Owned', { force: true }); + cy.get('[name="service_template_restriction"]').select('Only User or Group Owned', { force: true }); + cy.get('span.rct-title').contains('Main Configuration').parents('span.rct-text') + .find('input[type="checkbox"]') + .check({force: true}); + cy.get('[class="btnRight bx--btn bx--btn--primary"]').click({force: true}); + + // check edited info + cy.contains('Edited Test Role').click({force: true}); + cy.get('.miq_summary').contains('Edited Test Role'); + cy.get('.miq_summary').contains('Only User or Group Owned'); + cy.get('li[data-id="0.12"]') + .find('i.checkbox-button') + .should('have.class', 'fa-check-square-o'); + + cy.get('li[data-id="0.11"]') + .find('i.checkbox-button') + .should('have.class', 'fa-check-square-o'); + + // clean up + cy.get('[title="Configuration"]').click({force: true}); + cy.get('[title="Delete this Role"]').click({force: true}); + + cy.get('[class="list-group"]').should('not.contain', 'Test Role'); + }); + + it('Creates, copies, and deletes a role', () => { + // creates a dialog + cy.get('[title="Configuration"]').click({force: true}); + cy.get('[title="Add a new Role"]').click({force: true}); + cy.get('[name="name"]').type('Test Role', { force: true }); + cy.get('[name="vm_restriction"]').select('Only User Owned', { force: true }); + cy.get('[name="service_template_restriction"]').select('Only User Owned', { force: true }); + cy.get('span.rct-title').contains('Common Features in UI').parents('span.rct-text') + .find('input[type="checkbox"]') + .check({force: true}); + cy.get('[class="btnRight bx--btn bx--btn--primary"]').click({force: true}); + cy.get('[id="explorer_title_text"]').contains('Access Control Roles'); + + // check correct data is displaying + cy.contains('Test Role').click({force: true}); + cy.get('.miq_summary').contains('Test Role'); + cy.get('.miq_summary').contains('Only User Owned'); + cy.get('li[data-id="0.12"]') + .find('i.checkbox-button') + .should('have.class', 'fa-check-square-o'); + + // edits a dialog + cy.get('[title="Configuration"]').click({ force: true }); + cy.get('[title="Copy this Role to a new Role"]').click({ force: true }); + cy.get('[class="btnRight bx--btn bx--btn--primary"]').click({force: true}); + + cy.contains('Copy of Test Role').click({force: true}); + cy.get('.miq_summary').contains('Copy of Test Role'); + cy.get('.miq_summary').contains('Only User Owned'); + + cy.get('li[data-id="0.12"]') + .find('i.checkbox-button') + .should('have.class', 'fa-check-square-o'); + + // clean up + cy.get('[title="Configuration"]').click({force: true}); + cy.get('[title="Delete this Role"]').click({force: true}); + + cy.get('[class="list-group"]').should('not.contain', 'Copy of Test Role'); + + cy.get('[id="explorer_title_text"]').contains('Access Control Roles'); + cy.get('[class="list-group"]').contains('Test Role').click({force: true}); + cy.get('[title="Configuration"]').click({force: true}); + cy.get('[title="Delete this Role"]').click({force: true}); + + cy.get('[class="list-group"]').should('not.contain', 'Test Role'); + }); + }); +}); diff --git a/package.json b/package.json index 35fff5037b3..0a1f870a79a 100644 --- a/package.json +++ b/package.json @@ -87,6 +87,7 @@ "proxy-polyfill": "^0.1.7", "react": "~16.13.1", "react-bootstrap": "~0.33.0", + "react-checkbox-tree": "^1.8.0", "react-codemirror2": "^6.0.0", "react-dom": "~16.13.1", "react-markdown": "6.0.0", diff --git a/yarn.lock b/yarn.lock index 992f13dc148..c849505d1ea 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11569,7 +11569,7 @@ __metadata: languageName: node linkType: hard -"lodash@npm:>=3.5 <5, lodash@npm:^4.17.13, lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.19, lodash@npm:^4.17.21, lodash@npm:^4.17.4, lodash@npm:~4.17.12": +"lodash@npm:>=3.5 <5, lodash@npm:^4.17.10, lodash@npm:^4.17.13, lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.19, lodash@npm:^4.17.21, lodash@npm:^4.17.4, lodash@npm:~4.17.12": version: 4.17.21 resolution: "lodash@npm:4.17.21" checksum: 10/c08619c038846ea6ac754abd6dd29d2568aa705feb69339e836dfa8d8b09abbb2f859371e86863eda41848221f9af43714491467b5b0299122431e202bb0c532 @@ -11789,6 +11789,7 @@ __metadata: proxy-polyfill: "npm:^0.1.7" react: "npm:~16.13.1" react-bootstrap: "npm:~0.33.0" + react-checkbox-tree: "npm:^1.8.0" react-codemirror2: "npm:^6.0.0" react-dom: "npm:~16.13.1" react-markdown: "npm:6.0.0" @@ -12426,7 +12427,7 @@ __metadata: languageName: node linkType: hard -"nanoid@npm:^3.3.7": +"nanoid@npm:^3.0.0, nanoid@npm:^3.3.7": version: 3.3.7 resolution: "nanoid@npm:3.3.7" bin: @@ -14641,6 +14642,20 @@ __metadata: languageName: node linkType: hard +"react-checkbox-tree@npm:^1.8.0": + version: 1.8.0 + resolution: "react-checkbox-tree@npm:1.8.0" + dependencies: + classnames: "npm:^2.2.5" + lodash: "npm:^4.17.10" + nanoid: "npm:^3.0.0" + prop-types: "npm:^15.5.8" + peerDependencies: + react: ^15.3.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 + checksum: 10/700e87c0d6b1c7a15e104d0ef01ac1c15b8eb74905cd2a3b1e087a1c6fa596e4a58894ef553d5f8651782d7012c07eab87f9646f44def3569163a89c1cbb0f71 + languageName: node + linkType: hard + "react-codemirror2@npm:^6.0.0": version: 6.0.1 resolution: "react-codemirror2@npm:6.0.1"