@testing-library/react-native 12.1.3 → 12.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.DS_Store +0 -0
- package/.eslintcache +1 -1
- package/build/fireEvent.js +3 -6
- package/build/fireEvent.js.map +1 -1
- package/build/helpers/deprecation.js +1 -1
- package/build/helpers/deprecation.js.map +1 -1
- package/build/helpers/host-component-names.d.ts +3 -0
- package/build/helpers/host-component-names.js +8 -0
- package/build/helpers/host-component-names.js.map +1 -1
- package/build/pure.d.ts +2 -0
- package/build/pure.js +7 -0
- package/build/pure.js.map +1 -1
- package/build/user-event/event-builder/common.d.ts +48 -6
- package/build/user-event/event-builder/common.js +37 -20
- package/build/user-event/event-builder/common.js.map +1 -1
- package/build/user-event/event-builder/index.d.ts +94 -0
- package/build/user-event/event-builder/index.js +3 -1
- package/build/user-event/event-builder/index.js.map +1 -1
- package/build/user-event/event-builder/text-input.d.ts +91 -0
- package/build/user-event/event-builder/text-input.js +117 -0
- package/build/user-event/event-builder/text-input.js.map +1 -0
- package/build/user-event/index.d.ts +4 -2
- package/build/user-event/index.js +7 -1
- package/build/user-event/index.js.map +1 -1
- package/build/user-event/press/index.d.ts +1 -1
- package/build/user-event/press/index.js +6 -0
- package/build/user-event/press/index.js.map +1 -1
- package/build/user-event/press/press.d.ts +3 -3
- package/build/user-event/press/press.js +55 -62
- package/build/user-event/press/press.js.map +1 -1
- package/build/user-event/setup/setup.d.ts +33 -3
- package/build/user-event/setup/setup.js +14 -1
- package/build/user-event/setup/setup.js.map +1 -1
- package/build/user-event/type/index.d.ts +1 -1
- package/build/user-event/type/index.js +6 -0
- package/build/user-event/type/index.js.map +1 -1
- package/build/user-event/type/parseKeys.d.ts +1 -0
- package/build/user-event/type/parseKeys.js +40 -0
- package/build/user-event/type/parseKeys.js.map +1 -0
- package/build/user-event/type/type.d.ts +5 -1
- package/build/user-event/type/type.js +66 -8
- package/build/user-event/type/type.js.map +1 -1
- package/build/user-event/utils/content-size.d.ts +15 -0
- package/build/user-event/utils/content-size.js +26 -0
- package/build/user-event/utils/content-size.js.map +1 -0
- package/build/user-event/utils/{events.d.ts → dispatch-event.d.ts} +2 -2
- package/build/user-event/utils/dispatch-event.js +36 -0
- package/build/user-event/utils/dispatch-event.js.map +1 -0
- package/build/user-event/utils/index.d.ts +4 -1
- package/build/user-event/utils/index.js +37 -4
- package/build/user-event/utils/index.js.map +1 -1
- package/build/user-event/utils/text-range.d.ts +5 -0
- package/build/user-event/utils/text-range.js +13 -0
- package/build/user-event/utils/text-range.js.map +1 -0
- package/build/user-event/utils/warn-about-real-timers.d.ts +1 -0
- package/build/user-event/utils/warn-about-real-timers.js +20 -0
- package/build/user-event/utils/warn-about-real-timers.js.map +1 -0
- package/coverage/clover.xml +1176 -0
- package/coverage/coverage-final.json +70 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +266 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +196 -0
- package/coverage/lcov-report/src/act.ts.html +343 -0
- package/coverage/lcov-report/src/cleanup.ts.html +130 -0
- package/coverage/lcov-report/src/config.ts.html +301 -0
- package/coverage/lcov-report/src/fireEvent.ts.html +559 -0
- package/coverage/lcov-report/src/flushMicroTasks.ts.html +124 -0
- package/coverage/lcov-report/src/helpers/accessiblity.ts.html +412 -0
- package/coverage/lcov-report/src/helpers/component-tree.ts.html +352 -0
- package/coverage/lcov-report/src/helpers/debugDeep.ts.html +166 -0
- package/coverage/lcov-report/src/helpers/debugShallow.ts.html +151 -0
- package/coverage/lcov-report/src/helpers/deprecation.ts.html +244 -0
- package/coverage/lcov-report/src/helpers/errors.ts.html +283 -0
- package/coverage/lcov-report/src/helpers/filterNodeByType.ts.html +106 -0
- package/coverage/lcov-report/src/helpers/findAll.ts.html +289 -0
- package/coverage/lcov-report/src/helpers/format-default.ts.html +301 -0
- package/coverage/lcov-report/src/helpers/format.ts.html +226 -0
- package/coverage/lcov-report/src/helpers/getTextContent.ts.html +145 -0
- package/coverage/lcov-report/src/helpers/host-component-names.tsx.html +286 -0
- package/coverage/lcov-report/src/helpers/index.html +326 -0
- package/coverage/lcov-report/src/helpers/matchers/accessibilityState.ts.html +229 -0
- package/coverage/lcov-report/src/helpers/matchers/accessibilityValue.ts.html +157 -0
- package/coverage/lcov-report/src/helpers/matchers/index.html +206 -0
- package/coverage/lcov-report/src/helpers/matchers/matchArrayProp.ts.html +148 -0
- package/coverage/lcov-report/src/helpers/matchers/matchLabelText.ts.html +238 -0
- package/coverage/lcov-report/src/helpers/matchers/matchObjectProp.ts.html +160 -0
- package/coverage/lcov-report/src/helpers/matchers/matchStringProp.ts.html +154 -0
- package/coverage/lcov-report/src/helpers/matchers/matchTextContent.ts.html +145 -0
- package/coverage/lcov-report/src/helpers/query-name.ts.html +97 -0
- package/coverage/lcov-report/src/helpers/stringValidation.ts.html +193 -0
- package/coverage/lcov-report/src/helpers/timers.ts.html +382 -0
- package/coverage/lcov-report/src/index.html +356 -0
- package/coverage/lcov-report/src/index.ts.html +184 -0
- package/coverage/lcov-report/src/matches.ts.html +232 -0
- package/coverage/lcov-report/src/pure.ts.html +157 -0
- package/coverage/lcov-report/src/queries/a11yState.ts.html +478 -0
- package/coverage/lcov-report/src/queries/a11yValue.ts.html +478 -0
- package/coverage/lcov-report/src/queries/displayValue.ts.html +319 -0
- package/coverage/lcov-report/src/queries/hintText.ts.html +421 -0
- package/coverage/lcov-report/src/queries/index.html +281 -0
- package/coverage/lcov-report/src/queries/labelText.ts.html +262 -0
- package/coverage/lcov-report/src/queries/makeQueries.ts.html +850 -0
- package/coverage/lcov-report/src/queries/placeholderText.ts.html +322 -0
- package/coverage/lcov-report/src/queries/role.ts.html +481 -0
- package/coverage/lcov-report/src/queries/testId.ts.html +298 -0
- package/coverage/lcov-report/src/queries/text.ts.html +283 -0
- package/coverage/lcov-report/src/queries/unsafeProps.ts.html +313 -0
- package/coverage/lcov-report/src/queries/unsafeType.ts.html +304 -0
- package/coverage/lcov-report/src/react-versions.ts.html +118 -0
- package/coverage/lcov-report/src/render-act.ts.html +142 -0
- package/coverage/lcov-report/src/render.tsx.html +592 -0
- package/coverage/lcov-report/src/renderHook.tsx.html +262 -0
- package/coverage/lcov-report/src/screen.ts.html +454 -0
- package/coverage/lcov-report/src/shallow.ts.html +139 -0
- package/coverage/lcov-report/src/test-utils/events.ts.html +145 -0
- package/coverage/lcov-report/src/test-utils/index.html +131 -0
- package/coverage/lcov-report/src/test-utils/index.ts.html +88 -0
- package/coverage/lcov-report/src/user-event/event-builder/common.ts.html +229 -0
- package/coverage/lcov-report/src/user-event/event-builder/index.html +146 -0
- package/coverage/lcov-report/src/user-event/event-builder/index.ts.html +106 -0
- package/coverage/lcov-report/src/user-event/event-builder/test-input.ts.html +343 -0
- package/coverage/lcov-report/src/user-event/event-builder/text-input.ts.html +343 -0
- package/coverage/lcov-report/src/user-event/index.html +116 -0
- package/coverage/lcov-report/src/user-event/index.ts.html +121 -0
- package/coverage/lcov-report/src/user-event/press/index.html +131 -0
- package/coverage/lcov-report/src/user-event/press/index.ts.html +88 -0
- package/coverage/lcov-report/src/user-event/press/press.ts.html +133 -0
- package/coverage/lcov-report/src/user-event/setup/index.html +131 -0
- package/coverage/lcov-report/src/user-event/setup/index.ts.html +91 -0
- package/coverage/lcov-report/src/user-event/setup/setup.ts.html +358 -0
- package/coverage/lcov-report/src/user-event/type/index.html +146 -0
- package/coverage/lcov-report/src/user-event/type/index.ts.html +88 -0
- package/coverage/lcov-report/src/user-event/type/parseKeys.ts.html +208 -0
- package/coverage/lcov-report/src/user-event/type/type.ts.html +484 -0
- package/coverage/lcov-report/src/user-event/utils/content-size.ts.html +160 -0
- package/coverage/lcov-report/src/user-event/utils/dispatch-event.ts.html +367 -0
- package/coverage/lcov-report/src/user-event/utils/events.ts.html +247 -0
- package/coverage/lcov-report/src/user-event/utils/index.html +176 -0
- package/coverage/lcov-report/src/user-event/utils/index.ts.html +97 -0
- package/coverage/lcov-report/src/user-event/utils/text-range.ts.html +118 -0
- package/coverage/lcov-report/src/user-event/utils/wait.ts.html +130 -0
- package/coverage/lcov-report/src/waitFor.ts.html +772 -0
- package/coverage/lcov-report/src/waitForElementToBeRemoved.ts.html +211 -0
- package/coverage/lcov-report/src/within.ts.html +175 -0
- package/coverage/lcov.info +2614 -0
- package/examples/.DS_Store +0 -0
- package/examples/basic/.expo/README.md +17 -0
- package/examples/basic/.expo/devices.json +3 -0
- package/examples/basic/.expo/packager-info.json +4 -0
- package/examples/basic/.expo/settings.json +8 -0
- package/examples/basic/package.json +7 -7
- package/examples/basic/yarn-error.log +8083 -0
- package/examples/basic/yarn.lock +8878 -0
- package/examples/react-navigation/README.md +2 -0
- package/examples/react-navigation/package.json +5 -5
- package/examples/react-navigation/yarn.lock +5610 -0
- package/examples/redux/README.md +5 -0
- package/examples/redux/package.json +7 -7
- package/examples/redux/yarn-error.log +8083 -0
- package/examples/redux/yarn.lock +8423 -0
- package/experiments-app/.expo/settings.json +2 -1
- package/experiments-app/src/screens/TextInputEvents.tsx +10 -0
- package/package.json +1 -1
- package/src/.DS_Store +0 -0
- package/src/__tests__/.DS_Store +0 -0
- package/src/__tests__/act.test.tsx +4 -0
- package/src/fireEvent.ts +2 -6
- package/src/helpers/deprecation.ts +1 -1
- package/src/helpers/host-component-names.tsx +8 -0
- package/src/pure.ts +2 -0
- package/src/user-event/event-builder/common.ts +35 -19
- package/src/user-event/event-builder/index.ts +2 -0
- package/src/user-event/event-builder/text-input.ts +86 -0
- package/src/user-event/index.ts +6 -3
- package/src/user-event/press/__tests__/longPress.real-timers.test.tsx +4 -2
- package/src/user-event/press/__tests__/press.real-timers.test.tsx +4 -2
- package/src/user-event/press/__tests__/press.test.tsx +40 -5
- package/src/user-event/press/index.ts +1 -1
- package/src/user-event/press/press.ts +93 -58
- package/src/user-event/setup/setup.ts +39 -5
- package/src/user-event/type/__tests__/__snapshots__/type-managed.test.tsx.snap +339 -0
- package/src/user-event/type/__tests__/__snapshots__/type.test.tsx.snap +644 -2
- package/src/user-event/type/__tests__/parseKeys.test.ts +23 -0
- package/src/user-event/type/__tests__/type-managed.test.tsx +121 -0
- package/src/user-event/type/__tests__/type.test.tsx +300 -27
- package/src/user-event/type/index.ts +1 -1
- package/src/user-event/type/parseKeys.ts +41 -0
- package/src/user-event/type/type.ts +125 -10
- package/src/user-event/utils/__tests__/dispatch-event.test.tsx +41 -0
- package/src/user-event/utils/content-size.ts +25 -0
- package/src/user-event/utils/dispatch-event.ts +38 -0
- package/src/user-event/utils/index.ts +4 -1
- package/src/user-event/utils/text-range.ts +11 -0
- package/src/user-event/{press/utils/warnAboutRealTimers.ts → utils/warn-about-real-timers.ts} +8 -1
- package/website/.DS_Store +0 -0
- package/website/.docusaurus/DONT-EDIT-THIS-FOLDER +5 -0
- package/website/.docusaurus/client-modules.js +6 -0
- package/website/.docusaurus/codeTranslations.json +1 -0
- package/website/.docusaurus/docusaurus-plugin-content-blog/default/blog-post-list-prop-default.json +4 -0
- package/website/.docusaurus/docusaurus-plugin-content-blog/default/plugin-route-context-module-100.json +4 -0
- package/website/.docusaurus/docusaurus-plugin-content-docs/default/plugin-route-context-module-100.json +4 -0
- package/website/.docusaurus/docusaurus-plugin-content-docs/default/site-docs-api-md-c82.json +27 -0
- package/website/.docusaurus/docusaurus-plugin-content-docs/default/site-docs-eslint-p-llugin-testing-library-md-d24.json +27 -0
- package/website/.docusaurus/docusaurus-plugin-content-docs/default/site-docs-faq-md-ad8.json +27 -0
- package/website/.docusaurus/docusaurus-plugin-content-docs/default/site-docs-getting-started-md-8a6.json +23 -0
- package/website/.docusaurus/docusaurus-plugin-content-docs/default/site-docs-how-should-i-query-md-f2d.json +27 -0
- package/website/.docusaurus/docusaurus-plugin-content-docs/default/site-docs-migration-v-11-md-add.json +27 -0
- package/website/.docusaurus/docusaurus-plugin-content-docs/default/site-docs-migration-v-12-md-14f.json +27 -0
- package/website/.docusaurus/docusaurus-plugin-content-docs/default/site-docs-migration-v-2-md-698.json +27 -0
- package/website/.docusaurus/docusaurus-plugin-content-docs/default/site-docs-migration-v-7-md-6bb.json +27 -0
- package/website/.docusaurus/docusaurus-plugin-content-docs/default/site-docs-migration-v-9-md-f69.json +27 -0
- package/website/.docusaurus/docusaurus-plugin-content-docs/default/site-docs-queries-md-7ad.json +27 -0
- package/website/.docusaurus/docusaurus-plugin-content-docs/default/site-docs-react-navigation-md-1bd.json +27 -0
- package/website/.docusaurus/docusaurus-plugin-content-docs/default/site-docs-redux-integration-md-77b.json +23 -0
- package/website/.docusaurus/docusaurus-plugin-content-docs/default/site-docs-testing-environment-md-1c6.json +27 -0
- package/website/.docusaurus/docusaurus-plugin-content-docs/default/site-docs-troubleshooting-md-01d.json +27 -0
- package/website/.docusaurus/docusaurus-plugin-content-docs/default/site-docs-understanding-act-md-aa9.json +27 -0
- package/website/.docusaurus/docusaurus-plugin-content-docs/default/site-docs-user-event-md-501.json +27 -0
- package/website/.docusaurus/docusaurus-plugin-content-docs/default/version-current-metadata-prop-751.json +268 -0
- package/website/.docusaurus/docusaurus-plugin-content-docs/react-native-testing-library-docs-route-96e.json +115 -0
- package/website/.docusaurus/docusaurus-plugin-content-docs/site-docs-api-md-c82.json +19 -0
- package/website/.docusaurus/docusaurus-plugin-content-docs/site-docs-eslint-p-llugin-testing-library-md-d24.json +19 -0
- package/website/.docusaurus/docusaurus-plugin-content-docs/site-docs-faq-md-ad8.json +19 -0
- package/website/.docusaurus/docusaurus-plugin-content-docs/site-docs-getting-started-md-8a6.json +15 -0
- package/website/.docusaurus/docusaurus-plugin-content-docs/site-docs-how-should-i-query-md-f2d.json +19 -0
- package/website/.docusaurus/docusaurus-plugin-content-docs/site-docs-migration-v-11-md-add.json +19 -0
- package/website/.docusaurus/docusaurus-plugin-content-docs/site-docs-migration-v-2-md-698.json +19 -0
- package/website/.docusaurus/docusaurus-plugin-content-docs/site-docs-migration-v-7-md-6bb.json +19 -0
- package/website/.docusaurus/docusaurus-plugin-content-docs/site-docs-migration-v-9-md-f69.json +19 -0
- package/website/.docusaurus/docusaurus-plugin-content-docs/site-docs-queries-md-7ad.json +19 -0
- package/website/.docusaurus/docusaurus-plugin-content-docs/site-docs-react-navigation-md-1bd.json +19 -0
- package/website/.docusaurus/docusaurus-plugin-content-docs/site-docs-redux-integration-md-77b.json +15 -0
- package/website/.docusaurus/docusaurus-plugin-content-docs/site-docs-troubleshooting-md-01d.json +19 -0
- package/website/.docusaurus/docusaurus-plugin-content-docs/site-docs-understanding-act-md-aa9.json +19 -0
- package/website/.docusaurus/docusaurus-plugin-content-pages/default/plugin-route-context-module-100.json +4 -0
- package/website/.docusaurus/docusaurus-plugin-debug/default/docusaurus-debug-all-content-673.json +623 -0
- package/website/.docusaurus/docusaurus-plugin-debug/default/plugin-route-context-module-100.json +4 -0
- package/website/.docusaurus/docusaurus-theme-search-algolia/default/plugin-route-context-module-100.json +4 -0
- package/website/.docusaurus/docusaurus.config.js +267 -0
- package/website/.docusaurus/docusaurus.config.mjs +365 -0
- package/website/.docusaurus/globalData.json +113 -0
- package/website/.docusaurus/i18n.json +17 -0
- package/website/.docusaurus/registry.js +35 -0
- package/website/.docusaurus/routes.js +162 -0
- package/website/.docusaurus/routesChunkNames.json +133 -0
- package/website/.docusaurus/site-metadata.json +36 -0
- package/website/docs/API.md +19 -25
- package/website/docs/UserEvent.md +86 -9
- package/website/sidebars.js +1 -1
- package/yarn-error.log +10613 -0
- package/build/user-event/press/utils/warnAboutRealTimers.d.ts +0 -1
- package/build/user-event/press/utils/warnAboutRealTimers.js +0 -14
- package/build/user-event/press/utils/warnAboutRealTimers.js.map +0 -1
- package/build/user-event/utils/events.js +0 -44
- package/build/user-event/utils/events.js.map +0 -1
- package/experiments-app/.expo/packager-info.json +0 -9
- package/src/user-event/utils/events.ts +0 -54
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
|
|
2
|
+
<!doctype html>
|
|
3
|
+
<html lang="en">
|
|
4
|
+
|
|
5
|
+
<head>
|
|
6
|
+
<title>Code coverage report for src/waitForElementToBeRemoved.ts</title>
|
|
7
|
+
<meta charset="utf-8" />
|
|
8
|
+
<link rel="stylesheet" href="../prettify.css" />
|
|
9
|
+
<link rel="stylesheet" href="../base.css" />
|
|
10
|
+
<link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
|
|
11
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
|
+
<style type='text/css'>
|
|
13
|
+
.coverage-summary .sorter {
|
|
14
|
+
background-image: url(../sort-arrow-sprite.png);
|
|
15
|
+
}
|
|
16
|
+
</style>
|
|
17
|
+
</head>
|
|
18
|
+
|
|
19
|
+
<body>
|
|
20
|
+
<div class='wrapper'>
|
|
21
|
+
<div class='pad1'>
|
|
22
|
+
<h1><a href="../index.html">All files</a> / <a href="index.html">src</a> waitForElementToBeRemoved.ts</h1>
|
|
23
|
+
<div class='clearfix'>
|
|
24
|
+
|
|
25
|
+
<div class='fl pad1y space-right2'>
|
|
26
|
+
<span class="strong">100% </span>
|
|
27
|
+
<span class="quiet">Statements</span>
|
|
28
|
+
<span class='fraction'>12/12</span>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
<div class='fl pad1y space-right2'>
|
|
33
|
+
<span class="strong">100% </span>
|
|
34
|
+
<span class="quiet">Branches</span>
|
|
35
|
+
<span class='fraction'>7/7</span>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
<div class='fl pad1y space-right2'>
|
|
40
|
+
<span class="strong">100% </span>
|
|
41
|
+
<span class="quiet">Functions</span>
|
|
42
|
+
<span class='fraction'>3/3</span>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
<div class='fl pad1y space-right2'>
|
|
47
|
+
<span class="strong">100% </span>
|
|
48
|
+
<span class="quiet">Lines</span>
|
|
49
|
+
<span class='fraction'>12/12</span>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
<p class="quiet">
|
|
55
|
+
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
|
+
</p>
|
|
57
|
+
<template id="filterTemplate">
|
|
58
|
+
<div class="quiet">
|
|
59
|
+
Filter:
|
|
60
|
+
<input oninput="onInput()" type="search" id="fileSearch">
|
|
61
|
+
</div>
|
|
62
|
+
</template>
|
|
63
|
+
</div>
|
|
64
|
+
<div class='status-line high'></div>
|
|
65
|
+
<pre><table class="coverage">
|
|
66
|
+
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
67
|
+
<a name='L2'></a><a href='#L2'>2</a>
|
|
68
|
+
<a name='L3'></a><a href='#L3'>3</a>
|
|
69
|
+
<a name='L4'></a><a href='#L4'>4</a>
|
|
70
|
+
<a name='L5'></a><a href='#L5'>5</a>
|
|
71
|
+
<a name='L6'></a><a href='#L6'>6</a>
|
|
72
|
+
<a name='L7'></a><a href='#L7'>7</a>
|
|
73
|
+
<a name='L8'></a><a href='#L8'>8</a>
|
|
74
|
+
<a name='L9'></a><a href='#L9'>9</a>
|
|
75
|
+
<a name='L10'></a><a href='#L10'>10</a>
|
|
76
|
+
<a name='L11'></a><a href='#L11'>11</a>
|
|
77
|
+
<a name='L12'></a><a href='#L12'>12</a>
|
|
78
|
+
<a name='L13'></a><a href='#L13'>13</a>
|
|
79
|
+
<a name='L14'></a><a href='#L14'>14</a>
|
|
80
|
+
<a name='L15'></a><a href='#L15'>15</a>
|
|
81
|
+
<a name='L16'></a><a href='#L16'>16</a>
|
|
82
|
+
<a name='L17'></a><a href='#L17'>17</a>
|
|
83
|
+
<a name='L18'></a><a href='#L18'>18</a>
|
|
84
|
+
<a name='L19'></a><a href='#L19'>19</a>
|
|
85
|
+
<a name='L20'></a><a href='#L20'>20</a>
|
|
86
|
+
<a name='L21'></a><a href='#L21'>21</a>
|
|
87
|
+
<a name='L22'></a><a href='#L22'>22</a>
|
|
88
|
+
<a name='L23'></a><a href='#L23'>23</a>
|
|
89
|
+
<a name='L24'></a><a href='#L24'>24</a>
|
|
90
|
+
<a name='L25'></a><a href='#L25'>25</a>
|
|
91
|
+
<a name='L26'></a><a href='#L26'>26</a>
|
|
92
|
+
<a name='L27'></a><a href='#L27'>27</a>
|
|
93
|
+
<a name='L28'></a><a href='#L28'>28</a>
|
|
94
|
+
<a name='L29'></a><a href='#L29'>29</a>
|
|
95
|
+
<a name='L30'></a><a href='#L30'>30</a>
|
|
96
|
+
<a name='L31'></a><a href='#L31'>31</a>
|
|
97
|
+
<a name='L32'></a><a href='#L32'>32</a>
|
|
98
|
+
<a name='L33'></a><a href='#L33'>33</a>
|
|
99
|
+
<a name='L34'></a><a href='#L34'>34</a>
|
|
100
|
+
<a name='L35'></a><a href='#L35'>35</a>
|
|
101
|
+
<a name='L36'></a><a href='#L36'>36</a>
|
|
102
|
+
<a name='L37'></a><a href='#L37'>37</a>
|
|
103
|
+
<a name='L38'></a><a href='#L38'>38</a>
|
|
104
|
+
<a name='L39'></a><a href='#L39'>39</a>
|
|
105
|
+
<a name='L40'></a><a href='#L40'>40</a>
|
|
106
|
+
<a name='L41'></a><a href='#L41'>41</a>
|
|
107
|
+
<a name='L42'></a><a href='#L42'>42</a>
|
|
108
|
+
<a name='L43'></a><a href='#L43'>43</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
109
|
+
<span class="cline-any cline-neutral"> </span>
|
|
110
|
+
<span class="cline-any cline-neutral"> </span>
|
|
111
|
+
<span class="cline-any cline-neutral"> </span>
|
|
112
|
+
<span class="cline-any cline-neutral"> </span>
|
|
113
|
+
<span class="cline-any cline-yes">51x</span>
|
|
114
|
+
<span class="cline-any cline-neutral"> </span>
|
|
115
|
+
<span class="cline-any cline-neutral"> </span>
|
|
116
|
+
<span class="cline-any cline-neutral"> </span>
|
|
117
|
+
<span class="cline-any cline-neutral"> </span>
|
|
118
|
+
<span class="cline-any cline-neutral"> </span>
|
|
119
|
+
<span class="cline-any cline-neutral"> </span>
|
|
120
|
+
<span class="cline-any cline-neutral"> </span>
|
|
121
|
+
<span class="cline-any cline-yes">10x</span>
|
|
122
|
+
<span class="cline-any cline-neutral"> </span>
|
|
123
|
+
<span class="cline-any cline-neutral"> </span>
|
|
124
|
+
<span class="cline-any cline-neutral"> </span>
|
|
125
|
+
<span class="cline-any cline-neutral"> </span>
|
|
126
|
+
<span class="cline-any cline-neutral"> </span>
|
|
127
|
+
<span class="cline-any cline-yes">10x</span>
|
|
128
|
+
<span class="cline-any cline-yes">10x</span>
|
|
129
|
+
<span class="cline-any cline-yes">1x</span>
|
|
130
|
+
<span class="cline-any cline-neutral"> </span>
|
|
131
|
+
<span class="cline-any cline-neutral"> </span>
|
|
132
|
+
<span class="cline-any cline-neutral"> </span>
|
|
133
|
+
<span class="cline-any cline-neutral"> </span>
|
|
134
|
+
<span class="cline-any cline-neutral"> </span>
|
|
135
|
+
<span class="cline-any cline-yes">9x</span>
|
|
136
|
+
<span class="cline-any cline-neutral"> </span>
|
|
137
|
+
<span class="cline-any cline-yes">44x</span>
|
|
138
|
+
<span class="cline-any cline-yes">44x</span>
|
|
139
|
+
<span class="cline-any cline-neutral"> </span>
|
|
140
|
+
<span class="cline-any cline-yes">3x</span>
|
|
141
|
+
<span class="cline-any cline-neutral"> </span>
|
|
142
|
+
<span class="cline-any cline-neutral"> </span>
|
|
143
|
+
<span class="cline-any cline-yes">41x</span>
|
|
144
|
+
<span class="cline-any cline-yes">39x</span>
|
|
145
|
+
<span class="cline-any cline-neutral"> </span>
|
|
146
|
+
<span class="cline-any cline-neutral"> </span>
|
|
147
|
+
<span class="cline-any cline-yes">2x</span>
|
|
148
|
+
<span class="cline-any cline-neutral"> </span>
|
|
149
|
+
<span class="cline-any cline-neutral"> </span>
|
|
150
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import waitFor from './waitFor';
|
|
151
|
+
import type { WaitForOptions } from './waitFor';
|
|
152
|
+
import { ErrorWithStack } from './helpers/errors';
|
|
153
|
+
|
|
154
|
+
function isRemoved<T>(result: T): boolean {
|
|
155
|
+
return !result || (Array.isArray(result) && !result.length);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export default async function waitForElementToBeRemoved<T>(
|
|
159
|
+
expectation: () => T,
|
|
160
|
+
options?: WaitForOptions
|
|
161
|
+
): Promise<T> {
|
|
162
|
+
// Created here so we get a nice stacktrace
|
|
163
|
+
const timeoutError = new ErrorWithStack(
|
|
164
|
+
'Timed out in waitForElementToBeRemoved.',
|
|
165
|
+
waitForElementToBeRemoved
|
|
166
|
+
);
|
|
167
|
+
|
|
168
|
+
// Elements have to be present initally and then removed.
|
|
169
|
+
const initialElements = expectation();
|
|
170
|
+
if (isRemoved(initialElements)) {
|
|
171
|
+
throw new ErrorWithStack(
|
|
172
|
+
'The element(s) given to waitForElementToBeRemoved are already removed. waitForElementToBeRemoved requires that the element(s) exist(s) before waiting for removal.',
|
|
173
|
+
waitForElementToBeRemoved
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
return waitFor(() => {
|
|
178
|
+
let result;
|
|
179
|
+
try {
|
|
180
|
+
result = expectation();
|
|
181
|
+
} catch (error) {
|
|
182
|
+
return initialElements;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
if (!isRemoved(result)) {
|
|
186
|
+
throw timeoutError;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
return initialElements;
|
|
190
|
+
}, options);
|
|
191
|
+
}
|
|
192
|
+
</pre></td></tr></table></pre>
|
|
193
|
+
|
|
194
|
+
<div class='push'></div><!-- for sticky footer -->
|
|
195
|
+
</div><!-- /wrapper -->
|
|
196
|
+
<div class='footer quiet pad2 space-top1 center small'>
|
|
197
|
+
Code coverage generated by
|
|
198
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
199
|
+
at 2023-05-10T21:10:10.827Z
|
|
200
|
+
</div>
|
|
201
|
+
<script src="../prettify.js"></script>
|
|
202
|
+
<script>
|
|
203
|
+
window.onload = function () {
|
|
204
|
+
prettyPrint();
|
|
205
|
+
};
|
|
206
|
+
</script>
|
|
207
|
+
<script src="../sorter.js"></script>
|
|
208
|
+
<script src="../block-navigation.js"></script>
|
|
209
|
+
</body>
|
|
210
|
+
</html>
|
|
211
|
+
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
|
|
2
|
+
<!doctype html>
|
|
3
|
+
<html lang="en">
|
|
4
|
+
|
|
5
|
+
<head>
|
|
6
|
+
<title>Code coverage report for src/within.ts</title>
|
|
7
|
+
<meta charset="utf-8" />
|
|
8
|
+
<link rel="stylesheet" href="../prettify.css" />
|
|
9
|
+
<link rel="stylesheet" href="../base.css" />
|
|
10
|
+
<link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
|
|
11
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
|
+
<style type='text/css'>
|
|
13
|
+
.coverage-summary .sorter {
|
|
14
|
+
background-image: url(../sort-arrow-sprite.png);
|
|
15
|
+
}
|
|
16
|
+
</style>
|
|
17
|
+
</head>
|
|
18
|
+
|
|
19
|
+
<body>
|
|
20
|
+
<div class='wrapper'>
|
|
21
|
+
<div class='pad1'>
|
|
22
|
+
<h1><a href="../index.html">All files</a> / <a href="index.html">src</a> within.ts</h1>
|
|
23
|
+
<div class='clearfix'>
|
|
24
|
+
|
|
25
|
+
<div class='fl pad1y space-right2'>
|
|
26
|
+
<span class="strong">100% </span>
|
|
27
|
+
<span class="quiet">Statements</span>
|
|
28
|
+
<span class='fraction'>2/2</span>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
<div class='fl pad1y space-right2'>
|
|
33
|
+
<span class="strong">100% </span>
|
|
34
|
+
<span class="quiet">Branches</span>
|
|
35
|
+
<span class='fraction'>0/0</span>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
<div class='fl pad1y space-right2'>
|
|
40
|
+
<span class="strong">100% </span>
|
|
41
|
+
<span class="quiet">Functions</span>
|
|
42
|
+
<span class='fraction'>1/1</span>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
<div class='fl pad1y space-right2'>
|
|
47
|
+
<span class="strong">100% </span>
|
|
48
|
+
<span class="quiet">Lines</span>
|
|
49
|
+
<span class='fraction'>2/2</span>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
<p class="quiet">
|
|
55
|
+
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
|
+
</p>
|
|
57
|
+
<template id="filterTemplate">
|
|
58
|
+
<div class="quiet">
|
|
59
|
+
Filter:
|
|
60
|
+
<input oninput="onInput()" type="search" id="fileSearch">
|
|
61
|
+
</div>
|
|
62
|
+
</template>
|
|
63
|
+
</div>
|
|
64
|
+
<div class='status-line high'></div>
|
|
65
|
+
<pre><table class="coverage">
|
|
66
|
+
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
67
|
+
<a name='L2'></a><a href='#L2'>2</a>
|
|
68
|
+
<a name='L3'></a><a href='#L3'>3</a>
|
|
69
|
+
<a name='L4'></a><a href='#L4'>4</a>
|
|
70
|
+
<a name='L5'></a><a href='#L5'>5</a>
|
|
71
|
+
<a name='L6'></a><a href='#L6'>6</a>
|
|
72
|
+
<a name='L7'></a><a href='#L7'>7</a>
|
|
73
|
+
<a name='L8'></a><a href='#L8'>8</a>
|
|
74
|
+
<a name='L9'></a><a href='#L9'>9</a>
|
|
75
|
+
<a name='L10'></a><a href='#L10'>10</a>
|
|
76
|
+
<a name='L11'></a><a href='#L11'>11</a>
|
|
77
|
+
<a name='L12'></a><a href='#L12'>12</a>
|
|
78
|
+
<a name='L13'></a><a href='#L13'>13</a>
|
|
79
|
+
<a name='L14'></a><a href='#L14'>14</a>
|
|
80
|
+
<a name='L15'></a><a href='#L15'>15</a>
|
|
81
|
+
<a name='L16'></a><a href='#L16'>16</a>
|
|
82
|
+
<a name='L17'></a><a href='#L17'>17</a>
|
|
83
|
+
<a name='L18'></a><a href='#L18'>18</a>
|
|
84
|
+
<a name='L19'></a><a href='#L19'>19</a>
|
|
85
|
+
<a name='L20'></a><a href='#L20'>20</a>
|
|
86
|
+
<a name='L21'></a><a href='#L21'>21</a>
|
|
87
|
+
<a name='L22'></a><a href='#L22'>22</a>
|
|
88
|
+
<a name='L23'></a><a href='#L23'>23</a>
|
|
89
|
+
<a name='L24'></a><a href='#L24'>24</a>
|
|
90
|
+
<a name='L25'></a><a href='#L25'>25</a>
|
|
91
|
+
<a name='L26'></a><a href='#L26'>26</a>
|
|
92
|
+
<a name='L27'></a><a href='#L27'>27</a>
|
|
93
|
+
<a name='L28'></a><a href='#L28'>28</a>
|
|
94
|
+
<a name='L29'></a><a href='#L29'>29</a>
|
|
95
|
+
<a name='L30'></a><a href='#L30'>30</a>
|
|
96
|
+
<a name='L31'></a><a href='#L31'>31</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
97
|
+
<span class="cline-any cline-neutral"> </span>
|
|
98
|
+
<span class="cline-any cline-neutral"> </span>
|
|
99
|
+
<span class="cline-any cline-neutral"> </span>
|
|
100
|
+
<span class="cline-any cline-neutral"> </span>
|
|
101
|
+
<span class="cline-any cline-neutral"> </span>
|
|
102
|
+
<span class="cline-any cline-neutral"> </span>
|
|
103
|
+
<span class="cline-any cline-neutral"> </span>
|
|
104
|
+
<span class="cline-any cline-neutral"> </span>
|
|
105
|
+
<span class="cline-any cline-neutral"> </span>
|
|
106
|
+
<span class="cline-any cline-neutral"> </span>
|
|
107
|
+
<span class="cline-any cline-neutral"> </span>
|
|
108
|
+
<span class="cline-any cline-neutral"> </span>
|
|
109
|
+
<span class="cline-any cline-neutral"> </span>
|
|
110
|
+
<span class="cline-any cline-yes">386x</span>
|
|
111
|
+
<span class="cline-any cline-neutral"> </span>
|
|
112
|
+
<span class="cline-any cline-neutral"> </span>
|
|
113
|
+
<span class="cline-any cline-neutral"> </span>
|
|
114
|
+
<span class="cline-any cline-neutral"> </span>
|
|
115
|
+
<span class="cline-any cline-neutral"> </span>
|
|
116
|
+
<span class="cline-any cline-neutral"> </span>
|
|
117
|
+
<span class="cline-any cline-neutral"> </span>
|
|
118
|
+
<span class="cline-any cline-neutral"> </span>
|
|
119
|
+
<span class="cline-any cline-neutral"> </span>
|
|
120
|
+
<span class="cline-any cline-neutral"> </span>
|
|
121
|
+
<span class="cline-any cline-neutral"> </span>
|
|
122
|
+
<span class="cline-any cline-neutral"> </span>
|
|
123
|
+
<span class="cline-any cline-neutral"> </span>
|
|
124
|
+
<span class="cline-any cline-neutral"> </span>
|
|
125
|
+
<span class="cline-any cline-yes">48x</span>
|
|
126
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import type { ReactTestInstance } from 'react-test-renderer';
|
|
127
|
+
import { bindByTextQueries } from './queries/text';
|
|
128
|
+
import { bindByTestIdQueries } from './queries/testId';
|
|
129
|
+
import { bindByDisplayValueQueries } from './queries/displayValue';
|
|
130
|
+
import { bindByPlaceholderTextQueries } from './queries/placeholderText';
|
|
131
|
+
import { bindByLabelTextQueries } from './queries/labelText';
|
|
132
|
+
import { bindByHintTextQueries } from './queries/hintText';
|
|
133
|
+
import { bindByRoleQueries } from './queries/role';
|
|
134
|
+
import { bindByA11yStateQueries } from './queries/a11yState';
|
|
135
|
+
import { bindByA11yValueQueries } from './queries/a11yValue';
|
|
136
|
+
import { bindUnsafeByTypeQueries } from './queries/unsafeType';
|
|
137
|
+
import { bindUnsafeByPropsQueries } from './queries/unsafeProps';
|
|
138
|
+
|
|
139
|
+
export function within(instance: ReactTestInstance) {
|
|
140
|
+
return {
|
|
141
|
+
...bindByTextQueries(instance),
|
|
142
|
+
...bindByTestIdQueries(instance),
|
|
143
|
+
...bindByDisplayValueQueries(instance),
|
|
144
|
+
...bindByPlaceholderTextQueries(instance),
|
|
145
|
+
...bindByLabelTextQueries(instance),
|
|
146
|
+
...bindByHintTextQueries(instance),
|
|
147
|
+
...bindByRoleQueries(instance),
|
|
148
|
+
...bindByA11yStateQueries(instance),
|
|
149
|
+
...bindByA11yValueQueries(instance),
|
|
150
|
+
...bindUnsafeByTypeQueries(instance),
|
|
151
|
+
...bindUnsafeByPropsQueries(instance),
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export const getQueriesForElement = within;
|
|
156
|
+
</pre></td></tr></table></pre>
|
|
157
|
+
|
|
158
|
+
<div class='push'></div><!-- for sticky footer -->
|
|
159
|
+
</div><!-- /wrapper -->
|
|
160
|
+
<div class='footer quiet pad2 space-top1 center small'>
|
|
161
|
+
Code coverage generated by
|
|
162
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
163
|
+
at 2023-05-10T21:10:10.827Z
|
|
164
|
+
</div>
|
|
165
|
+
<script src="../prettify.js"></script>
|
|
166
|
+
<script>
|
|
167
|
+
window.onload = function () {
|
|
168
|
+
prettyPrint();
|
|
169
|
+
};
|
|
170
|
+
</script>
|
|
171
|
+
<script src="../sorter.js"></script>
|
|
172
|
+
<script src="../block-navigation.js"></script>
|
|
173
|
+
</body>
|
|
174
|
+
</html>
|
|
175
|
+
|