|
|
@@ -117,7 +117,16 @@ describe('用户端订单API集成测试', () => {
|
|
|
passengerCount: 1,
|
|
|
totalAmount: 100,
|
|
|
passengerSnapshots: [],
|
|
|
- routeSnapshot: {}
|
|
|
+ routeSnapshot: {
|
|
|
+ id: 999999,
|
|
|
+ name: '不存在的路线',
|
|
|
+ pickupPoint: '起点',
|
|
|
+ dropoffPoint: '终点',
|
|
|
+ departureTime: new Date(),
|
|
|
+ price: 100,
|
|
|
+ vehicleType: 'CAR',
|
|
|
+ travelMode: 'DRIVING'
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
const response = await client.orders.$post({
|
|
|
@@ -143,7 +152,16 @@ describe('用户端订单API集成测试', () => {
|
|
|
passengerCount: testRoute.availableSeats + 1, // 超过可用座位数
|
|
|
totalAmount: testRoute.price * (testRoute.availableSeats + 1),
|
|
|
passengerSnapshots: [],
|
|
|
- routeSnapshot: {}
|
|
|
+ routeSnapshot: {
|
|
|
+ id: testRoute.id,
|
|
|
+ name: testRoute.name,
|
|
|
+ pickupPoint: testRoute.pickupPoint,
|
|
|
+ dropoffPoint: testRoute.dropoffPoint,
|
|
|
+ departureTime: testRoute.departureTime,
|
|
|
+ price: testRoute.price,
|
|
|
+ vehicleType: testRoute.vehicleType,
|
|
|
+ travelMode: testRoute.travelMode
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
const response = await client.orders.$post({
|
|
|
@@ -177,7 +195,16 @@ describe('用户端订单API集成测试', () => {
|
|
|
phone: '13812345678'
|
|
|
}
|
|
|
],
|
|
|
- routeSnapshot: {}
|
|
|
+ routeSnapshot: {
|
|
|
+ id: testRoute.id,
|
|
|
+ name: testRoute.name,
|
|
|
+ pickupPoint: testRoute.pickupPoint,
|
|
|
+ dropoffPoint: testRoute.dropoffPoint,
|
|
|
+ departureTime: testRoute.departureTime,
|
|
|
+ price: testRoute.price,
|
|
|
+ vehicleType: testRoute.vehicleType,
|
|
|
+ travelMode: testRoute.travelMode
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
const response = await client.orders.$post({
|
|
|
@@ -204,7 +231,16 @@ describe('用户端订单API集成测试', () => {
|
|
|
passengerCount: 1,
|
|
|
totalAmount: 100,
|
|
|
passengerSnapshots: [],
|
|
|
- routeSnapshot: {}
|
|
|
+ routeSnapshot: {
|
|
|
+ id: testRoute.id,
|
|
|
+ name: testRoute.name,
|
|
|
+ pickupPoint: testRoute.pickupPoint,
|
|
|
+ dropoffPoint: testRoute.dropoffPoint,
|
|
|
+ departureTime: testRoute.departureTime,
|
|
|
+ price: testRoute.price,
|
|
|
+ vehicleType: testRoute.vehicleType,
|
|
|
+ travelMode: testRoute.travelMode
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
const response = await client.orders.$post({
|
|
|
@@ -280,7 +316,16 @@ describe('用户端订单API集成测试', () => {
|
|
|
passengerCount: 1,
|
|
|
totalAmount: testRoute.price,
|
|
|
passengerSnapshots: [],
|
|
|
- routeSnapshot: {}
|
|
|
+ routeSnapshot: {
|
|
|
+ id: testRoute.id,
|
|
|
+ name: testRoute.name,
|
|
|
+ pickupPoint: testRoute.pickupPoint,
|
|
|
+ dropoffPoint: testRoute.dropoffPoint,
|
|
|
+ departureTime: testRoute.departureTime,
|
|
|
+ price: testRoute.price,
|
|
|
+ vehicleType: testRoute.vehicleType,
|
|
|
+ travelMode: testRoute.travelMode
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
const response = await client.orders.$post({
|
|
|
@@ -296,7 +341,16 @@ describe('用户端订单API集成测试', () => {
|
|
|
passengerCount: 1,
|
|
|
totalAmount: testRoute.price,
|
|
|
passengerSnapshots: [],
|
|
|
- routeSnapshot: {}
|
|
|
+ routeSnapshot: {
|
|
|
+ id: testRoute.id,
|
|
|
+ name: testRoute.name,
|
|
|
+ pickupPoint: testRoute.pickupPoint,
|
|
|
+ dropoffPoint: testRoute.dropoffPoint,
|
|
|
+ departureTime: testRoute.departureTime,
|
|
|
+ price: testRoute.price,
|
|
|
+ vehicleType: testRoute.vehicleType,
|
|
|
+ travelMode: testRoute.travelMode
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
const response = await client.orders.$post({
|