()
| 127 | declareFakeObjectWithUnsupportedCapability(); |
| 128 | |
| 129 | const declareFakeObjectWithAsyncAction = () => { |
| 130 | const extension = new gd.PlatformExtension(); |
| 131 | extension.setExtensionInformation( |
| 132 | 'FakeObjectWithAsyncAction', |
| 133 | 'Fake object with an async action', |
| 134 | 'Fake object with an async action', |
| 135 | '', |
| 136 | 'MIT' |
| 137 | ); |
| 138 | const fakeObject = new gd.ObjectJsImplementation(); |
| 139 | |
| 140 | fakeObject.updateProperty = function ( |
| 141 | propertyName, |
| 142 | newValue |
| 143 | ) { |
| 144 | return false; |
| 145 | }; |
| 146 | |
| 147 | fakeObject.getProperties = function () { |
| 148 | const objectProperties = new gd.MapStringPropertyDescriptor(); |
| 149 | return objectProperties; |
| 150 | }; |
| 151 | fakeObject.content = {}; |
| 152 | |
| 153 | fakeObject.updateInitialInstanceProperty = function ( |
| 154 | instance, |
| 155 | propertyName, |
| 156 | newValue |
| 157 | ) { |
| 158 | return false; |
| 159 | }; |
| 160 | |
| 161 | fakeObject.getInitialInstanceProperties = function ( |
| 162 | instance |
| 163 | ) { |
| 164 | var instanceProperties = new gd.MapStringPropertyDescriptor(); |
| 165 | return instanceProperties; |
| 166 | }; |
| 167 | |
| 168 | const object = extension.addObject( |
| 169 | 'FakeObjectWithAsyncAction', |
| 170 | 'FakeObjectWithAsyncAction', |
| 171 | 'This is FakeObjectWithAsyncAction', |
| 172 | '', |
| 173 | fakeObject |
| 174 | ); |
| 175 | |
| 176 | object |
| 177 | .addScopedAction( |
| 178 | 'DoAsyncAction', |
| 179 | 'Some async action', |
| 180 | 'Some async action.', |
| 181 | 'Do some async action with _PARAM0_', |
| 182 | '', |
| 183 | 'res/icon.png', |
| 184 | 'res/icon.png' |
| 185 | ) |
| 186 | .addParameter('object', 'Object', 'FakeObjectWithAsyncAction', false) |
no test coverage detected