Skip to content
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

MPDX-7786 Don't round donations #833

Merged
merged 3 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ query GetExpectedMonthlyTotals(
total
}
currency
currencySymbol
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ const mocks = {
},
GetDonationsTable: {
currency: 'CAD',
currencySymbol: '$',
donations: {
nodes: [
{
Expand Down Expand Up @@ -292,7 +291,6 @@ describe('DonationsReportTable', () => {
const mocks = {
GetAccountListCurrency: {
accountList: {
id: 'abc',
currency: 'CAD',
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@ const mockedDonations = {
GetExpectedMonthlyTotals: {
expectedMonthlyTotalReport: {
currency: 'CAD',
currencySymbol: '$',
received: {
donations: [
caleballdrin marked this conversation as resolved.
Show resolved Hide resolved
{
contactId: 'a6c5a4c2-9ae4-445d-a430-1d12c664f179',
convertedCurrency: 'CAD',
donationCurrency: 'CAD',
pledgeCurrency: 'CAD',
Expand All @@ -34,7 +32,6 @@ const mockedDonations = {
likely: {
donations: [
{
contactId: 'a6c5a4c2-9ae4-445d-a430-1d12c664f179',
convertedCurrency: 'CAD',
donationCurrency: 'CAD',
pledgeCurrency: 'CAD',
Expand All @@ -44,7 +41,6 @@ const mockedDonations = {
unlikely: {
donations: [
{
contactId: 'a6c5a4c2-9ae4-445d-a430-1d12c664f179',
convertedCurrency: 'CAD',
donationCurrency: 'CAD',
pledgeCurrency: 'CAD',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ it('renders donation table', async () => {
variables: { accountListId: 'abc' },
mocks: {
expectedMonthlyTotalReport: {
received: {
caleballdrin marked this conversation as resolved.
Show resolved Hide resolved
likely: {
donations: [
{
convertedCurrency: 'USD',
Expand Down Expand Up @@ -66,7 +66,7 @@ it('renders donation table', async () => {
<ExpectedMonthlyTotalReportTable
accountListId={'abc'}
title={'Donations So Far This Month'}
data={data.expectedMonthlyTotalReport.received.donations}
data={data.expectedMonthlyTotalReport.likely.donations}
donations={true}
total={0}
currency={'USD'}
Expand Down Expand Up @@ -95,7 +95,7 @@ it('renders non-donation table', async () => {
variables: { accountListId: 'abc' },
mocks: {
expectedMonthlyTotalReport: {
received: {
likely: {
donations: [
{
convertedCurrency: 'CAD',
Expand All @@ -112,7 +112,7 @@ it('renders non-donation table', async () => {
<ExpectedMonthlyTotalReportTable
accountListId={'abc'}
title={'Likely Partners This Month'}
data={data.expectedMonthlyTotalReport.received.donations}
data={data.expectedMonthlyTotalReport.likely.donations}
donations={false}
total={0}
currency={'USD'}
Expand Down
10 changes: 5 additions & 5 deletions src/lib/intlFormat/intlFormat.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ describe('intlFormat', () => {

describe('different language', () => {
it('handles language', () => {
expect(dateFormat(DateTime.local(2020, 1, 5), 'fr')).toEqual(
'5 janv. 2020',
expect(dateFormat(DateTime.local(2020, 1, 5), 'es-419')).toEqual(
'5 ene 2020',
);
});
});
Expand All @@ -170,9 +170,9 @@ describe('intlFormat', () => {

describe('different language', () => {
caleballdrin marked this conversation as resolved.
Show resolved Hide resolved
it('handles language', () => {
expect(dateFormatWithoutYear(DateTime.local(2020, 1, 5), 'fr')).toEqual(
'5 janv.',
);
expect(
dateFormatWithoutYear(DateTime.local(2020, 1, 5), 'es-419'),
).toEqual('5 ene');
});
});
});
Expand Down
Loading