test(firstleg): align full acceptance contracts
This commit is contained in:
@@ -300,6 +300,8 @@ components:
|
|||||||
feeStatus: {type: string, enum: [CALCULATED, CONFIRMED, SENT, SUPERSEDED]}
|
feeStatus: {type: string, enum: [CALCULATED, CONFIRMED, SENT, SUPERSEDED]}
|
||||||
inboundId: {type: string, pattern: '^[1-9][0-9]*$'}
|
inboundId: {type: string, pattern: '^[1-9][0-9]*$'}
|
||||||
inboundCode: {type: string, nullable: true}
|
inboundCode: {type: string, nullable: true}
|
||||||
|
measurementId: {type: string, nullable: true}
|
||||||
|
measurementSource: {type: string, nullable: true}
|
||||||
chargeRuleId: {type: string, nullable: true}
|
chargeRuleId: {type: string, nullable: true}
|
||||||
ruleCode: {type: string, nullable: true}
|
ruleCode: {type: string, nullable: true}
|
||||||
chargeRuleVersion: {type: integer, nullable: true}
|
chargeRuleVersion: {type: integer, nullable: true}
|
||||||
|
|||||||
+1
-1
@@ -35,7 +35,7 @@ class CustomerDimensionConfigSqlContractTest {
|
|||||||
.contains("inner_width_cm DECIMAL(9,3) NOT NULL")
|
.contains("inner_width_cm DECIMAL(9,3) NOT NULL")
|
||||||
.contains("inner_height_cm DECIMAL(9,3) NOT NULL")
|
.contains("inner_height_cm DECIMAL(9,3) NOT NULL")
|
||||||
.contains("edge_addition_cm DECIMAL(6,3) NOT NULL DEFAULT 2.000")
|
.contains("edge_addition_cm DECIMAL(6,3) NOT NULL DEFAULT 2.000")
|
||||||
.contains("default_calculation_mode VARCHAR(16) NOT NULL DEFAULT 'ADD'")
|
.contains("default_calculation_mode VARCHAR(16) NOT NULL DEFAULT 'ACTUAL'")
|
||||||
.contains("initialization_key VARCHAR(128) NOT NULL")
|
.contains("initialization_key VARCHAR(128) NOT NULL")
|
||||||
.contains("created_by BIGINT UNSIGNED NOT NULL")
|
.contains("created_by BIGINT UNSIGNED NOT NULL")
|
||||||
.contains("updated_by BIGINT UNSIGNED NOT NULL")
|
.contains("updated_by BIGINT UNSIGNED NOT NULL")
|
||||||
|
|||||||
+5
-5
@@ -164,7 +164,7 @@ class CartonMeasurementServiceTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void scanOutsideConfiguredWeightingRulesKeepsImageAndUsesLargestTierAddition() {
|
void scanOutsideConfiguredWeightingRulesKeepsImageAndUsesActualDimensions() {
|
||||||
InboundMeasurementEntity measurement = measurement(30001L, "RECEIVED", 0);
|
InboundMeasurementEntity measurement = measurement(30001L, "RECEIVED", 0);
|
||||||
when(repository.findItemByBoxCode(10001L, "RK-001#5-1")).thenReturn(null);
|
when(repository.findItemByBoxCode(10001L, "RK-001#5-1")).thenReturn(null);
|
||||||
when(repository.findLatestEditableMeasurement(10001L, 70001L)).thenReturn(measurement);
|
when(repository.findLatestEditableMeasurement(10001L, 70001L)).thenReturn(measurement);
|
||||||
@@ -182,11 +182,11 @@ class CartonMeasurementServiceTest {
|
|||||||
assertThat(result.created()).isTrue();
|
assertThat(result.created()).isTrue();
|
||||||
assertThat(insertedItem.get().getSourceImageFileId()).isEqualTo(99001L);
|
assertThat(insertedItem.get().getSourceImageFileId()).isEqualTo(99001L);
|
||||||
assertThat(insertedItem.get().getLengthCm()).isEqualByComparingTo("60.100");
|
assertThat(insertedItem.get().getLengthCm()).isEqualByComparingTo("60.100");
|
||||||
assertThat(insertedItem.get().getOuterLengthCm()).isEqualByComparingTo("64.100");
|
assertThat(insertedItem.get().getOuterLengthCm()).isEqualByComparingTo("60.100");
|
||||||
assertThat(insertedItem.get().getOuterWidthCm()).isEqualByComparingTo("54.100");
|
assertThat(insertedItem.get().getOuterWidthCm()).isEqualByComparingTo("50.100");
|
||||||
assertThat(insertedItem.get().getOuterHeightCm()).isEqualByComparingTo("54.100");
|
assertThat(insertedItem.get().getOuterHeightCm()).isEqualByComparingTo("50.100");
|
||||||
assertThat(insertedItem.get().getCalculationRuleVersion())
|
assertThat(insertedItem.get().getCalculationRuleVersion())
|
||||||
.isEqualTo("CUSTOMER_DIMENSION_EXTRA_LARGE_V0");
|
.isEqualTo("ACTUAL_DIMENSION_V1");
|
||||||
assertThat(insertedItem.get().getOverLimitWarning()).isNull();
|
assertThat(insertedItem.get().getOverLimitWarning()).isNull();
|
||||||
verify(images, never()).delete(any(), any(Long.TYPE), any(Long.TYPE), any(Long.TYPE), any(Long.TYPE));
|
verify(images, never()).delete(any(), any(Long.TYPE), any(Long.TYPE), any(Long.TYPE), any(Long.TYPE));
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -206,7 +206,7 @@ class CustomerDimensionConfigServiceTest {
|
|||||||
value.setInnerWidthCm(type.defaultWidthCm());
|
value.setInnerWidthCm(type.defaultWidthCm());
|
||||||
value.setInnerHeightCm(type.defaultHeightCm());
|
value.setInnerHeightCm(type.defaultHeightCm());
|
||||||
value.setEdgeAdditionCm(new BigDecimal("2.000"));
|
value.setEdgeAdditionCm(new BigDecimal("2.000"));
|
||||||
value.setDefaultCalculationMode("ADD");
|
value.setDefaultCalculationMode("ACTUAL");
|
||||||
value.setRemark(type.defaultRemark());
|
value.setRemark(type.defaultRemark());
|
||||||
value.setVersion(0);
|
value.setVersion(0);
|
||||||
value.setInitializationKey(initializationKey);
|
value.setInitializationKey(initializationKey);
|
||||||
|
|||||||
@@ -546,7 +546,12 @@ export async function run(context) {
|
|||||||
candidateElapsedMs < 5000 && Number(candidatePage?.page) === 1 && Number(candidatePage?.size) === 200,
|
candidateElapsedMs < 5000 && Number(candidatePage?.page) === 1 && Number(candidatePage?.size) === 200,
|
||||||
`elapsedMs=${candidateElapsedMs}, total=${candidatePage?.total ?? 'missing'}`, OPTIONS)
|
`elapsedMs=${candidateElapsedMs}, total=${candidatePage?.total ?? 'missing'}`, OPTIONS)
|
||||||
|
|
||||||
const today = new Date().toISOString().slice(0, 10)
|
const today = new Intl.DateTimeFormat('en-CA', {
|
||||||
|
timeZone: 'Asia/Shanghai',
|
||||||
|
year: 'numeric',
|
||||||
|
month: '2-digit',
|
||||||
|
day: '2-digit'
|
||||||
|
}).format(new Date())
|
||||||
const filteredResponse = await context.request('GET',
|
const filteredResponse = await context.request('GET',
|
||||||
`${SMART}/inbound-candidates?channelGroupCodes=${encodeURIComponent(channelGroup(first.channelCode))}`
|
`${SMART}/inbound-candidates?channelGroupCodes=${encodeURIComponent(channelGroup(first.channelCode))}`
|
||||||
+ `&warehouseId=${encodeURIComponent(first.warehouseId)}&inboundCode=${encodeURIComponent(first.inboundCode)}`
|
+ `&warehouseId=${encodeURIComponent(first.warehouseId)}&inboundCode=${encodeURIComponent(first.inboundCode)}`
|
||||||
|
|||||||
Reference in New Issue
Block a user