diff --git a/app/javascript/spec/forms/provider-forms/__snapshots__/provider-forms.spec.js.snap b/app/javascript/spec/forms/provider-forms/__snapshots__/provider-forms.spec.js.snap new file mode 100644 index 000000000000..832a1e1b7a4c --- /dev/null +++ b/app/javascript/spec/forms/provider-forms/__snapshots__/provider-forms.spec.js.snap @@ -0,0 +1,7576 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Provider Forms should correctly render a new form 1`] = ` + + +
+ ", + }, + ], + } + } + > + ", + }, + ], + } + } + setPristine={[Function]} + > + ", + }, + ], + } + } + schemaType="default" + showFormControls={true} + submitLabel="Save" + uiSchema={Object {}} + > + + +
+ + + + + + + + + + + +
+ + + +
+ + +
+ +
+ +
+ +
+ Loading... +
+
+ +
+ +
+ +
+
+ +
+ +
+ + +
+ + + + + + +
+
+
+ +
+ + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + + + + +
+
+
+
+
+
+ +
+
+
+
+
+
+ + +`; + +exports[`Provider Forms should correctly render the edit form 1`] = ` + + +
+ + + + + +
+ + + + + + + + +
+ + + + + + + + + + + + +
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+`; + +exports[`Provider Forms should correctly select and render the second form 1`] = ` + + +
+ ", + }, + ], + } + } + > + ", + }, + ], + } + } + setPristine={[Function]} + > + ", + }, + ], + } + } + schemaType="default" + showFormControls={true} + submitLabel="Save" + uiSchema={Object {}} + > + + +
+ + + + + + + + + + + +
+ + + +
+ + +
+ +
+ +
+ +
+ Loading... +
+
+ +
+ +
+ +
+
+ +
+ +
+ + +
+ + + + + + +
+
+
+ +
+ + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + + + + +
+
+
+
+
+
+ +
+
+
+
+
+
+ + +`; + +exports[`Provider Forms should correctly select and render the second form 2`] = ` + + +
+ ", + }, + ], + } + } + > + ", + }, + ], + } + } + setPristine={[Function]} + > + ", + }, + ], + } + } + schemaType="default" + showFormControls={true} + submitLabel="Save" + uiSchema={Object {}} + > + + +
+ + + + + + + + + + + +
+ + + +
+ + ", + "screenReaderStatus": [Function], + "styles": Object { + "clearIndicator": [Function], + "container": [Function], + "control": [Function], + "dropdownIndicator": [Function], + "indicatorSeparator": [Function], + "indicatorsContainer": [Function], + "input": [Function], + "menu": [Function], + "multiValue": [Function], + "multiValueLabel": [Function], + "multiValueRemove": [Function], + "option": [Function], + "placeholder": [Function], + "singleValue": [Function], + "valueContainer": [Function], + }, + "tabIndex": "0", + "tabSelectsValue": true, + "type": undefined, + "value": Array [], + } + } + setValue={[Function]} + theme={ + Object { + "borderRadius": 4, + "colors": Object { + "danger": "#DE350B", + "dangerLight": "#FFBDAD", + "neutral0": "hsl(0, 0%, 100%)", + "neutral10": "hsl(0, 0%, 90%)", + "neutral20": "hsl(0, 0%, 80%)", + "neutral30": "hsl(0, 0%, 70%)", + "neutral40": "hsl(0, 0%, 60%)", + "neutral5": "hsl(0, 0%, 95%)", + "neutral50": "hsl(0, 0%, 50%)", + "neutral60": "hsl(0, 0%, 40%)", + "neutral70": "hsl(0, 0%, 30%)", + "neutral80": "hsl(0, 0%, 20%)", + "neutral90": "hsl(0, 0%, 10%)", + "primary": "#2684FF", + "primary25": "#DEEBFF", + "primary50": "#B2D4FF", + "primary75": "#4C9AFF", + }, + "spacing": Object { + "baseUnit": 4, + "controlHeight": 38, + "menuGutter": 8, + }, + } + } + > +
+ ", + "screenReaderStatus": [Function], + "styles": Object { + "clearIndicator": [Function], + "container": [Function], + "control": [Function], + "dropdownIndicator": [Function], + "indicatorSeparator": [Function], + "indicatorsContainer": [Function], + "input": [Function], + "menu": [Function], + "multiValue": [Function], + "multiValueLabel": [Function], + "multiValueRemove": [Function], + "option": [Function], + "placeholder": [Function], + "singleValue": [Function], + "valueContainer": [Function], + }, + "tabIndex": "0", + "tabSelectsValue": true, + "type": undefined, + "value": Array [], + } + } + setValue={[Function]} + theme={ + Object { + "borderRadius": 4, + "colors": Object { + "danger": "#DE350B", + "dangerLight": "#FFBDAD", + "neutral0": "hsl(0, 0%, 100%)", + "neutral10": "hsl(0, 0%, 90%)", + "neutral20": "hsl(0, 0%, 80%)", + "neutral30": "hsl(0, 0%, 70%)", + "neutral40": "hsl(0, 0%, 60%)", + "neutral5": "hsl(0, 0%, 95%)", + "neutral50": "hsl(0, 0%, 50%)", + "neutral60": "hsl(0, 0%, 40%)", + "neutral70": "hsl(0, 0%, 30%)", + "neutral80": "hsl(0, 0%, 20%)", + "neutral90": "hsl(0, 0%, 10%)", + "primary": "#2684FF", + "primary25": "#DEEBFF", + "primary50": "#B2D4FF", + "primary75": "#4C9AFF", + }, + "spacing": Object { + "baseUnit": 4, + "controlHeight": 38, + "menuGutter": 8, + }, + } + } + > +
+ ", + "screenReaderStatus": [Function], + "styles": Object { + "clearIndicator": [Function], + "container": [Function], + "control": [Function], + "dropdownIndicator": [Function], + "indicatorSeparator": [Function], + "indicatorsContainer": [Function], + "input": [Function], + "menu": [Function], + "multiValue": [Function], + "multiValueLabel": [Function], + "multiValueRemove": [Function], + "option": [Function], + "placeholder": [Function], + "singleValue": [Function], + "valueContainer": [Function], + }, + "tabIndex": "0", + "tabSelectsValue": true, + "type": undefined, + "value": Array [], + } + } + setValue={[Function]} + theme={ + Object { + "borderRadius": 4, + "colors": Object { + "danger": "#DE350B", + "dangerLight": "#FFBDAD", + "neutral0": "hsl(0, 0%, 100%)", + "neutral10": "hsl(0, 0%, 90%)", + "neutral20": "hsl(0, 0%, 80%)", + "neutral30": "hsl(0, 0%, 70%)", + "neutral40": "hsl(0, 0%, 60%)", + "neutral5": "hsl(0, 0%, 95%)", + "neutral50": "hsl(0, 0%, 50%)", + "neutral60": "hsl(0, 0%, 40%)", + "neutral70": "hsl(0, 0%, 30%)", + "neutral80": "hsl(0, 0%, 20%)", + "neutral90": "hsl(0, 0%, 10%)", + "primary": "#2684FF", + "primary25": "#DEEBFF", + "primary50": "#B2D4FF", + "primary75": "#4C9AFF", + }, + "spacing": Object { + "baseUnit": 4, + "controlHeight": 38, + "menuGutter": 8, + }, + } + } + > + ", + "screenReaderStatus": [Function], + "styles": Object { + "clearIndicator": [Function], + "container": [Function], + "control": [Function], + "dropdownIndicator": [Function], + "indicatorSeparator": [Function], + "indicatorsContainer": [Function], + "input": [Function], + "menu": [Function], + "multiValue": [Function], + "multiValueLabel": [Function], + "multiValueRemove": [Function], + "option": [Function], + "placeholder": [Function], + "singleValue": [Function], + "valueContainer": [Function], + }, + "tabIndex": "0", + "tabSelectsValue": true, + "type": undefined, + "value": Array [], + } + } + setValue={[Function]} + theme={ + Object { + "borderRadius": 4, + "colors": Object { + "danger": "#DE350B", + "dangerLight": "#FFBDAD", + "neutral0": "hsl(0, 0%, 100%)", + "neutral10": "hsl(0, 0%, 90%)", + "neutral20": "hsl(0, 0%, 80%)", + "neutral30": "hsl(0, 0%, 70%)", + "neutral40": "hsl(0, 0%, 60%)", + "neutral5": "hsl(0, 0%, 95%)", + "neutral50": "hsl(0, 0%, 50%)", + "neutral60": "hsl(0, 0%, 40%)", + "neutral70": "hsl(0, 0%, 30%)", + "neutral80": "hsl(0, 0%, 20%)", + "neutral90": "hsl(0, 0%, 10%)", + "primary": "#2684FF", + "primary25": "#DEEBFF", + "primary50": "#B2D4FF", + "primary75": "#4C9AFF", + }, + "spacing": Object { + "baseUnit": 4, + "controlHeight": 38, + "menuGutter": 8, + }, + } + } + > +
+ ", + "screenReaderStatus": [Function], + "styles": Object { + "clearIndicator": [Function], + "container": [Function], + "control": [Function], + "dropdownIndicator": [Function], + "indicatorSeparator": [Function], + "indicatorsContainer": [Function], + "input": [Function], + "menu": [Function], + "multiValue": [Function], + "multiValueLabel": [Function], + "multiValueRemove": [Function], + "option": [Function], + "placeholder": [Function], + "singleValue": [Function], + "valueContainer": [Function], + }, + "tabIndex": "0", + "tabSelectsValue": true, + "type": undefined, + "value": Array [], + } + } + setValue={[Function]} + theme={ + Object { + "borderRadius": 4, + "colors": Object { + "danger": "#DE350B", + "dangerLight": "#FFBDAD", + "neutral0": "hsl(0, 0%, 100%)", + "neutral10": "hsl(0, 0%, 90%)", + "neutral20": "hsl(0, 0%, 80%)", + "neutral30": "hsl(0, 0%, 70%)", + "neutral40": "hsl(0, 0%, 60%)", + "neutral5": "hsl(0, 0%, 95%)", + "neutral50": "hsl(0, 0%, 50%)", + "neutral60": "hsl(0, 0%, 40%)", + "neutral70": "hsl(0, 0%, 30%)", + "neutral80": "hsl(0, 0%, 20%)", + "neutral90": "hsl(0, 0%, 10%)", + "primary": "#2684FF", + "primary25": "#DEEBFF", + "primary50": "#B2D4FF", + "primary75": "#4C9AFF", + }, + "spacing": Object { + "baseUnit": 4, + "controlHeight": 38, + "menuGutter": 8, + }, + } + } + > +
+ <Choose> +
+
+ + + +
+
+
+ ", + "screenReaderStatus": [Function], + "styles": Object { + "clearIndicator": [Function], + "container": [Function], + "control": [Function], + "dropdownIndicator": [Function], + "indicatorSeparator": [Function], + "indicatorsContainer": [Function], + "input": [Function], + "menu": [Function], + "multiValue": [Function], + "multiValueLabel": [Function], + "multiValueRemove": [Function], + "option": [Function], + "placeholder": [Function], + "singleValue": [Function], + "valueContainer": [Function], + }, + "tabIndex": "0", + "tabSelectsValue": true, + "type": undefined, + "value": Array [], + } + } + setValue={[Function]} + theme={ + Object { + "borderRadius": 4, + "colors": Object { + "danger": "#DE350B", + "dangerLight": "#FFBDAD", + "neutral0": "hsl(0, 0%, 100%)", + "neutral10": "hsl(0, 0%, 90%)", + "neutral20": "hsl(0, 0%, 80%)", + "neutral30": "hsl(0, 0%, 70%)", + "neutral40": "hsl(0, 0%, 60%)", + "neutral5": "hsl(0, 0%, 95%)", + "neutral50": "hsl(0, 0%, 50%)", + "neutral60": "hsl(0, 0%, 40%)", + "neutral70": "hsl(0, 0%, 30%)", + "neutral80": "hsl(0, 0%, 20%)", + "neutral90": "hsl(0, 0%, 10%)", + "primary": "#2684FF", + "primary25": "#DEEBFF", + "primary50": "#B2D4FF", + "primary75": "#4C9AFF", + }, + "spacing": Object { + "baseUnit": 4, + "controlHeight": 38, + "menuGutter": 8, + }, + } + } + > +
+ ", + "screenReaderStatus": [Function], + "styles": Object { + "clearIndicator": [Function], + "container": [Function], + "control": [Function], + "dropdownIndicator": [Function], + "indicatorSeparator": [Function], + "indicatorsContainer": [Function], + "input": [Function], + "menu": [Function], + "multiValue": [Function], + "multiValueLabel": [Function], + "multiValueRemove": [Function], + "option": [Function], + "placeholder": [Function], + "singleValue": [Function], + "valueContainer": [Function], + }, + "tabIndex": "0", + "tabSelectsValue": true, + "type": undefined, + "value": Array [], + } + } + setValue={[Function]} + theme={ + Object { + "borderRadius": 4, + "colors": Object { + "danger": "#DE350B", + "dangerLight": "#FFBDAD", + "neutral0": "hsl(0, 0%, 100%)", + "neutral10": "hsl(0, 0%, 90%)", + "neutral20": "hsl(0, 0%, 80%)", + "neutral30": "hsl(0, 0%, 70%)", + "neutral40": "hsl(0, 0%, 60%)", + "neutral5": "hsl(0, 0%, 95%)", + "neutral50": "hsl(0, 0%, 50%)", + "neutral60": "hsl(0, 0%, 40%)", + "neutral70": "hsl(0, 0%, 30%)", + "neutral80": "hsl(0, 0%, 20%)", + "neutral90": "hsl(0, 0%, 10%)", + "primary": "#2684FF", + "primary25": "#DEEBFF", + "primary50": "#B2D4FF", + "primary75": "#4C9AFF", + }, + "spacing": Object { + "baseUnit": 4, + "controlHeight": 38, + "menuGutter": 8, + }, + } + } + > + + + ", + "screenReaderStatus": [Function], + "styles": Object { + "clearIndicator": [Function], + "container": [Function], + "control": [Function], + "dropdownIndicator": [Function], + "indicatorSeparator": [Function], + "indicatorsContainer": [Function], + "input": [Function], + "menu": [Function], + "multiValue": [Function], + "multiValueLabel": [Function], + "multiValueRemove": [Function], + "option": [Function], + "placeholder": [Function], + "singleValue": [Function], + "valueContainer": [Function], + }, + "tabIndex": "0", + "tabSelectsValue": true, + "type": undefined, + "value": Array [], + } + } + setValue={[Function]} + theme={ + Object { + "borderRadius": 4, + "colors": Object { + "danger": "#DE350B", + "dangerLight": "#FFBDAD", + "neutral0": "hsl(0, 0%, 100%)", + "neutral10": "hsl(0, 0%, 90%)", + "neutral20": "hsl(0, 0%, 80%)", + "neutral30": "hsl(0, 0%, 70%)", + "neutral40": "hsl(0, 0%, 60%)", + "neutral5": "hsl(0, 0%, 95%)", + "neutral50": "hsl(0, 0%, 50%)", + "neutral60": "hsl(0, 0%, 40%)", + "neutral70": "hsl(0, 0%, 30%)", + "neutral80": "hsl(0, 0%, 20%)", + "neutral90": "hsl(0, 0%, 10%)", + "primary": "#2684FF", + "primary25": "#DEEBFF", + "primary50": "#B2D4FF", + "primary75": "#4C9AFF", + }, + "spacing": Object { + "baseUnit": 4, + "controlHeight": 38, + "menuGutter": 8, + }, + } + } + > + + +
+
+
+
+ +
+
+ + + +
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + +
+ +
+
+
+
+
+ + + + + +
+ + + + + + + + +
+ + + + + + + + + + + + +
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+`; diff --git a/app/javascript/spec/forms/provider-forms/provider-forms.spec.js b/app/javascript/spec/forms/provider-forms/provider-forms.spec.js new file mode 100644 index 000000000000..bf143a07e67a --- /dev/null +++ b/app/javascript/spec/forms/provider-forms/provider-forms.spec.js @@ -0,0 +1,129 @@ +import React from 'react'; +import { act } from 'react-dom/test-utils'; +import fetchMock from 'fetch-mock'; +import FormRenderer from '@data-driven-forms/react-form-renderer'; +import toJson from 'enzyme-to-json'; +import CloudProviderForm from '../../../forms/provider-forms/cloud-provider-form'; +import { mount } from '../../helpers/mountForm'; +import { + providerOptions, + provider111Data, + providerTypeData, + zoneData, +} from './providerData'; +import '../../helpers/miqSparkle'; +import '../../helpers/sprintf'; +import '../../helpers/miq_formatters_helper'; +import miqRedirectBack from '../../../helpers/miq-redirect-back'; + +describe('Provider Forms', () => { + let initialProps; + + beforeEach(() => { + initialProps = { + providerId: undefined, + type: 'cloud', + return: 'returnurl', + }; + }); + + afterEach(() => { + fetchMock.restore(); + }); + + it('should correctly render a new form', async(done) => { + fetchMock.once('/api/providers', providerOptions); + + let wrapper; + await act(async() => { + wrapper = mount(); + }); + + expect(toJson(wrapper)).toMatchSnapshot(); + done(); + }); + + it('should correctly select and render the second form', async(done) => { + fetchMock + .getOnce('/api/providers/111?attributes=endpoints,authentications,zone_name', provider111Data) + .once('/api/providers', providerOptions) + .once('/api/providers?type=ManageIQ::Providers::Amazon::CloudManager', providerTypeData) + .getOnce('/api/zones?expand=resources&attributes=id,name,visible&filter[]=visible!=false&sort_by=name', zoneData); + + let wrapper; + await act(async() => { + wrapper = mount(); + }); + + expect(toJson(wrapper)).toMatchSnapshot(); + + await act(async() => { + const Form = wrapper.find(FormRenderer).first().childAt(0); + Form.instance().form.change('type', 'ManageIQ::Providers::Amazon::CloudManager'); + wrapper.update(); + }); + + expect(toJson(wrapper)).toMatchSnapshot(); + done(); + }); + + it('should correctly render the edit form', async(done) => { + fetchMock + .getOnce('/api/providers/111?attributes=endpoints,authentications,zone_name', provider111Data) + .once('/api/providers', providerOptions) + .once('/api/providers?type=ManageIQ::Providers::Amazon::CloudManager', providerTypeData) + .getOnce('/api/zones?expand=resources&attributes=id,name,visible&filter[]=visible!=false&sort_by=name', zoneData); + + let wrapper; + await act(async() => { + wrapper = mount(); + }); + + expect(toJson(wrapper)).toMatchSnapshot(); + done(); + }); + + it('should correctly redirect on cancel', async(done) => { + fetchMock + .getOnce('/api/providers/111?attributes=endpoints,authentications,zone_name', provider111Data) + .once('/api/providers', providerOptions) + .once('/api/providers?type=ManageIQ::Providers::Amazon::CloudManager', providerTypeData) + .getOnce('/api/zones?expand=resources&attributes=id,name,visible&filter[]=visible!=false&sort_by=name', zoneData); + + let wrapper; + await act(async() => { + wrapper = mount(); + }); + + wrapper.find('button').last().simulate('click'); + expect(miqRedirectBack).toHaveBeenCalledWith('Edit of cloud was cancelled by the user', 'success', 'returnurl'); + done(); + }); + + it('should submit correctly the form and redirect back', async(done) => { + fetchMock + .getOnce('/api/providers/111?attributes=endpoints,authentications,zone_name', provider111Data) + .once('/api/providers', providerOptions) + .once('/api/providers?type=ManageIQ::Providers::Amazon::CloudManager', providerTypeData) + .getOnce('/api/zones?expand=resources&attributes=id,name,visible&filter[]=visible!=false&sort_by=name', zoneData) + .patch('api/providers/111', {}, 200); + + let wrapper; + await act(async() => { + wrapper = mount(); + }); + + const Form = wrapper.find(FormRenderer).last().childAt(0); + await act(async() => { + Form.instance().form.change('name', 'New Name'); + wrapper.update(); + }); + + Form.instance().form.submit(); + expect(fetchMock.lastCall()[0]).toBe('/api/providers/111'); + expect(fetchMock.lastCall()[1]).toEqual({ + backendName: 'API', body: '{"name":"New Name","zone_name":"Amazon Zone","ddf":true}', credentials: 'include', headers: {}, method: 'PATCH', + }); + done(); + }); +}); diff --git a/app/javascript/spec/forms/provider-forms/providerData.js b/app/javascript/spec/forms/provider-forms/providerData.js new file mode 100644 index 000000000000..0cc557989be5 --- /dev/null +++ b/app/javascript/spec/forms/provider-forms/providerData.js @@ -0,0 +1,141 @@ +export const providerOptions = { + data: { + supported_providers: [ + { + title: 'Google Compute Engine', + type: 'ManageIQ::Providers::Google::CloudManager', + kind: 'cloud', + }, + ], + }, +}; + +export const provider111Data = { + href: 'http://localhost:3000/api/providers/111', + id: '111', + name: 'Amazon', + created_on: '2017-11-20T19:29:31Z', + updated_on: '2019-04-06T23:58:45Z', + guid: '1732b30c-d9ae-4e9a-b855-30fba78120f1', + zone_id: '3', + type: 'ManageIQ::Providers::Amazon::CloudManager', + api_version: null, + uid_ems: null, + host_default_vnc_port_start: null, + host_default_vnc_port_end: null, + provider_region: 'us-east-1', + last_refresh_error: null, + last_refresh_date: '2019-04-06T23:58:45Z', + provider_id: null, + realm: null, + tenant_id: '1', + project: null, + parent_ems_id: null, + subscription: null, + last_metrics_error: null, + last_metrics_update_date: null, + last_metrics_success_date: null, + tenant_mapping_enabled: null, + enabled: true, + options: {}, + zone_before_pause_id: null, + last_inventory_date: null, + endpoints: [{ + id: '35', + role: 'default', + ipaddress: null, + hostname: null, + port: null, + resource_type: 'ExtManagementSystem', + resource_id: '38', + created_at: '2017-11-20T19:29:31Z', + updated_at: '2017-11-20T19:29:31Z', + verify_ssl: 1, + url: null, + security_protocol: null, + api_version: null, + path: null, + certificate_authority: null, + }], + authentications: [{ + href: 'http://localhost:3000/api/auth_key_pairs/158', + id: '158', + name: 'smartstate-2713bf1d-0a64-486f-85b9-7d1cc4187c5f', + authtype: null, + userid: null, + resource_id: '38', + resource_type: 'ExtManagementSystem', + created_on: '2018-03-09T21:12:48Z', + updated_on: '2018-03-09T21:12:48Z', + last_valid_on: null, + last_invalid_on: null, + credentials_changed_on: null, + status: null, + status_details: null, + type: 'ManageIQ::Providers::Amazon::CloudManager::AuthKeyPair', + fingerprint: '84:a7:3e:6e:cc:92:ff:e9:c8:35:9f:64:69:9d:a8:f7:b6:29:47:b6', + challenge: null, + login: null, + public_key: null, + htpassd_users: [], + ldap_id: [], + ldap_email: [], + ldap_name: [], + ldap_preferred_user_name: [], + ldap_bind_dn: null, + ldap_insecure: null, + ldap_url: null, + request_header_challenge_url: null, + request_header_login_url: null, + request_header_headers: [], + request_header_preferred_username_headers: [], + request_header_name_headers: [], + request_header_email_headers: [], + open_id_sub_claim: null, + open_id_user_info: null, + open_id_authorization_endpoint: null, + open_id_token_endpoint: null, + open_id_extra_scopes: [], + open_id_extra_authorize_parameters: null, + certificate_authority: null, + google_hosted_domain: null, + github_organizations: [], + rhsm_sku: null, + rhsm_pool_id: null, + rhsm_server: null, + manager_ref: null, + options: null, + evm_owner_id: null, + miq_group_id: null, + tenant_id: null, + become_username: null, + }], + zone_name: 'Amazon Zone', + actions: [ + { name: 'change_password', method: 'post', href: 'http://localhost:3000/api/providers/38' }, + { name: 'edit', method: 'post', href: 'http://localhost:3000/api/providers/38' }, + { name: 'edit', method: 'patch', href: 'http://localhost:3000/api/providers/38' }, + { name: 'edit', method: 'put', href: 'http://localhost:3000/api/providers/38' }, + { name: 'refresh', method: 'post', href: 'http://localhost:3000/api/providers/38' }, + { name: 'delete', method: 'post', href: 'http://localhost:3000/api/providers/38' }, + { name: 'delete', method: 'delete', href: 'http://localhost:3000/api/providers/38' }, + ], +}; + +export const providerTypeData = { + data: { + provider_form_schema: { + fields: [ + { component: 'text-field', name: 'name', label: 'Endpoint URL' }, + ], + }, + }, +}; + +export const zoneData = { + resources: [ + { + href: 'http://localhost:3000/api/zones/3', id: '3', name: 'Amazon Zone', visible: true, + }, + ], +};