Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save lefte/0c5704273ca8d56fcb87b5ba8be8871c to your computer and use it in GitHub Desktop.

Select an option

Save lefte/0c5704273ca8d56fcb87b5ba8be8871c to your computer and use it in GitHub Desktop.
Meet Magento NYC 2024 Presentation Links

Meet Magento NYC 2024 Presentation

Automation for Developers: An Introduction to Lando and Cypress

By Erik Hanson

Lando

# Clone and access a sample repository
> git clone https://github.com/bfaulkner-champions/lando-magento2-template.git
> cd lando-magento2-template

# Download Magento using your keys
> lando magento:download --mage-edition "Open Source" \
  --mage-version 2.4.7-p2 \
  --mage-access-key-private $MY_MAGENTO_PRIVATE_KEY \
  --mage-access-key-public $MY_MAGENTO_PUBLIC_KEY \
  --github-token $MY_GITHUB_TOKEN \
  --notify-magento false \
  --notify-github false

# Start Lando and install Magento with sample data
> lando start
> lando composer install
> lando php bin/magento setup:install \
  --db-host database --db-name lemp --db-user lemp --db-password lemp \
  --magento-init-params="MAGE_MODE=developer" --use-sample-data \
  --elasticsearch-host='myservice' --elasticsearch-port=9200 \
  --base-url=http://magento2.lndo.site --base-url-secure=https://magento2.lndo.site
> lando php bin/magento sampledata:deploy
> lando php bin/magento setup:upgrade

Cypress

# Clone and access a sample repository
> git clone https://github.com/elgentos/magento2-cypress-testing-suite.git
> cd magento2-cypress-testing-suite

# Install Cypress
> npm clean-install

# Start Cypress and point it to our fresh Lando install
> CYPRESS_MAGENTO2_SPEC_SUITE=luma npx cypress open --e2e --config baseUrl=https://magento2.lndo.site

Support Forums

My Info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment