edmondscommerce / behat-magento-one-context
A Behat Extension to use with Magento 1.x
Installs: 202
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 1
pkg:composer/edmondscommerce/behat-magento-one-context
Requires
- behat/behat: ~3.3
- edmondscommerce/behat-html-context: dev-master@dev
- edmondscommerce/behat-javascript-context: dev-master@dev
This package is auto-updated.
Last update: 2025-10-09 03:21:38 UTC
README
By Edmonds Commerce
Behat contexts to aid testing of Magento 1.x sites
Installation
Install via composer
"edmondscommerce/behat-magento-one-context": "~1.1"
Include Contexts in Behat Configuration
default:
    # ...
    suites:
        default:
        # ...
            contexts:
                - # ...
                - EdmondsCommerce\BehatMagentoOneContext\CartContext
                - EdmondsCommerce\BehatMagentoOneContext\CustomerContext
                - EdmondsCommerce\BehatMagentoOneContext\NavigationContext
                - EdmondsCommerce\BehatMagentoOneContext\ProductContext
            parameters:
                magentoSettings:                         
                    pathToMage: '/path/to/app/Mage.php'
                    categoryUri: women/new-arrivals.html
                    simpleUri: accessories/eyewear/aviator-sunglasses.html
                    bundleUri: pillow-and-throw-set.html
                    configurableUri: lafayette-convertible-dress.html
                    groupedUri: vase-set.html
The ProductContext has additional parameters that allow for easier navigation to different types of product, when these are not specified they will default to the sample data urls to ease prototyping of modules using the sample data.
Custom Contexts should extend RawMinkContext
AbstractMagentoContext::gatherContexts() expects Behat\MinkExtension\Context\MinkContext to be specified in the behat.yml
If the default FeatureContext, or any other Contexts extend this class too, Behat will complain that "Step 'x' is already defined in Class::method()".
Contexts should therefore extend Behat\MinkExtension\Context\RawMinkContext instead