@hedia/recommendation-screen 2.1.13 → 2.1.14
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/coverage/clover.xml +180 -175
- package/coverage/coverage-final.json +7 -7
- package/coverage/lcov-report/index.html +7 -7
- package/coverage/lcov-report/src/RecommendationScreen.tsx.html +11 -5
- package/coverage/lcov-report/src/__tests__/index.html +1 -1
- package/coverage/lcov-report/src/__tests__/utils.tsx.html +3 -3
- package/coverage/lcov-report/src/components/Header.tsx.html +3 -3
- package/coverage/lcov-report/src/components/InfoBars.tsx.html +3 -3
- package/coverage/lcov-report/src/components/InvisibleNumberInput.tsx.html +1 -1
- package/coverage/lcov-report/src/components/LimitationMessage.tsx.html +3 -3
- package/coverage/lcov-report/src/components/LineSeparator.tsx.html +1 -1
- package/coverage/lcov-report/src/components/RecentInsulin.tsx.html +4 -4
- package/coverage/lcov-report/src/components/RecommendationModal.tsx.html +11 -5
- package/coverage/lcov-report/src/components/RecommendedCarbs.tsx.html +12 -6
- package/coverage/lcov-report/src/components/RecommendedInsulin.tsx.html +11 -5
- package/coverage/lcov-report/src/components/Remeasure.tsx.html +3 -3
- package/coverage/lcov-report/src/components/TransferToLogbook.tsx.html +3 -3
- package/coverage/lcov-report/src/components/TwoOptionModal.tsx.html +11 -5
- package/coverage/lcov-report/src/components/activity/Activity.tsx.html +13 -4
- package/coverage/lcov-report/src/components/activity/ActivityIcon.tsx.html +1 -1
- package/coverage/lcov-report/src/components/activity/ActivityIntensity.tsx.html +1 -1
- package/coverage/lcov-report/src/components/activity/index.html +1 -1
- package/coverage/lcov-report/src/components/index.html +11 -11
- package/coverage/lcov-report/src/components/mood/Emotion.tsx.html +1 -1
- package/coverage/lcov-report/src/components/mood/MoodIcon.tsx.html +1 -1
- package/coverage/lcov-report/src/components/mood/index.html +1 -1
- package/coverage/lcov-report/src/index.html +5 -5
- package/coverage/lcov-report/src/locale/i18nUtils.ts.html +1 -1
- package/coverage/lcov-report/src/locale/index.html +1 -1
- package/coverage/lcov-report/src/utils/AttentionMessages.tsx.html +1 -1
- package/coverage/lcov-report/src/utils/Constants.ts.html +1 -1
- package/coverage/lcov-report/src/utils/RecommendationError.tsx.html +1 -1
- package/coverage/lcov-report/src/utils/RecommendationUtils.ts.html +1 -1
- package/coverage/lcov-report/src/utils/Translations.ts.html +1 -1
- package/coverage/lcov-report/src/utils/Utils.ts.html +1 -1
- package/coverage/lcov-report/src/utils/Validations.ts.html +1 -1
- package/coverage/lcov-report/src/utils/index.html +1 -1
- package/coverage/lcov.info +330 -325
- package/index.d.ts +2 -2
- package/index.js +2 -2
- package/package.json +1 -1
- package/src/RecommendationScreen.js +2 -1
- package/src/__tests__/RecommendationScreen.test.js +2 -1
- package/src/__tests__/components/Activity.test.js +2 -2
- package/src/__tests__/components/Header.test.js +2 -2
- package/src/__tests__/components/LimitationMessage.test.js +2 -2
- package/src/__tests__/components/RecommendationModal.test.js +2 -1
- package/src/__tests__/components/RecommendedCarbs.test.js +2 -1
- package/src/__tests__/components/RecommendedInsulin.test.js +2 -1
- package/src/__tests__/components/Remeasure.test.js +2 -1
- package/src/__tests__/components/TransferToLogbook.test.js +2 -2
- package/src/__tests__/components/TwoOptionModal.test.js +2 -1
- package/src/__tests__/utils.d.ts +2 -2
- package/src/components/Header.js +2 -2
- package/src/components/InfoBars.d.ts +3 -3
- package/src/components/LimitationMessage.js +2 -2
- package/src/components/RecentInsulin.js +3 -3
- package/src/components/RecommendationModal.js +2 -1
- package/src/components/RecommendedCarbs.d.ts +2 -2
- package/src/components/RecommendedCarbs.js +2 -1
- package/src/components/RecommendedInsulin.js +2 -1
- package/src/components/Remeasure.js +2 -2
- package/src/components/TransferToLogbook.js +2 -2
- package/src/components/TwoOptionModal.js +2 -1
- package/src/components/activity/Activity.js +2 -2
- package/src/types/enum.d.ts +67 -61
- package/src/types/enum.js +84 -78
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
26
|
<span class="strong">100% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>621/621</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
47
|
<span class="strong">100% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>610/610</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -78,13 +78,13 @@
|
|
|
78
78
|
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
|
|
79
79
|
</td>
|
|
80
80
|
<td data-value="100" class="pct high">100%</td>
|
|
81
|
-
<td data-value="
|
|
81
|
+
<td data-value="109" class="abs high">109/109</td>
|
|
82
82
|
<td data-value="100" class="pct high">100%</td>
|
|
83
83
|
<td data-value="47" class="abs high">47/47</td>
|
|
84
84
|
<td data-value="100" class="pct high">100%</td>
|
|
85
85
|
<td data-value="35" class="abs high">35/35</td>
|
|
86
86
|
<td data-value="100" class="pct high">100%</td>
|
|
87
|
-
<td data-value="
|
|
87
|
+
<td data-value="105" class="abs high">105/105</td>
|
|
88
88
|
</tr>
|
|
89
89
|
|
|
90
90
|
<tr>
|
|
@@ -108,13 +108,13 @@
|
|
|
108
108
|
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
|
|
109
109
|
</td>
|
|
110
110
|
<td data-value="100" class="pct high">100%</td>
|
|
111
|
-
<td data-value="
|
|
111
|
+
<td data-value="164" class="abs high">164/164</td>
|
|
112
112
|
<td data-value="100" class="pct high">100%</td>
|
|
113
113
|
<td data-value="96" class="abs high">96/96</td>
|
|
114
114
|
<td data-value="100" class="pct high">100%</td>
|
|
115
115
|
<td data-value="45" class="abs high">45/45</td>
|
|
116
116
|
<td data-value="100" class="pct high">100%</td>
|
|
117
|
-
<td data-value="
|
|
117
|
+
<td data-value="164" class="abs high">164/164</td>
|
|
118
118
|
</tr>
|
|
119
119
|
|
|
120
120
|
<tr>
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
186
186
|
Code coverage generated by
|
|
187
187
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
188
|
-
at Tue
|
|
188
|
+
at Tue Jul 06 2021 09:58:23 GMT+0000 (Coordinated Universal Time)
|
|
189
189
|
</div>
|
|
190
190
|
</div>
|
|
191
191
|
<script src="prettify.js"></script>
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
26
|
<span class="strong">100% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>109/109</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
47
|
<span class="strong">100% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>105/105</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -533,7 +533,9 @@
|
|
|
533
533
|
<a name='L474'></a><a href='#L474'>474</a>
|
|
534
534
|
<a name='L475'></a><a href='#L475'>475</a>
|
|
535
535
|
<a name='L476'></a><a href='#L476'>476</a>
|
|
536
|
-
<a name='L477'></a><a href='#L477'>477</a
|
|
536
|
+
<a name='L477'></a><a href='#L477'>477</a>
|
|
537
|
+
<a name='L478'></a><a href='#L478'>478</a>
|
|
538
|
+
<a name='L479'></a><a href='#L479'>479</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
537
539
|
<span class="cline-any cline-neutral"> </span>
|
|
538
540
|
<span class="cline-any cline-neutral"> </span>
|
|
539
541
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -566,6 +568,8 @@
|
|
|
566
568
|
<span class="cline-any cline-neutral"> </span>
|
|
567
569
|
<span class="cline-any cline-neutral"> </span>
|
|
568
570
|
<span class="cline-any cline-neutral"> </span>
|
|
571
|
+
<span class="cline-any cline-yes">1x</span>
|
|
572
|
+
<span class="cline-any cline-neutral"> </span>
|
|
569
573
|
<span class="cline-any cline-neutral"> </span>
|
|
570
574
|
<span class="cline-any cline-neutral"> </span>
|
|
571
575
|
<span class="cline-any cline-yes">1x</span>
|
|
@@ -1035,13 +1039,15 @@ import LimitationMessage from "./components/LimitationMessage";
|
|
|
1035
1039
|
import RecommendationModal from "./components/RecommendationModal";
|
|
1036
1040
|
import TwoOptionModal, { modalStyle } from "./components/TwoOptionModal";
|
|
1037
1041
|
import { changeLanguage, i18n } from "./locale/i18nUtils";
|
|
1038
|
-
import {
|
|
1042
|
+
import { Testing } from "./types/enum";
|
|
1039
1043
|
import { IActivityDisplayProps, IRecommendationParams, logbookEntry } from "./types/types";
|
|
1040
1044
|
import { Messages } from "./utils/AttentionMessages";
|
|
1041
1045
|
import { getAttentionMessage, getBGLevel, getLimitationMessage, getReminder } from "./utils/RecommendationUtils";
|
|
1042
1046
|
import { Utils } from "./utils/Utils";
|
|
1043
1047
|
import { validateParams } from "./utils/Validations";
|
|
1044
1048
|
|
|
1049
|
+
const { InfoBarTestIds, RecommendationScreenTestIds } = Testing.Id;
|
|
1050
|
+
|
|
1045
1051
|
// Ignoring long timer warnings
|
|
1046
1052
|
// https://github.com/facebook/react-native/issues/12981#issuecomment-652745831
|
|
1047
1053
|
YellowBox.ignoreWarnings([`Setting a timer`]);
|
|
@@ -1492,7 +1498,7 @@ const containerStyles = StyleSheet.create({
|
|
|
1492
1498
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1493
1499
|
Code coverage generated by
|
|
1494
1500
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
1495
|
-
at Tue
|
|
1501
|
+
at Tue Jul 06 2021 09:58:23 GMT+0000 (Coordinated Universal Time)
|
|
1496
1502
|
</div>
|
|
1497
1503
|
</div>
|
|
1498
1504
|
<script src="../prettify.js"></script>
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
96
96
|
Code coverage generated by
|
|
97
97
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
98
|
-
at Tue
|
|
98
|
+
at Tue Jul 06 2021 09:58:23 GMT+0000 (Coordinated Universal Time)
|
|
99
99
|
</div>
|
|
100
100
|
</div>
|
|
101
101
|
<script src="../../prettify.js"></script>
|
|
@@ -352,7 +352,7 @@ import { RenderAPI } from "react-native-testing-library";
|
|
|
352
352
|
import { ReactTestInstance } from "react-test-renderer";
|
|
353
353
|
import { i18n } from "../locale/i18nUtils";
|
|
354
354
|
import { IRecommendationProps } from "../RecommendationScreen";
|
|
355
|
-
import {
|
|
355
|
+
import { Testing } from "../types/enum";
|
|
356
356
|
import { IActivityParams, IRecommendationParams, logbookEntry } from "../types/types";
|
|
357
357
|
|
|
358
358
|
const ActivityEnum = Activity.Enums.ActivityEnum;
|
|
@@ -462,7 +462,7 @@ export function expectTextExists(component: RenderAPI, text: string | RegExp): v
|
|
|
462
462
|
return expect(element).not.toBeNull();
|
|
463
463
|
}
|
|
464
464
|
|
|
465
|
-
export function queryTextFromComponent(wrapper: RenderAPI, testID: TestIdEnum): string {
|
|
465
|
+
export function queryTextFromComponent(wrapper: RenderAPI, testID: Testing.Types.TestIdEnum): string {
|
|
466
466
|
const component = wrapper.getByTestId(testID);
|
|
467
467
|
const values = component.children;
|
|
468
468
|
return values.join(``);
|
|
@@ -496,7 +496,7 @@ export function getIcon(wrapper: RenderAPI, name: string, active: boolean): Reac
|
|
|
496
496
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
497
497
|
Code coverage generated by
|
|
498
498
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
499
|
-
at Tue
|
|
499
|
+
at Tue Jul 06 2021 09:58:23 GMT+0000 (Coordinated Universal Time)
|
|
500
500
|
</div>
|
|
501
501
|
</div>
|
|
502
502
|
<script src="../../prettify.js"></script>
|
|
@@ -239,7 +239,7 @@
|
|
|
239
239
|
import React from "react";
|
|
240
240
|
import { Dimensions, SafeAreaView, StyleSheet, Text, TouchableOpacity, View } from "react-native";
|
|
241
241
|
import { i18n } from "../locale/i18nUtils";
|
|
242
|
-
import {
|
|
242
|
+
import { Testing } from "../types/enum";
|
|
243
243
|
import { BACKGROUND_COLOUR_PURPLE, BORDER_COLOUR_GREY } from "../utils/Constants";
|
|
244
244
|
import Icon from "./Icon";
|
|
245
245
|
|
|
@@ -257,7 +257,7 @@ export default class Header extends React.Component<IProps> {
|
|
|
257
257
|
<View style={headerStyles.exitButtonContainer}>
|
|
258
258
|
<View style={headerStyles.exitButton}>
|
|
259
259
|
<TouchableOpacity
|
|
260
|
-
testID={HeaderTestIds.ExitCalculation}
|
|
260
|
+
testID={Testing.Id.HeaderTestIds.ExitCalculation}
|
|
261
261
|
accessibilityLabel="exitButton"
|
|
262
262
|
style={headerStyles.exitButton}
|
|
263
263
|
onPress={this.props.exitCallback}
|
|
@@ -331,7 +331,7 @@ export const headerStyles = StyleSheet.create({
|
|
|
331
331
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
332
332
|
Code coverage generated by
|
|
333
333
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
334
|
-
at Tue
|
|
334
|
+
at Tue Jul 06 2021 09:58:23 GMT+0000 (Coordinated Universal Time)
|
|
335
335
|
</div>
|
|
336
336
|
</div>
|
|
337
337
|
<script src="../../prettify.js"></script>
|
|
@@ -298,7 +298,7 @@ import { t } from "@lingui/macro";
|
|
|
298
298
|
import React from "react";
|
|
299
299
|
import { Dimensions, StyleSheet, Text, View } from "react-native";
|
|
300
300
|
import { i18n } from "../locale/i18nUtils";
|
|
301
|
-
import {
|
|
301
|
+
import { Testing } from "../types/enum";
|
|
302
302
|
import { BORDER_COLOUR_GREY } from "../utils/Constants";
|
|
303
303
|
import { Utils } from "../utils/Utils";
|
|
304
304
|
|
|
@@ -307,7 +307,7 @@ export interface IProps {
|
|
|
307
307
|
value: string | null;
|
|
308
308
|
unit: string | BloodGlucoseUnit | BloodKetonesUnit | null;
|
|
309
309
|
showNullAsDash: boolean;
|
|
310
|
-
testID?: { valueID: InfoBarTestIds.Value; unitID: InfoBarTestIds.Unit };
|
|
310
|
+
testID?: { valueID: Testing.Id.InfoBarTestIds.Value; unitID: Testing.Id.InfoBarTestIds.Unit };
|
|
311
311
|
}
|
|
312
312
|
|
|
313
313
|
export default class InfoBars extends React.Component<IProps> {
|
|
@@ -418,7 +418,7 @@ export const infoStyles = StyleSheet.create({
|
|
|
418
418
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
419
419
|
Code coverage generated by
|
|
420
420
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
421
|
-
at Tue
|
|
421
|
+
at Tue Jul 06 2021 09:58:23 GMT+0000 (Coordinated Universal Time)
|
|
422
422
|
</div>
|
|
423
423
|
</div>
|
|
424
424
|
<script src="../../prettify.js"></script>
|
|
@@ -358,7 +358,7 @@ const inputStyles = StyleSheet.create({
|
|
|
358
358
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
359
359
|
Code coverage generated by
|
|
360
360
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
361
|
-
at Tue
|
|
361
|
+
at Tue Jul 06 2021 09:58:23 GMT+0000 (Coordinated Universal Time)
|
|
362
362
|
</div>
|
|
363
363
|
</div>
|
|
364
364
|
<script src="../../prettify.js"></script>
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
import * as React from "react";
|
|
136
136
|
import { Text, TouchableOpacity, View } from "react-native";
|
|
137
137
|
import { i18n } from "../locale/i18nUtils";
|
|
138
|
-
import {
|
|
138
|
+
import { Testing } from "../types/enum";
|
|
139
139
|
import { stylesModal } from "./RecommendationModal";
|
|
140
140
|
|
|
141
141
|
export interface ILimitationMessageProps {
|
|
@@ -156,7 +156,7 @@ export default class LimitationMessage extends React.Component<ILimitationMes
|
|
|
156
156
|
</View>
|
|
157
157
|
<View style={stylesModal.containerAcceptButton}>
|
|
158
158
|
<TouchableOpacity
|
|
159
|
-
testID={LimitationMessageTestIds.OkButton}
|
|
159
|
+
testID={Testing.Id.LimitationMessageTestIds.OkButton}
|
|
160
160
|
accessibilityLabel="nextButtonModal"
|
|
161
161
|
style={stylesModal.okButton}
|
|
162
162
|
onPress={this.props.onPressNextButton}
|
|
@@ -175,7 +175,7 @@ export default class LimitationMessage extends React.Component<ILimitationMes
|
|
|
175
175
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
176
176
|
Code coverage generated by
|
|
177
177
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
178
|
-
at Tue
|
|
178
|
+
at Tue Jul 06 2021 09:58:23 GMT+0000 (Coordinated Universal Time)
|
|
179
179
|
</div>
|
|
180
180
|
</div>
|
|
181
181
|
<script src="../../prettify.js"></script>
|
|
@@ -136,7 +136,7 @@ const lineSeparatorStyles = StyleSheet.create({
|
|
|
136
136
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
137
137
|
Code coverage generated by
|
|
138
138
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
139
|
-
at Tue
|
|
139
|
+
at Tue Jul 06 2021 09:58:23 GMT+0000 (Coordinated Universal Time)
|
|
140
140
|
</div>
|
|
141
141
|
</div>
|
|
142
142
|
<script src="../../prettify.js"></script>
|
|
@@ -263,7 +263,7 @@
|
|
|
263
263
|
import React from "react";
|
|
264
264
|
import { Dimensions, StyleSheet, Text, TouchableOpacity, View } from "react-native";
|
|
265
265
|
import { i18n } from "../locale/i18nUtils";
|
|
266
|
-
import {
|
|
266
|
+
import { Testing } from "../types/enum";
|
|
267
267
|
import { infoStyles } from "./InfoBars";
|
|
268
268
|
|
|
269
269
|
interface IProps {
|
|
@@ -286,14 +286,14 @@ export default class RecentInsulin extends React.Component<IProps> {
|
|
|
286
286
|
<View style={recentInsulinStyles.buttonContainer}>
|
|
287
287
|
<View style={recentInsulinStyles.filler} />
|
|
288
288
|
<TouchableOpacity
|
|
289
|
-
testID={RecentInsulinTestIds.Yes}
|
|
289
|
+
testID={Testing.Id.RecentInsulinTestIds.Yes}
|
|
290
290
|
onPress={this.props.onRecentInsulinYes}
|
|
291
291
|
style={[recentInsulinStyles.yesNoContainer, { marginRight: `2%` }]}
|
|
292
292
|
>
|
|
293
293
|
<Text style={recentInsulinStyles.yesNoText}>{i18n._(t`Yes`)}</Text>
|
|
294
294
|
</TouchableOpacity>
|
|
295
295
|
<TouchableOpacity
|
|
296
|
-
testID={RecentInsulinTestIds.No}
|
|
296
|
+
testID={Testing.Id.RecentInsulinTestIds.No}
|
|
297
297
|
onPress={this.props.onRecentInsulinNo}
|
|
298
298
|
style={[recentInsulinStyles.yesNoContainer, { marginLeft: `2%` }]}
|
|
299
299
|
>
|
|
@@ -367,7 +367,7 @@ const recentInsulinStyles = StyleSheet.create({
|
|
|
367
367
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
368
368
|
Code coverage generated by
|
|
369
369
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
370
|
-
at Tue
|
|
370
|
+
at Tue Jul 06 2021 09:58:23 GMT+0000 (Coordinated Universal Time)
|
|
371
371
|
</div>
|
|
372
372
|
</div>
|
|
373
373
|
<script src="../../prettify.js"></script>
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
26
|
<span class="strong">100% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>33/33</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
47
|
<span class="strong">100% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>33/33</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -276,7 +276,9 @@
|
|
|
276
276
|
<a name='L217'></a><a href='#L217'>217</a>
|
|
277
277
|
<a name='L218'></a><a href='#L218'>218</a>
|
|
278
278
|
<a name='L219'></a><a href='#L219'>219</a>
|
|
279
|
-
<a name='L220'></a><a href='#L220'>220</a
|
|
279
|
+
<a name='L220'></a><a href='#L220'>220</a>
|
|
280
|
+
<a name='L221'></a><a href='#L221'>221</a>
|
|
281
|
+
<a name='L222'></a><a href='#L222'>222</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
280
282
|
<span class="cline-any cline-neutral"> </span>
|
|
281
283
|
<span class="cline-any cline-neutral"> </span>
|
|
282
284
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -285,6 +287,8 @@
|
|
|
285
287
|
<span class="cline-any cline-neutral"> </span>
|
|
286
288
|
<span class="cline-any cline-neutral"> </span>
|
|
287
289
|
<span class="cline-any cline-neutral"> </span>
|
|
290
|
+
<span class="cline-any cline-yes">4x</span>
|
|
291
|
+
<span class="cline-any cline-neutral"> </span>
|
|
288
292
|
<span class="cline-any cline-neutral"> </span>
|
|
289
293
|
<span class="cline-any cline-neutral"> </span>
|
|
290
294
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -500,10 +504,12 @@ import * as React from "react";
|
|
|
500
504
|
import { Dimensions, StyleSheet, Text, TouchableOpacity, View } from "react-native";
|
|
501
505
|
import ReactNativeModal from "react-native-modal";
|
|
502
506
|
import { i18n } from "../locale/i18nUtils";
|
|
503
|
-
import {
|
|
507
|
+
import { Testing } from "../types/enum";
|
|
504
508
|
import { BORDER_COLOUR_TEAL } from "../utils/Constants";
|
|
505
509
|
import LimitationMessage from "./LimitationMessage";
|
|
506
510
|
|
|
511
|
+
const { RecommendationModalTestIds } = Testing.Id;
|
|
512
|
+
|
|
507
513
|
interface IModalProps {
|
|
508
514
|
isVisible: boolean;
|
|
509
515
|
suggestedCarbohydrates: number | null;
|
|
@@ -721,7 +727,7 @@ export const stylesModal = StyleSheet.create({
|
|
|
721
727
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
722
728
|
Code coverage generated by
|
|
723
729
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
724
|
-
at Tue
|
|
730
|
+
at Tue Jul 06 2021 09:58:23 GMT+0000 (Coordinated Universal Time)
|
|
725
731
|
</div>
|
|
726
732
|
</div>
|
|
727
733
|
<script src="../../prettify.js"></script>
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
26
|
<span class="strong">100% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>22/22</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
47
|
<span class="strong">100% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>22/22</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -316,7 +316,9 @@
|
|
|
316
316
|
<a name='L257'></a><a href='#L257'>257</a>
|
|
317
317
|
<a name='L258'></a><a href='#L258'>258</a>
|
|
318
318
|
<a name='L259'></a><a href='#L259'>259</a>
|
|
319
|
-
<a name='L260'></a><a href='#L260'>260</a
|
|
319
|
+
<a name='L260'></a><a href='#L260'>260</a>
|
|
320
|
+
<a name='L261'></a><a href='#L261'>261</a>
|
|
321
|
+
<a name='L262'></a><a href='#L262'>262</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
320
322
|
<span class="cline-any cline-neutral"> </span>
|
|
321
323
|
<span class="cline-any cline-neutral"> </span>
|
|
322
324
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -328,6 +330,8 @@
|
|
|
328
330
|
<span class="cline-any cline-neutral"> </span>
|
|
329
331
|
<span class="cline-any cline-neutral"> </span>
|
|
330
332
|
<span class="cline-any cline-neutral"> </span>
|
|
333
|
+
<span class="cline-any cline-yes">2x</span>
|
|
334
|
+
<span class="cline-any cline-neutral"> </span>
|
|
331
335
|
<span class="cline-any cline-neutral"> </span>
|
|
332
336
|
<span class="cline-any cline-neutral"> </span>
|
|
333
337
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -579,7 +583,7 @@
|
|
|
579
583
|
import React from "react";
|
|
580
584
|
import { Alert, Dimensions, StyleSheet, Text, TouchableOpacity, View } from "react-native";
|
|
581
585
|
import { i18n } from "../locale/i18nUtils";
|
|
582
|
-
import {
|
|
586
|
+
import { Testing } from "../types/enum";
|
|
583
587
|
import { BORDER_COLOUR_GREY, BORDER_COLOUR_TEAL } from "../utils/Constants";
|
|
584
588
|
import { CarbohydrateLimitError } from "../utils/RecommendationError";
|
|
585
589
|
import Icon from "./Icon";
|
|
@@ -587,6 +591,8 @@ import { infoStyles } from "./InfoBars";
|
|
|
587
591
|
import InvisibleNumberInput from "./InvisibleNumberInput";
|
|
588
592
|
import LineSeparator from "./LineSeparator";
|
|
589
593
|
|
|
594
|
+
const { RecommendedCarbsTestIds } = Testing.Id;
|
|
595
|
+
|
|
590
596
|
interface ICalculationRow {
|
|
591
597
|
label: string;
|
|
592
598
|
value: string;
|
|
@@ -714,7 +720,7 @@ export default class RecommendedCarbs extends React.Component<IProps, IState&
|
|
|
714
720
|
);
|
|
715
721
|
};
|
|
716
722
|
|
|
717
|
-
public renderRow = (row: ICalculationRow, testID: RecommendedCarbsTestIds): JSX.Element => {
|
|
723
|
+
public renderRow = (row: ICalculationRow, testID: Testing.Id.RecommendedCarbsTestIds): JSX.Element => {
|
|
718
724
|
return (
|
|
719
725
|
<View style={[calculationStyles.borderContainer, { paddingVertical: `1%` }]}>
|
|
720
726
|
<View style={calculationStyles.rowContainer}>
|
|
@@ -841,7 +847,7 @@ const calculationStyles = StyleSheet.create({
|
|
|
841
847
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
842
848
|
Code coverage generated by
|
|
843
849
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
844
|
-
at Tue
|
|
850
|
+
at Tue Jul 06 2021 09:58:23 GMT+0000 (Coordinated Universal Time)
|
|
845
851
|
</div>
|
|
846
852
|
</div>
|
|
847
853
|
<script src="../../prettify.js"></script>
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
26
|
<span class="strong">100% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>28/28</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
47
|
<span class="strong">100% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>28/28</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -232,7 +232,9 @@
|
|
|
232
232
|
<a name='L173'></a><a href='#L173'>173</a>
|
|
233
233
|
<a name='L174'></a><a href='#L174'>174</a>
|
|
234
234
|
<a name='L175'></a><a href='#L175'>175</a>
|
|
235
|
-
<a name='L176'></a><a href='#L176'>176</a
|
|
235
|
+
<a name='L176'></a><a href='#L176'>176</a>
|
|
236
|
+
<a name='L177'></a><a href='#L177'>177</a>
|
|
237
|
+
<a name='L178'></a><a href='#L178'>178</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
236
238
|
<span class="cline-any cline-neutral"> </span>
|
|
237
239
|
<span class="cline-any cline-neutral"> </span>
|
|
238
240
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -245,6 +247,8 @@
|
|
|
245
247
|
<span class="cline-any cline-neutral"> </span>
|
|
246
248
|
<span class="cline-any cline-neutral"> </span>
|
|
247
249
|
<span class="cline-any cline-neutral"> </span>
|
|
250
|
+
<span class="cline-any cline-yes">2x</span>
|
|
251
|
+
<span class="cline-any cline-neutral"> </span>
|
|
248
252
|
<span class="cline-any cline-neutral"> </span>
|
|
249
253
|
<span class="cline-any cline-neutral"> </span>
|
|
250
254
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -413,13 +417,15 @@ import React from "react";
|
|
|
413
417
|
import { Alert, Dimensions, Platform, StyleSheet, Text, TouchableOpacity, View } from "react-native";
|
|
414
418
|
import LinearGradient from "react-native-linear-gradient";
|
|
415
419
|
import { i18n } from "../locale/i18nUtils";
|
|
416
|
-
import {
|
|
420
|
+
import { Testing } from "../types/enum";
|
|
417
421
|
import { Messages } from "../utils/AttentionMessages";
|
|
418
422
|
import { Utils } from "../utils/Utils";
|
|
419
423
|
import Icon from "./Icon";
|
|
420
424
|
import { infoStyles } from "./InfoBars";
|
|
421
425
|
import InvisibleNumberInput from "./InvisibleNumberInput";
|
|
422
426
|
|
|
427
|
+
const { RecommendedInsulinTestIds } = Testing.Id;
|
|
428
|
+
|
|
423
429
|
interface IProps {
|
|
424
430
|
// Values
|
|
425
431
|
insulinRecommendation: number;
|
|
@@ -589,7 +595,7 @@ const recommendedInsulinStyles = StyleSheet.create({
|
|
|
589
595
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
590
596
|
Code coverage generated by
|
|
591
597
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
592
|
-
at Tue
|
|
598
|
+
at Tue Jul 06 2021 09:58:23 GMT+0000 (Coordinated Universal Time)
|
|
593
599
|
</div>
|
|
594
600
|
</div>
|
|
595
601
|
<script src="../../prettify.js"></script>
|
|
@@ -302,7 +302,7 @@ import Slider from "@react-native-community/slider";
|
|
|
302
302
|
import React from "react";
|
|
303
303
|
import { Dimensions, Platform, StyleSheet, Text, View } from "react-native";
|
|
304
304
|
import { i18n } from "../locale/i18nUtils";
|
|
305
|
-
import {
|
|
305
|
+
import { Testing } from "../types/enum";
|
|
306
306
|
import { BORDER_COLOUR_GREY, BORDER_COLOUR_TEAL } from "../utils/Constants";
|
|
307
307
|
import { infoStyles } from "./InfoBars";
|
|
308
308
|
|
|
@@ -357,7 +357,7 @@ export default class Remeasure extends React.Component<IProps> {
|
|
|
357
357
|
this.slider = slider;
|
|
358
358
|
}
|
|
359
359
|
}}
|
|
360
|
-
testID={RemeasureTestIds.RemeasureSlider}
|
|
360
|
+
testID={Testing.Id.RemeasureTestIds.RemeasureSlider}
|
|
361
361
|
accessibilityLabel="remeasureSlider"
|
|
362
362
|
maximumTrackTintColor={BORDER_COLOUR_GREY}
|
|
363
363
|
minimumTrackTintColor={BORDER_COLOUR_TEAL}
|
|
@@ -424,7 +424,7 @@ const variantStyles = StyleSheet.create({
|
|
|
424
424
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
425
425
|
Code coverage generated by
|
|
426
426
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
427
|
-
at Tue
|
|
427
|
+
at Tue Jul 06 2021 09:58:23 GMT+0000 (Coordinated Universal Time)
|
|
428
428
|
</div>
|
|
429
429
|
</div>
|
|
430
430
|
<script src="../../prettify.js"></script>
|
|
@@ -262,7 +262,7 @@ import { Dimensions, StyleSheet, Text, TouchableOpacity, View } from "react-nati
|
|
|
262
262
|
|
|
263
263
|
import { t } from "@lingui/macro";
|
|
264
264
|
import { i18n } from "../locale/i18nUtils";
|
|
265
|
-
import {
|
|
265
|
+
import { Testing } from "../types/enum";
|
|
266
266
|
import Icon from "./Icon";
|
|
267
267
|
|
|
268
268
|
interface IProps {
|
|
@@ -293,7 +293,7 @@ export default class TransferToLogbook extends React.Component<IProps, IState
|
|
|
293
293
|
|
|
294
294
|
return (
|
|
295
295
|
<TouchableOpacity
|
|
296
|
-
testID={TransferToLogbookTestIds.TransferButton}
|
|
296
|
+
testID={Testing.Id.TransferToLogbookTestIds.TransferButton}
|
|
297
297
|
onPress={this.handlePress}
|
|
298
298
|
disabled={this.state.pressed}
|
|
299
299
|
style={addToLogbookStyles.container}
|
|
@@ -364,7 +364,7 @@ const addToLogbookStyles = StyleSheet.create({
|
|
|
364
364
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
365
365
|
Code coverage generated by
|
|
366
366
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
367
|
-
at Tue
|
|
367
|
+
at Tue Jul 06 2021 09:58:23 GMT+0000 (Coordinated Universal Time)
|
|
368
368
|
</div>
|
|
369
369
|
</div>
|
|
370
370
|
<script src="../../prettify.js"></script>
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
26
|
<span class="strong">100% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>6/6</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
47
|
<span class="strong">100% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>6/6</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -242,13 +242,17 @@
|
|
|
242
242
|
<a name='L183'></a><a href='#L183'>183</a>
|
|
243
243
|
<a name='L184'></a><a href='#L184'>184</a>
|
|
244
244
|
<a name='L185'></a><a href='#L185'>185</a>
|
|
245
|
-
<a name='L186'></a><a href='#L186'>186</a
|
|
245
|
+
<a name='L186'></a><a href='#L186'>186</a>
|
|
246
|
+
<a name='L187'></a><a href='#L187'>187</a>
|
|
247
|
+
<a name='L188'></a><a href='#L188'>188</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
246
248
|
<span class="cline-any cline-neutral"> </span>
|
|
247
249
|
<span class="cline-any cline-neutral"> </span>
|
|
248
250
|
<span class="cline-any cline-neutral"> </span>
|
|
249
251
|
<span class="cline-any cline-neutral"> </span>
|
|
250
252
|
<span class="cline-any cline-neutral"> </span>
|
|
251
253
|
<span class="cline-any cline-neutral"> </span>
|
|
254
|
+
<span class="cline-any cline-yes">2x</span>
|
|
255
|
+
<span class="cline-any cline-neutral"> </span>
|
|
252
256
|
<span class="cline-any cline-neutral"> </span>
|
|
253
257
|
<span class="cline-any cline-neutral"> </span>
|
|
254
258
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -429,11 +433,13 @@
|
|
|
429
433
|
<span class="cline-any cline-neutral"> </span>
|
|
430
434
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import * as React from "react";
|
|
431
435
|
import { Dimensions, StatusBar, StyleSheet, Text, TouchableOpacity, View } from "react-native";
|
|
432
|
-
import {
|
|
436
|
+
import { Testing } from "../types/enum";
|
|
433
437
|
import { BACKGROUND_COLOUR_PURPLE, BORDER_COLOUR_GREY, BORDER_COLOUR_TEAL } from "../utils/Constants";
|
|
434
438
|
import Icon from "./Icon";
|
|
435
439
|
import { stylesModal } from "./RecommendationModal";
|
|
436
440
|
|
|
441
|
+
const { TwoOptionModalTestIds } = Testing.Id;
|
|
442
|
+
|
|
437
443
|
export interface ITwoOptionModalProps {
|
|
438
444
|
title: string;
|
|
439
445
|
message: string;
|
|
@@ -619,7 +625,7 @@ export const modalStyle = StyleSheet.create({
|
|
|
619
625
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
620
626
|
Code coverage generated by
|
|
621
627
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
622
|
-
at Tue
|
|
628
|
+
at Tue Jul 06 2021 09:58:23 GMT+0000 (Coordinated Universal Time)
|
|
623
629
|
</div>
|
|
624
630
|
</div>
|
|
625
631
|
<script src="../../prettify.js"></script>
|