Go To An Order In The Admin

Once an order is placed on the frontend you might want to go to it in the backend to get additional order information to extract, to test invoicing/shipping or to test cancellation, among about a billion other things.

But all you really need to know is the OrderID, which you can get after an order has been placed.


namespace Tests\Magium\Magento\Admin\Order;

use Magium\Magento\AbstractMagentoTestCase;
use Magium\Magento\Actions\Admin\Login\Login;
use Magium\Magento\Actions\Cart\AddItemToCart;
use Magium\Magento\Actions\Checkout\GuestCheckout;
use Magium\Magento\Extractors\Checkout\OrderId;
use Magium\Magento\Navigators\Admin\Order;

class OrderInformationExtractorTest extends AbstractMagentoTestCase

    public function testOrderExtraction()

        $addToCart = $this->getAction(AddItemToCart::ACTION);
        /* @var $addToCart \Magium\Magento\Actions\Cart\AddItemToCart */


        $guestCheckout = $this->getAction(GuestCheckout::ACTION);

        // 1) Get the Order ID
        $orderId = $this->getExtractor(OrderId::EXTRACTOR)->getOrderId();

        // 2) Log in to the admin UI

        // 3) Navigate


Once logged in the navigator will navigate to Order/Sales, search for the correct order ID, and click on the order, leaving you at the order page.

Of course at that point you can run several extractors on that page. You can see all of the extractors in the Order Information Extractor test.