-
-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Imperial Units Feature #365
Changes from 18 commits
ad539b5
c3abd32
4d28a21
9e2f2d0
2df6b40
dbccc70
0af7c7e
59252fd
d03df83
c64bc6c
d687255
00551ad
f390d9f
efd101a
6015200
f885e3f
33482d9
3533ca7
0abca19
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,9 +76,10 @@ exports[`EmissionListItem renders correctly if mitigated 1`] = ` | |
> | ||
<FormattedNumber | ||
maximumFractionDigits={2} | ||
value={2.1} | ||
value={4.6305000000000005} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would prefer to keep the kg values in snapshots across the entire project, or create two snapshots files like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I put together a perhaps janky way to get this working, using the getUseMetricUnits selector to mock useSelector before each test in the affected snapshots. EmissionItemScreen I only mocked useSelector in this once per test since it uses other selectors, and this also required me to move the related line of code above all the other useSelector calls in order for it to receive the intended mocking EDIT I apologize for my unclear language here -- it's like 2 am, and I can't put my words together right now |
||
/> | ||
kgCO2 | ||
lb | ||
CO2 | ||
</Text.Tertiary> | ||
<Text.Tertiary | ||
lightGray={true} | ||
|
@@ -182,9 +183,10 @@ exports[`EmissionListItem renders correctly with audio icon 1`] = ` | |
> | ||
<FormattedNumber | ||
maximumFractionDigits={2} | ||
value={2.1} | ||
value={4.6305000000000005} | ||
/> | ||
kgCO2 | ||
lb | ||
CO2 | ||
</Text.Tertiary> | ||
</View> | ||
</View> | ||
|
@@ -278,9 +280,10 @@ exports[`EmissionListItem renders correctly with boat icon 1`] = ` | |
> | ||
<FormattedNumber | ||
maximumFractionDigits={2} | ||
value={2.1} | ||
value={4.6305000000000005} | ||
/> | ||
kgCO2 | ||
lb | ||
CO2 | ||
</Text.Tertiary> | ||
</View> | ||
</View> | ||
|
@@ -374,9 +377,10 @@ exports[`EmissionListItem renders correctly with bus icon 1`] = ` | |
> | ||
<FormattedNumber | ||
maximumFractionDigits={2} | ||
value={2.1} | ||
value={4.6305000000000005} | ||
/> | ||
kgCO2 | ||
lb | ||
CO2 | ||
</Text.Tertiary> | ||
</View> | ||
</View> | ||
|
@@ -470,9 +474,10 @@ exports[`EmissionListItem renders correctly with car icon 1`] = ` | |
> | ||
<FormattedNumber | ||
maximumFractionDigits={2} | ||
value={2.1} | ||
value={4.6305000000000005} | ||
/> | ||
kgCO2 | ||
lb | ||
CO2 | ||
</Text.Tertiary> | ||
</View> | ||
</View> | ||
|
@@ -566,9 +571,10 @@ exports[`EmissionListItem renders correctly with card icon 1`] = ` | |
> | ||
<FormattedNumber | ||
maximumFractionDigits={2} | ||
value={2.1} | ||
value={4.6305000000000005} | ||
/> | ||
kgCO2 | ||
lb | ||
CO2 | ||
</Text.Tertiary> | ||
</View> | ||
</View> | ||
|
@@ -662,9 +668,10 @@ exports[`EmissionListItem renders correctly with chocolate icon 1`] = ` | |
> | ||
<FormattedNumber | ||
maximumFractionDigits={2} | ||
value={2.1} | ||
value={4.6305000000000005} | ||
/> | ||
kgCO2 | ||
lb | ||
CO2 | ||
</Text.Tertiary> | ||
</View> | ||
</View> | ||
|
@@ -758,9 +765,10 @@ exports[`EmissionListItem renders correctly with coffee icon 1`] = ` | |
> | ||
<FormattedNumber | ||
maximumFractionDigits={2} | ||
value={2.1} | ||
value={4.6305000000000005} | ||
/> | ||
kgCO2 | ||
lb | ||
CO2 | ||
</Text.Tertiary> | ||
</View> | ||
</View> | ||
|
@@ -854,9 +862,10 @@ exports[`EmissionListItem renders correctly with electricity icon 1`] = ` | |
> | ||
<FormattedNumber | ||
maximumFractionDigits={2} | ||
value={2.1} | ||
value={4.6305000000000005} | ||
/> | ||
kgCO2 | ||
lb | ||
CO2 | ||
</Text.Tertiary> | ||
</View> | ||
</View> | ||
|
@@ -950,9 +959,10 @@ exports[`EmissionListItem renders correctly with fish icon 1`] = ` | |
> | ||
<FormattedNumber | ||
maximumFractionDigits={2} | ||
value={2.1} | ||
value={4.6305000000000005} | ||
/> | ||
kgCO2 | ||
lb | ||
CO2 | ||
</Text.Tertiary> | ||
</View> | ||
</View> | ||
|
@@ -1046,9 +1056,10 @@ exports[`EmissionListItem renders correctly with full hd video icon 1`] = ` | |
> | ||
<FormattedNumber | ||
maximumFractionDigits={2} | ||
value={2.1} | ||
value={4.6305000000000005} | ||
/> | ||
kgCO2 | ||
lb | ||
CO2 | ||
</Text.Tertiary> | ||
</View> | ||
</View> | ||
|
@@ -1142,9 +1153,10 @@ exports[`EmissionListItem renders correctly with hd video icon 1`] = ` | |
> | ||
<FormattedNumber | ||
maximumFractionDigits={2} | ||
value={2.1} | ||
value={4.6305000000000005} | ||
/> | ||
kgCO2 | ||
lb | ||
CO2 | ||
</Text.Tertiary> | ||
</View> | ||
</View> | ||
|
@@ -1238,9 +1250,10 @@ exports[`EmissionListItem renders correctly with longHaulFlight icon 1`] = ` | |
> | ||
<FormattedNumber | ||
maximumFractionDigits={2} | ||
value={2.1} | ||
value={4.6305000000000005} | ||
/> | ||
kgCO2 | ||
lb | ||
CO2 | ||
</Text.Tertiary> | ||
</View> | ||
</View> | ||
|
@@ -1334,9 +1347,10 @@ exports[`EmissionListItem renders correctly with meal icon 1`] = ` | |
> | ||
<FormattedNumber | ||
maximumFractionDigits={2} | ||
value={2.1} | ||
value={4.6305000000000005} | ||
/> | ||
kgCO2 | ||
lb | ||
CO2 | ||
</Text.Tertiary> | ||
</View> | ||
</View> | ||
|
@@ -1430,9 +1444,10 @@ exports[`EmissionListItem renders correctly with mediumHaulFlight icon 1`] = ` | |
> | ||
<FormattedNumber | ||
maximumFractionDigits={2} | ||
value={2.1} | ||
value={4.6305000000000005} | ||
/> | ||
kgCO2 | ||
lb | ||
CO2 | ||
</Text.Tertiary> | ||
</View> | ||
</View> | ||
|
@@ -1526,9 +1541,10 @@ exports[`EmissionListItem renders correctly with motorbike icon 1`] = ` | |
> | ||
<FormattedNumber | ||
maximumFractionDigits={2} | ||
value={2.1} | ||
value={4.6305000000000005} | ||
/> | ||
kgCO2 | ||
lb | ||
CO2 | ||
</Text.Tertiary> | ||
</View> | ||
</View> | ||
|
@@ -1622,9 +1638,10 @@ exports[`EmissionListItem renders correctly with redMeat icon 1`] = ` | |
> | ||
<FormattedNumber | ||
maximumFractionDigits={2} | ||
value={2.1} | ||
value={4.6305000000000005} | ||
/> | ||
kgCO2 | ||
lb | ||
CO2 | ||
</Text.Tertiary> | ||
</View> | ||
</View> | ||
|
@@ -1718,9 +1735,10 @@ exports[`EmissionListItem renders correctly with shirt icon 1`] = ` | |
> | ||
<FormattedNumber | ||
maximumFractionDigits={2} | ||
value={2.1} | ||
value={4.6305000000000005} | ||
/> | ||
kgCO2 | ||
lb | ||
CO2 | ||
</Text.Tertiary> | ||
</View> | ||
</View> | ||
|
@@ -1814,9 +1832,10 @@ exports[`EmissionListItem renders correctly with shortHaulFlight icon 1`] = ` | |
> | ||
<FormattedNumber | ||
maximumFractionDigits={2} | ||
value={2.1} | ||
value={4.6305000000000005} | ||
/> | ||
kgCO2 | ||
lb | ||
CO2 | ||
</Text.Tertiary> | ||
</View> | ||
</View> | ||
|
@@ -1910,9 +1929,10 @@ exports[`EmissionListItem renders correctly with train icon 1`] = ` | |
> | ||
<FormattedNumber | ||
maximumFractionDigits={2} | ||
value={2.1} | ||
value={4.6305000000000005} | ||
/> | ||
kgCO2 | ||
lb | ||
CO2 | ||
</Text.Tertiary> | ||
</View> | ||
</View> | ||
|
@@ -2006,9 +2026,10 @@ exports[`EmissionListItem renders correctly with ultra hd video icon 1`] = ` | |
> | ||
<FormattedNumber | ||
maximumFractionDigits={2} | ||
value={2.1} | ||
value={4.6305000000000005} | ||
/> | ||
kgCO2 | ||
lb | ||
CO2 | ||
</Text.Tertiary> | ||
</View> | ||
</View> | ||
|
@@ -2102,9 +2123,10 @@ exports[`EmissionListItem renders correctly with whiteMeat icon 1`] = ` | |
> | ||
<FormattedNumber | ||
maximumFractionDigits={2} | ||
value={2.1} | ||
value={4.6305000000000005} | ||
/> | ||
kgCO2 | ||
lb | ||
CO2 | ||
</Text.Tertiary> | ||
</View> | ||
</View> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just realized that now : we are missing the
eq
for some reason 😅{" " + getDisplayUnits(co2value, useMetricUnits)}CO2eq