Ejemplo n.º 1
0
    def test_delivery(self):  # By searching order number
        # operations
        compulsory_refresh(self.driver)

        orders = Orders(self.device_id)
        order_num = delivery(self.driver, orders)
        confirm_delivery(self.driver)

        # verification
        print('The order for testing delivery is', order_num)
        assert (get_progress_details(self.driver) == 'Delivered'), 'KAKA progress details did not update.'
        orders.update()
        assert orders.check_milestone(order_num=order_num, expectation=5) is True, 'Delivery verification fails.'
Ejemplo n.º 2
0
    def test_batch_pickup(self):
        # operations

        # init_orders(multiple=True)  # Get multiple orders for testing batch pickup
        orders = Orders(self.device_id)
        left_orders = batch_pickup(self.driver)

        # verification
        orders.update()
        pickup_orders = orders.get_pickup_order_list()
        print('Orders that are not picked up by batch pickup:', left_orders)
        print('Orders that are currently in pickup status:', pickup_orders)
        assert (len(left_orders) == len(pickup_orders)), 'Left order quantity is wrong.'
        for i in range(len(left_orders)):
            assert (left_orders[i] in pickup_orders), 'Left order is wrong.'