Skip to content

Commit

Permalink
fix snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
Maciej Szewczyk committed Dec 19, 2024
1 parent 43634a0 commit c7376c0
Show file tree
Hide file tree
Showing 12 changed files with 137 additions and 2,012 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const fakeApolloAllCommunicationMessages = [
targetPopulation: '',
createdBy: '',
first: 10,
paymentPlan: '',
orderBy: '-created_at',
},
},
Expand All @@ -27,14 +28,12 @@ export const fakeApolloAllCommunicationMessages = [
{
cursor: 'YXJyYXljb25uZWN0aW9uOjA=',
node: {
id:
'Q29tbXVuaWNhdGlvbk1lc3NhZ2VOb2RlOjExMDZmNThmLTJkZDMtNDQ5OC1hZjNkLTI2YzNhNDc2ZjkwZg==',
id: 'Q29tbXVuaWNhdGlvbk1lc3NhZ2VOb2RlOjExMDZmNThmLTJkZDMtNDQ5OC1hZjNkLTI2YzNhNDc2ZjkwZg==',
unicefId: 'MSG-23-0005',
title: 'jij',
numberOfRecipients: 1,
createdBy: {
id:
'VXNlck5vZGU6NDE5NmMyYzUtYzJkZC00OGQyLTg4N2YtM2E5ZDM5ZTc4OTE2',
id: 'VXNlck5vZGU6NDE5NmMyYzUtYzJkZC00OGQyLTg4N2YtM2E5ZDM5ZTc4OTE2',
firstName: 'Root',
lastName: 'Rootkowski',
email: 'root@root.com',
Expand All @@ -48,14 +47,12 @@ export const fakeApolloAllCommunicationMessages = [
{
cursor: 'YXJyYXljb25uZWN0aW9uOjE=',
node: {
id:
'Q29tbXVuaWNhdGlvbk1lc3NhZ2VOb2RlOjExNzVmMzMwLTM2Y2MtNDM5NC04MjAyLWU4NjY3ZTI5ZTc4MA==',
id: 'Q29tbXVuaWNhdGlvbk1lc3NhZ2VOb2RlOjExNzVmMzMwLTM2Y2MtNDM5NC04MjAyLWU4NjY3ZTI5ZTc4MA==',
unicefId: 'MSG-22-0002',
title: 'You got credit of USD 200',
numberOfRecipients: 2,
createdBy: {
id:
'VXNlck5vZGU6NDE5NmMyYzUtYzJkZC00OGQyLTg4N2YtM2E5ZDM5ZTc4OTE2',
id: 'VXNlck5vZGU6NDE5NmMyYzUtYzJkZC00OGQyLTg4N2YtM2E5ZDM5ZTc4OTE2',
firstName: 'Root',
lastName: 'Rootkowski',
email: 'root@root.com',
Expand All @@ -69,14 +66,12 @@ export const fakeApolloAllCommunicationMessages = [
{
cursor: 'YXJyYXljb25uZWN0aW9uOjI=',
node: {
id:
'Q29tbXVuaWNhdGlvbk1lc3NhZ2VOb2RlOjc1OGJiMjg0LTJjZjAtNGZjYy1hY2YyLTY5NDdlZDhkZGNlNg==',
id: 'Q29tbXVuaWNhdGlvbk1lc3NhZ2VOb2RlOjc1OGJiMjg0LTJjZjAtNGZjYy1hY2YyLTY5NDdlZDhkZGNlNg==',
unicefId: 'MSG-22-0004',
title: 'We hold your back!',
numberOfRecipients: 2,
createdBy: {
id:
'VXNlck5vZGU6NDE5NmMyYzUtYzJkZC00OGQyLTg4N2YtM2E5ZDM5ZTc4OTE2',
id: 'VXNlck5vZGU6NDE5NmMyYzUtYzJkZC00OGQyLTg4N2YtM2E5ZDM5ZTc4OTE2',
firstName: 'Root',
lastName: 'Rootkowski',
email: 'root@root.com',
Expand All @@ -90,14 +85,12 @@ export const fakeApolloAllCommunicationMessages = [
{
cursor: 'YXJyYXljb25uZWN0aW9uOjM=',
node: {
id:
'Q29tbXVuaWNhdGlvbk1lc3NhZ2VOb2RlOjQxYjllNTE0LWI1NmMtNDY1OS1hYmFhLWE5ZWYwNzVlOThlMQ==',
id: 'Q29tbXVuaWNhdGlvbk1lc3NhZ2VOb2RlOjQxYjllNTE0LWI1NmMtNDY1OS1hYmFhLWE5ZWYwNzVlOThlMQ==',
unicefId: 'MSG-22-0003',
title: 'Hello There!',
numberOfRecipients: 2,
createdBy: {
id:
'VXNlck5vZGU6NDE5NmMyYzUtYzJkZC00OGQyLTg4N2YtM2E5ZDM5ZTc4OTE2',
id: 'VXNlck5vZGU6NDE5NmMyYzUtYzJkZC00OGQyLTg4N2YtM2E5ZDM5ZTc4OTE2',
firstName: 'Root',
lastName: 'Rootkowski',
email: 'root@root.com',
Expand All @@ -111,14 +104,12 @@ export const fakeApolloAllCommunicationMessages = [
{
cursor: 'YXJyYXljb25uZWN0aW9uOjQ=',
node: {
id:
'Q29tbXVuaWNhdGlvbk1lc3NhZ2VOb2RlOjBkMDQ3NDg0LTUzODAtNGJmMi1hOTViLWM4NjVmNWUzYmM4OQ==',
id: 'Q29tbXVuaWNhdGlvbk1lc3NhZ2VOb2RlOjBkMDQ3NDg0LTUzODAtNGJmMi1hOTViLWM4NjVmNWUzYmM4OQ==',
unicefId: 'MSG-22-0001',
title: 'Hello World!',
numberOfRecipients: 2,
createdBy: {
id:
'VXNlck5vZGU6NDE5NmMyYzUtYzJkZC00OGQyLTg4N2YtM2E5ZDM5ZTc4OTE2',
id: 'VXNlck5vZGU6NDE5NmMyYzUtYzJkZC00OGQyLTg4N2YtM2E5ZDM5ZTc4OTE2',
firstName: 'Root',
lastName: 'Rootkowski',
email: 'root@root.com',
Expand Down
181 changes: 103 additions & 78 deletions src/frontend/fixtures/targeting/fakeApolloAllTargetPopulation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,126 +10,151 @@ export const fakeApolloAllTargetPopulation = [
totalHouseholdsCountMax: null,
status: '',
businessArea: 'afghanistan',
program: [
'UHJvZ3JhbU5vZGU6YzRkNTY1N2QtMWEyOS00NmUxLTgxOTAtZGY3Zjg1YTBkMmVm',
],
createdAtRange: '{"min":null,"max":null}',
first: 10,
orderBy: '-created_at',
program:
'UHJvZ3JhbU5vZGU6MDAwMDAwMDAtMDAwMC0wMDAwLTAwMDAtZmFjZWIwMGMwMDAw',
},
},
result: {
data: {
allTargetPopulation: {
allPaymentPlans: {
edges: [
{
cursor: 'YXJyYXljb25uZWN0aW9uOjA=',
node: {
id: 'VGFyZ2V0UG9wdWxhdGlvbk5vZGU6MjQyZmQ4NDQtOTYzOC00MTdhLTkzZWMtYjQzMjY0Y2Y4YmRj',
name: 'Our ball many investment look like.',
status: 'READY_FOR_CASH_ASSIST',
createdAt: '2023-09-29T10:52:33.042363+00:00',
updatedAt: '2023-09-29T10:52:33.068191+00:00',
totalHouseholdsCount: 0,
totalHouseholdsCountWithValidPhoneNo: 0,
totalIndividualsCount: null,
__typename: 'TargetPopulationNode',
program: {
id: 'UHJvZ3JhbU5vZGU6MDAwMDAwMDAtMDAwMC0wMDAwLTAwMDAtZmFjZWIwMGMwMDAw',
name: 'Test Program',
__typename: 'ProgramNode',
id: 'UGF5bWVudFBsYW5Ob2RlOjUxYTM0MzQxLTViOTAtNDM0ZS04NWYxLWU4OWYzNmE2N2E0MQ==',
unicefId: 'PP-0060-24-00000003',
name: 'ffrijrijrijr',
isFollowUp: false,
followUps: {
totalCount: 0,
edges: [],
__typename: 'PaymentPlanNodeConnection',
},
status: 'TP_OPEN',
createdBy: {
id: 'VXNlck5vZGU6M2ZlNWE2OGMtYTI3Mi00Y2UzLWE3YzgtODhkNWIyOTY1YjMy',
firstName: 'Mary',
lastName: 'Reyes',
id: 'VXNlck5vZGU6NDE5NmMyYzUtYzJkZC00OGQyLTg4N2YtM2E5ZDM5ZTc4OTE2',
firstName: 'Root',
lastName: 'Rootkowski',
email: 'root@root.com',
__typename: 'UserNode',
},
},
cursor: 'YXJyYXljb25uZWN0aW9uOjA=',
__typename: 'TargetPopulationNodeEdge',
},
{
node: {
id: 'VGFyZ2V0UG9wdWxhdGlvbk5vZGU6YjI0ZDA5ZTUtN2E1Yy00MjgyLWI4ZmItYWY4MDkwMGY5YzRm',
name: 'Less road structure audience those modern.',
status: 'READY_FOR_CASH_ASSIST',
createdAt: '2023-09-29T10:52:30.379605+00:00',
updatedAt: '2023-09-29T10:52:30.412142+00:00',
totalHouseholdsCount: 0,
totalHouseholdsCountWithValidPhoneNo: 0,
totalIndividualsCount: null,
__typename: 'TargetPopulationNode',
program: {
id: 'UHJvZ3JhbU5vZGU6MDAwMDAwMDAtMDAwMC0wMDAwLTAwMDAtZmFjZWIwMGMwMDAw',
name: 'Test Program',
__typename: 'ProgramNode',
},
createdBy: {
id: 'VXNlck5vZGU6ZDA0MjdlNjktN2U1Mi00NmYzLTljNjItMGU1YzJlZWRjNGYz',
firstName: 'Elizabeth',
lastName: 'Coleman',
__typename: 'UserNode',
},
currency: null,
currencyName: null,
startDate: '2024-12-19',
endDate: '2025-05-03',
dispersionStartDate: null,
dispersionEndDate: null,
femaleChildrenCount: 0,
femaleAdultsCount: 0,
maleChildrenCount: 0,
maleAdultsCount: 0,
totalHouseholdsCount: 0,
totalIndividualsCount: 0,
totalEntitledQuantity: null,
totalDeliveredQuantity: null,
totalUndeliveredQuantity: null,
__typename: 'PaymentPlanNode',
},
cursor: 'YXJyYXljb25uZWN0aW9uOjE=',
__typename: 'TargetPopulationNodeEdge',
__typename: 'PaymentPlanNodeEdge',
},
{
cursor: 'YXJyYXljb25uZWN0aW9uOjE=',
node: {
id: 'VGFyZ2V0UG9wdWxhdGlvbk5vZGU6YzBiMzE0NjItNmIzMC00OGNiLTljMmMtZDgzM2JkZTJmNGYx',
name: 'Score visit write ask whole myself.',
status: 'READY_FOR_CASH_ASSIST',
createdAt: '2023-09-29T10:52:30.190168+00:00',
updatedAt: '2023-09-29T10:52:30.220259+00:00',
totalHouseholdsCount: 0,
totalHouseholdsCountWithValidPhoneNo: 0,
totalIndividualsCount: null,
__typename: 'TargetPopulationNode',
id: 'UGF5bWVudFBsYW5Ob2RlOjFlMDMyNDdmLWFmOWUtNDMyMS04ZGIwLWUxYzg2MGZjYWI5Nw==',
unicefId: 'PP-0060-22-11223344',
name: 'Reconciled Payment Plan',
isFollowUp: false,
followUps: {
totalCount: 0,
edges: [],
__typename: 'PaymentPlanNodeConnection',
},
status: 'FINISHED',
createdBy: {
id: 'VXNlck5vZGU6NDE5NmMyYzUtYzJkZC00OGQyLTg4N2YtM2E5ZDM5ZTc4OTE2',
firstName: 'Root',
lastName: 'Rootkowski',
email: 'root@root.com',
__typename: 'UserNode',
},
program: {
id: 'UHJvZ3JhbU5vZGU6MDAwMDAwMDAtMDAwMC0wMDAwLTAwMDAtZmFjZWIwMGMwMDAw',
name: 'Test Program',
__typename: 'ProgramNode',
},
createdBy: {
id: 'VXNlck5vZGU6ODE3OWIyMDAtZjBhZC00OWYyLWJjZDItNTYwZjUxZDZlOGNj',
firstName: 'Jennifer',
lastName: 'Bailey',
__typename: 'UserNode',
},
currency: 'USD',
currencyName: 'United States dollar',
startDate: null,
endDate: null,
dispersionStartDate: '2024-12-19',
dispersionEndDate: '2025-01-02',
femaleChildrenCount: 0,
femaleAdultsCount: 4,
maleChildrenCount: 0,
maleAdultsCount: 6,
totalHouseholdsCount: 5,
totalIndividualsCount: 28,
totalEntitledQuantity: 2999.0,
totalDeliveredQuantity: 999.0,
totalUndeliveredQuantity: null,
__typename: 'PaymentPlanNode',
},
cursor: 'YXJyYXljb25uZWN0aW9uOjI=',
__typename: 'TargetPopulationNodeEdge',
__typename: 'PaymentPlanNodeEdge',
},
{
cursor: 'YXJyYXljb25uZWN0aW9uOjI=',
node: {
id: 'VGFyZ2V0UG9wdWxhdGlvbk5vZGU6MDAwMDAwMDAtMDAwMC0wMDAwLTAwMDAtZmFjZWIwMGMwMTIz',
name: 'Test Target Population',
status: 'ASSIGNED',
createdAt: '2023-09-29T10:52:29.726956+00:00',
updatedAt: '2023-09-29T10:52:29.779197+00:00',
totalHouseholdsCount: 2,
totalHouseholdsCountWithValidPhoneNo: 0,
totalIndividualsCount: 8,
__typename: 'TargetPopulationNode',
program: {
id: 'UHJvZ3JhbU5vZGU6MDAwMDAwMDAtMDAwMC0wMDAwLTAwMDAtZmFjZWIwMGMwMDAw',
name: 'Test Program',
__typename: 'ProgramNode',
id: 'UGF5bWVudFBsYW5Ob2RlOjAwMDAwMDAwLWZlZWQtYmVlZi0wMDAwLTAwMDAwYmFkZjAwZA==',
unicefId: 'PP-0060-24-00000001',
name: 'Test Payment Plan',
isFollowUp: false,
followUps: {
totalCount: 0,
edges: [],
__typename: 'PaymentPlanNodeConnection',
},
status: 'TP_OPEN',
createdBy: {
id: 'VXNlck5vZGU6NDE5NmMyYzUtYzJkZC00OGQyLTg4N2YtM2E5ZDM5ZTc4OTE2',
firstName: 'Root',
lastName: 'Rootkowski',
email: 'root@root.com',
__typename: 'UserNode',
},
program: {
id: 'UHJvZ3JhbU5vZGU6MDAwMDAwMDAtMDAwMC0wMDAwLTAwMDAtZmFjZWIwMGMwMDAw',
name: 'Test Program',
__typename: 'ProgramNode',
},
currency: 'USD',
currencyName: 'United States dollar',
startDate: null,
endDate: null,
dispersionStartDate: '2024-12-19',
dispersionEndDate: '2025-01-02',
femaleChildrenCount: 0,
femaleAdultsCount: 0,
maleChildrenCount: 0,
maleAdultsCount: 2,
totalHouseholdsCount: 2,
totalIndividualsCount: 2,
totalEntitledQuantity: null,
totalDeliveredQuantity: null,
totalUndeliveredQuantity: null,
__typename: 'PaymentPlanNode',
},
cursor: 'YXJyYXljb25uZWN0aW9uOjM=',
__typename: 'TargetPopulationNodeEdge',
__typename: 'PaymentPlanNodeEdge',
},
],
totalCount: 4,
edgeCount: 4,
__typename: 'TargetPopulationNodeConnection',
__typename: 'PaymentPlanNodeConnection',
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ exports[`components/paymentmodule/PaymentPlanTargeting should render 1`] = `
class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-6 css-1osj8n2-MuiGrid-root"
>
<div
choices="[object Object]"
choices=""
class="MuiFormControl-root MuiFormControl-fullWidth css-q8hpuo-MuiFormControl-root"
data-cy="input-target-population"
label="Target Population"
Expand All @@ -46,7 +46,7 @@ exports[`components/paymentmodule/PaymentPlanTargeting should render 1`] = `
</span>
</label>
<div
choices="[object Object]"
choices=""
class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-colorPrimary MuiInputBase-fullWidth MuiInputBase-formControl MuiInputBase-sizeSmall css-7088dt-MuiInputBase-root-MuiOutlinedInput-root-MuiSelect-root"
data-cy="input-target-population"
required=""
Expand All @@ -55,10 +55,10 @@ exports[`components/paymentmodule/PaymentPlanTargeting should render 1`] = `
aria-controls=":r0:"
aria-expanded="false"
aria-haspopup="listbox"
aria-labelledby="textField-targetingId"
aria-labelledby="textField-paymentPlanId"
class="MuiSelect-select MuiSelect-outlined MuiInputBase-input MuiOutlinedInput-input MuiInputBase-inputSizeSmall css-jedpe8-MuiSelect-select-MuiInputBase-input-MuiOutlinedInput-input"
data-cy="select-targetingId"
id="textField-targetingId"
data-cy="select-paymentPlanId"
id="textField-paymentPlanId"
role="combobox"
tabindex="0"
>
Expand All @@ -72,7 +72,7 @@ exports[`components/paymentmodule/PaymentPlanTargeting should render 1`] = `
aria-hidden="true"
aria-invalid="false"
class="MuiSelect-nativeInput css-yf8vq0-MuiSelect-nativeInput"
name="targetingId"
name="paymentPlanId"
required=""
tabindex="-1"
value=""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ exports[`components/paymentmodule/EditPaymentPlanHeader should render 1`] = `
class="sc-dntaoT gQSLBb"
>
<div
class="sc-ivxoEo fCtLWH status-box-container"
class="sc-ivxoEo lijeeH status-box-container"
data-cy="status-container"
>
LOCKED
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,8 @@ exports[`components/paymentmodule/PaymentPlanDetails/PaymentPlanDetails should r
>
<a
class="sc-blHHSb bcGWHN"
href="/afghanistan/programs/UHJvZ3JhbU5vZGU6NmI1OTE1OTktYmNhNy00NDVhLWJmZjItYWU5MTUyMjMxZGFm/target-population/VGFyZ2V0UG9wdWxhdGlvbk5vZGU6MzlmMjQ0YzEtZGRiMC00ZGZmLWE0MzEtN2JiMDFhMTdiMThm"
>
Report should property early adult.
</a>
href="/afghanistan/programs/UHJvZ3JhbU5vZGU6NmI1OTE1OTktYmNhNy00NDVhLWJmZjItYWU5MTUyMjMxZGFm/target-population/UGF5bWVudFBsYW5Ob2RlOmE5YzJjMmM4LWJmYWUtNDBhMy05YmYwLWIxYWE1ZmRlMDE0YQ=="
/>
</span>
</div>
</div>
Expand Down
Loading

0 comments on commit c7376c0

Please sign in to comment.