Skip to content

Commit

Permalink
correct misspelling of fulfill
Browse files Browse the repository at this point in the history
  • Loading branch information
ndushay committed May 3, 2019
1 parent 97e5932 commit 8d039d5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions __tests__/components/editor/PropertyTemplateOutline.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ describe('<PropertyTemplateOutline /> with propertyTemplate Refs', () => {
// FIXME: I believe for this to work, mockHandleCollapsed has to mock the implementation ...
// which leads me to believe that this should be an integration test
// FIXME: the approach below is a failed attempted to 'inject' info to an inner method
// await wrapper.instance().fullfillRTPromises(promises).then(() => wrapper.update()).then(() => {
// await wrapper.instance().fulfillRTPromises(promises).then(() => wrapper.update()).then(() => {
// const childOutlineHeader = wrapper.find(OutlineHeader)
// childOutlineHeader.find('a').simulate('click')
// expect(wrapper.state().collapsed).toBeFalsy() // correct
Expand All @@ -316,7 +316,7 @@ describe('<PropertyTemplateOutline /> with propertyTemplate Refs', () => {
// FIXME: wrapper has OutlineHeader but no PropertyActionButtons, no PropertyTypeRow
// - it needs to be expanded first? implying an integration test
// FIXME: the approach below is a failed attempted to 'inject' info to an inner method
// await wrapper.instance().fullfillRTPromises(promises).then(() => wrapper.update()).then(() => {
// await wrapper.instance().fulfillRTPromises(promises).then(() => wrapper.update()).then(() => {
// const addButton = wrapper.find('div > section > PropertyActionButtons > div > AddButton')
// addButton.handleClick = mockHandleAddClick
// addButton.simulate('click')
Expand All @@ -335,7 +335,7 @@ describe('<PropertyTemplateOutline /> with propertyTemplate Refs', () => {
// FIXME: wrapper has OutlineHeader but no PropertyActionButtons, no PropertyTypeRow
// - it needs to be expanded first? implying an integration test
// FIXME: the approach below is a failed attempted to 'inject' info to an inner method
// await wrapper.instance().fullfillRTPromises(promises).then(() => wrapper.update()).then(() => {
// await wrapper.instance().fulfillRTPromises(promises).then(() => wrapper.update()).then(() => {
// const mintButton = wrapper.find('div > section > PropertyActionButtons > div > MintButton')
// mintButton.handleClick = mockHandleAddClick
// mintButton.simulate('click')
Expand Down
8 changes: 4 additions & 4 deletions __tests__/components/editor/ResourceTemplateForm.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ describe('<ResourceTemplateForm /> after fetching data from sinopia server', ()
// }
// }
// const instance = wrapper.instance()
// await instance.fullfillRTPromises(promises).then(() => wrapper.update()).then(() => {
// await instance.fulfillRTPromises(promises).then(() => wrapper.update()).then(() => {
// instance.configuredComponent(lookup, 1)
// expect(wrapper
// .find('div.ResourceTemplateForm Connect(InputLookupQA)').length)
Expand All @@ -204,7 +204,7 @@ describe('<ResourceTemplateForm /> after fetching data from sinopia server', ()
// }
// }
// const instance = wrapper.instance()
// await instance.fullfillRTPromises(promises).then(() => wrapper.update()).then(() => {
// await instance.fulfillRTPromises(promises).then(() => wrapper.update()).then(() => {
// instance.configuredComponent(list, 1)
// expect(wrapper
// .find('div.ResourceTemplateForm Connect(InputListLOC)').length)
Expand All @@ -215,7 +215,7 @@ describe('<ResourceTemplateForm /> after fetching data from sinopia server', ()

it.skip('renders InputLiteral nested component (b/c we have a property of type "literal")', async () => {
// FIXME: this test gives false positive - see github issue #496 - perhaps we need an integration test
// await wrapper.instance().fullfillRTPromises(promises).then(() => wrapper.update()).then(() => {
// await wrapper.instance().fulfillRTPromises(promises).then(() => wrapper.update()).then(() => {
// expect(wrapper
// .find('div.ResourceTemplateForm Connect(InputLiteral)').length)
// .toEqual(1)
Expand Down Expand Up @@ -271,7 +271,7 @@ describe('when there are no findable nested resource templates', () => {

it.skip('renders error alert box', async () => {
// FIXME: this test gives false positive - see github issue #496 - perhaps we need an integration test
// await wrapper.instance().fullfillRTPromises(promises).then(() => wrapper.update()).then(() => {
// await wrapper.instance().fulfillRTPromises(promises).then(() => wrapper.update()).then(() => {
// expect(wrapper.state.errot).toBeTruthy()
// const errorEl = wrapper.find('div.alert')
// expect(errorEl).toHaveLength(1)
Expand Down
4 changes: 2 additions & 2 deletions src/components/editor/PropertyTemplateOutline.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class PropertyTemplateOutline extends Component {
}
}

fullfillRTPromises = async (promiseAll) => {
fulfillRTPromises = async (promiseAll) => {
await promiseAll.then(rts => {
rts.map(rt => {
this.setState({tempState: rt.response.body})
Expand Down Expand Up @@ -171,7 +171,7 @@ export class PropertyTemplateOutline extends Component {
event.preventDefault()
let newOutput = this.state.output

this.fullfillRTPromises(this.resourceTemplatePromises(property.valueConstraint.valueTemplateRefs)).then(() => {
this.fulfillRTPromises(this.resourceTemplatePromises(property.valueConstraint.valueTemplateRefs)).then(() => {

const input = this.handleComponentCase(property)

Expand Down
4 changes: 2 additions & 2 deletions src/components/editor/ResourceTemplateForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class ResourceTemplateForm extends Component {
}

componentDidMount() {
this.fullfillRTPromises(this.resourceTemplatePromises(this.joinedRTs())).then(() => {
this.fulfillRTPromises(this.resourceTemplatePromises(this.joinedRTs())).then(() => {
this.setState({
componentForm: (
this.renderComponentForm()
Expand All @@ -43,7 +43,7 @@ export class ResourceTemplateForm extends Component {
})
}

fullfillRTPromises = async (promiseAll) => {
fulfillRTPromises = async (promiseAll) => {
await promiseAll.then(async (rts) => {
rts.map(rt => {
this.setState({tempState: rt.response.body})
Expand Down

0 comments on commit 8d039d5

Please sign in to comment.