Skip to content

Commit bfea977

Browse files
CCM-13382: Add Automation Tests (#578)
* tests * data * tests * data * tests * lint * fix * lint fix * config * config changes * config changes * config fix * tests * fix * lint fix * Update event-fixtures.ts remove unused ref * config fix * config fix * Update allocation-helper.ts * add test to config * add missing ref * fix flaky tests * fix flaky tests * remove duplicate tests * fix comments
1 parent 689913f commit bfea977

32 files changed

Lines changed: 1526 additions & 10 deletions

config/suppliers/letter-variant/client1-campaign2.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"client1-campaign2"
3333
],
3434
"priority": 1,
35-
"status": "INT",
35+
"status": "PROD",
3636
"type": "STANDARD",
37-
"volumeGroupId": "volumeGroup-test3"
37+
"volumeGroupId": "volumeGroup-test4"
3838
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"constraints": {
3+
"blackCoveragePercentage": {
4+
"operator": "LESS_THAN",
5+
"value": 20
6+
},
7+
"deliveryDays": {
8+
"operator": "LESS_THAN",
9+
"value": 2
10+
},
11+
"sheets": {
12+
"operator": "LESS_THAN",
13+
"value": 5
14+
},
15+
"sides": {
16+
"operator": "LESS_THAN",
17+
"value": 10
18+
}
19+
},
20+
"description": "Black printing, first class postage tariff",
21+
"id": "notify-first-test",
22+
"name": "First class letter",
23+
"packSpecificationIds": [
24+
"notify-first-test"
25+
],
26+
"priority": 10,
27+
"status": "PROD",
28+
"type": "STANDARD",
29+
"volumeGroupId": "volumeGroup-test5"
30+
}

config/suppliers/letter-variant/notify-standard-test1.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"id": "notify-standard-test1",
2222
"name": "Dev Happy Path",
2323
"packSpecificationIds": [
24-
"notify-c5"
24+
"notify-c5",
25+
"notify-c4"
2526
],
2627
"priority": 50,
2728
"status": "PROD",

config/suppliers/pack-specification/client1-campaign2.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"maxWeightGrams": 100,
5050
"size": "STANDARD"
5151
},
52-
"status": "INT",
52+
"status": "PROD",
5353
"updatedAt": "2026-04-14T00:00:00.000Z",
5454
"version": 1
5555
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"assembly": {
3+
"duplex": true,
4+
"envelopeId": "first-c5",
5+
"paper": {
6+
"colour": "WHITE",
7+
"id": "paper-std-white-80",
8+
"name": "Standard White 80gsm",
9+
"recycled": true,
10+
"size": "A4",
11+
"weightGSM": 80
12+
},
13+
"printColour": "BLACK"
14+
},
15+
"billingId": "notify-first-test",
16+
"constraints": {
17+
"blackCoveragePercentage": {
18+
"operator": "LESS_THAN",
19+
"value": 20
20+
},
21+
"deliveryDays": {
22+
"operator": "LESS_THAN",
23+
"value": 2
24+
},
25+
"sheets": {
26+
"operator": "LESS_THAN",
27+
"value": 5
28+
},
29+
"sides": {
30+
"operator": "LESS_THAN",
31+
"value": 10
32+
}
33+
},
34+
"createdAt": "2026-01-12T00:00:00.000Z",
35+
"description": "First class postage tariff",
36+
"id": "notify-first-test",
37+
"name": "First class",
38+
"postage": {
39+
"deliveryDays": 2,
40+
"id": "first-class",
41+
"maxThicknessMm": 5,
42+
"maxWeightGrams": 100,
43+
"size": "STANDARD"
44+
},
45+
"status": "PROD",
46+
"updatedAt": "2026-01-12T00:00:00.000Z",
47+
"version": 1
48+
}

config/suppliers/supplier-allocation/supplier1-volumeGroup-test3.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"allocationPercentage": 100,
2+
"allocationPercentage": 50,
33
"id": "supplier1-volumeGroup-test3",
44
"status": "PROD",
55
"supplier": "supplier1",
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"allocationPercentage": 50,
3+
"id": "supplier2-volumeGroup-test3",
4+
"status": "PROD",
5+
"supplier": "supplier2",
6+
"volumeGroup": "volumeGroup-test3"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"allocationPercentage": 50,
3+
"id": "supplier3-volumeGroup-test4",
4+
"status": "PROD",
5+
"supplier": "supplier3",
6+
"volumeGroup": "volumeGroup-test4"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"allocationPercentage": 50,
3+
"id": "supplier4-volumeGroup-test4",
4+
"status": "PROD",
5+
"supplier": "supplier4",
6+
"volumeGroup": "volumeGroup-test4"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"allocationPercentage": 100,
3+
"id": "supplier5-volumeGroup-test5",
4+
"status": "PROD",
5+
"supplier": "supplier5",
6+
"volumeGroup": "volumeGroup-test5"
7+
}

0 commit comments

Comments
 (0)