updates on the delviereis page
This commit is contained in:
@@ -298,6 +298,22 @@ describe('ZoneContext', () => {
|
||||
expect(result.current.matchesZone({ pickuplatitude: null, pickuplongitude: null })).toBe(false);
|
||||
expect(result.current.matchesZone({ pickuplatitude: 'abc', pickuplongitude: 'abc' })).toBe(false);
|
||||
});
|
||||
|
||||
it('should correctly match a delivery row that carries an assigned rider (milerprofileid) by address/city', () => {
|
||||
const { result } = selectKoramangala();
|
||||
// Even though milerprofileid and userid are present, this is a delivery row (has bookingid/pickupaddress)
|
||||
// and should match Koramangala Hub's city (Bengaluru).
|
||||
const deliveryRow = {
|
||||
bookingid: 4021,
|
||||
bookingno: 'DM-BK-7959CF19-97503',
|
||||
pickupaddress: '12 MG Road, Bengaluru 560001',
|
||||
deliveryaddress: '44 Indiranagar, Bengaluru 560038',
|
||||
milerprofileid: 11,
|
||||
userid: 91,
|
||||
ridername: 'Vasanth'
|
||||
};
|
||||
expect(result.current.matchesZone(deliveryRow)).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('matchesZone — riders', () => {
|
||||
|
||||
Reference in New Issue
Block a user