( view: View, type: string, sourceRoot = "", )
| 2284 | } |
| 2285 | |
| 2286 | function nativeScriptInfo( |
| 2287 | view: View, |
| 2288 | type: string, |
| 2289 | sourceRoot = "", |
| 2290 | ): JSONObject { |
| 2291 | const anyView = view as any; |
| 2292 | const sourceLocation = sourceLocationForView(view, sourceRoot); |
| 2293 | return { |
| 2294 | id: stringValue(anyView.id), |
| 2295 | className: stringValue(anyView.className), |
| 2296 | type, |
| 2297 | sourceLocation, |
| 2298 | sourceFile: sourceString(sourceLocation, "file"), |
| 2299 | sourceLine: sourceNumber(sourceLocation, "line"), |
| 2300 | sourceColumn: sourceNumber(sourceLocation, "column"), |
| 2301 | text: cleanGeneratedNativeScriptText(stringValue(anyView.text), type), |
| 2302 | title: cleanGeneratedNativeScriptText(stringValue(anyView.title), type), |
| 2303 | src: nativeScriptImageSource(view, type), |
| 2304 | testID: |
| 2305 | stringValue(read(view, "testID")) || |
| 2306 | stringValue(read(view, "testId")) || |
| 2307 | stringValue(read(view, "automationText")), |
| 2308 | accessibilityLabel: stringValue(read(view, "accessibilityLabel")), |
| 2309 | accessibilityHint: stringValue(read(view, "accessibilityHint")), |
| 2310 | accessibilityValue: stringValue(read(view, "accessibilityValue")), |
| 2311 | }; |
| 2312 | } |
| 2313 | |
| 2314 | function nativeScriptTitle(view: View, type: string): string { |
| 2315 | const anyView = view as any; |
no test coverage detected